Invoice v1

All endpoints related to Invoices v1

Invoices v1 endpoints are depreciated but do still work, it is HIGHLY recommended to update your applications to the v2 endpoints

Invoice v1 support will be depreciated from the wrapper at some point.

Supported Endpoints

  • getAllInvoices(): Returns a list of all the listings created.

  • getInvoice(id): Retrieves a listing by the entered ID.

  • getOrderDeliverables(id): Creates a listing and returns the created listing.

  • createInvoice(fields): Updates a listing by the entered ID.

  • issueReplacement(id, fields): Deletes a listing by the entered ID.

  • createPayment(id): Generates a payment session for the given order.


Invoices v1

Invoices v1 endpoints are depreciated but do still work, it is HIGHLY recommended to update your applications to the v2 endpoints

Invoice v1 support will be depreciated from the wrapper at some point.

getAllInvoices()

Usage
const Sellapp = require("sellapp-node");
const API = new Sellapp.API("YOUR_API_KEY");

API.invoicesv1.getAllInvoices().then((res) => {
    console.log(res)
});

getInvoice()

Usage
const Sellapp = require("sellapp-node");
const API = new Sellapp.API("YOUR_API_KEY");

API.invoicesv1.getInvoice("6666").then((res) => {
    console.log(res)
})


getOrderDeliverables()

Usage
const Sellapp = require("sellapp-node");
const API = new Sellapp.API("YOUR_API_KEY");

API.invoicesv1.getOrderDeliverables("666").then((res) => {
    console.log(res);
}).catch((err) => {
    console.log(err);
});

createInvoice()

Usage
const Sellapp = require("sellapp-node");
const API = new Sellapp.API("YOUR_API_KEY");

API.invoicesv1.createInvoice({
	"customer_email": "john@doe.com",
	"total": "4.99",
	"payment_method": "PAYPAL",
	"products": {
		"1210": {
			"quantity": 5,
			"additional_information": [
				{
					"accept_terms_and_conditions": true,
					"read_terms_and_conditions_before_accepting": true
				}
			],
			"fill_once": true
		}
	}
}).then((res) => {
    console.log(res); 
}).catch((err) => {
    console.log(err);
});

issueReplacement()

Usage
const Sellapp = require("sellapp-node");
const API = new Sellapp.API("YOUR_API_KEY");

API.invoicesv1.issueReplacement("666", {
  "listings": [
    1,
    2,
    3
  ]
}).then((res) => {
    console.log(res)
})

createPayment()

Usage
const Sellapp = require("sellapp-node");
const API = new Sellapp.API("YOUR_API_KEY");

API.invoicesv1.createPayment("4982").then((res) => {
    console.log(res)
})

Last updated