Close
logo

Creating a Reseller Order

Git RepositoryEdit on Github
Last update: 2 years ago by luigi mangaReading time: 2 min

Similarly to importing orders from a channel, we recommend using the manual-sale.json endpoint for importing orders, rather than combining POST requests across a number of different endpoints to construct and process the sale in Onport.

The POST https://api.jetti.io/api/channels/:id/manual-sale.json endpoint allows you to bundle the line item, customer and order details into a single API payload. You can also use this payload for both sending updates about an existing orders, as well as sending through the order for the first time.

It is key to set the "resellerId" in the saleDefaults.

{
"externalId": "1234",
"saleDefaults": {
"reference": "10001"
},
"customer": {
"firstName": "Test",
"lastName": "user",
"email": "test@user.com"
},
"lineItems": [{
"externalId": "line-external-id",
"name": "line-item-name",
"quantity": 10,
"price": 20,
"taxable": true,
"variant": {
"externalId": "123"
},
"properties": [{
"key": "property-key",
"value": "property-value"
}]
}],
"shipping": [{
"code": "shipping-code",
"name": "shipping-name",
"serviceLevel": "shipping-service-level",
"price": 10
}],
"saleDefaults": {
"billingFirstName": "Test",
"billingLastName": "Customer",
"billingAddressLineOne": "123 N University Blvd",
"billingAddressLineTwo": "111",
"billingCity": "Bari",
"billingState": "BA",
"billingZip": "11000",
"billingCountry":"IT",
"shippingFirstName": "Test",
"shippingLastName": "Customer",
"shippingAddressLineOne": "123 N university",
"shippingAddressLineTwo": "111",
"shippingCity": "Rome",
"shippingCountry": "IT",
"shippingState": "BA",
"shippingZip": "11000",
"notes": "Test",
"locked": 0,
"resellerId": 1233
}
}
๐Ÿ”ƒ 3PL โ€” Previous
Vendor Based 3PL
Next โ€” ๐Ÿ”ƒ Reseller
Creating a Reseller Account