Close
logo

Sending Orders

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

In order to send orders to an API endpoint, it is necessary to access the Orders tab of the Dropship Providers settings and select WebHooks as partial order automation method.

After doing that, you can enter the URL of the endpoint Onport will contact to send order information.

When selected, Onport will send dropship providers an JSON payload as a POST request containing details of the dropship purchase order. Just enter the API path to send the payload to - you may want to test this first on a site like Hookbin.

Below is a sample JSON body for a purchase order.

{
"packingSlip": "https://s3.amazonaws.com/jetti-development/258.pdf",
"dropshipments": [
{
"labelFileFormat": "pdf",
"labelUrl": "https://shippo-delivery-east.s3.amazonaws.com/7a1649e0f8724f3fbd5f1ee914f6a3dd.pdf?Signature=ybrT7WlnCp0%2FMU3eTmNgY8aHThE%3D&Expires=1551827128&AWSAccessKeyId=AKIAJGLCC5MYLLWIG42A",
"trackingUrl": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=92055901755477000000000015",
"trackingCompany": "USPS",
"trackingNumber": "92055901755477000000000015",
"id": 419,
"packingDepth": 0,
"packingWidth": 0,
"packingHeight": 0,
"grams": 0,
"price": 0
}
],
"purchaseItems": [
{
"variant": {
"inventory_feed_variants": [],
"images": [
"https://cdn.shopify.com/s/files/1/1022/4011/products/DB05_CamoMarbledSandals.jpeg?v=1444655712"
],
"vendorSku": null,
"barcode": null,
"sku": "DB5-CAM-9",
"id": 457,
"costPrice": 0
},
"quantityInvoiced": 1,
"inventoryProcessed": 1,
"quantity": 1,
"name": "Doc Black Camo Sandal",
"variantId": 457,
"companyId": 1,
"id": 316,
"subtotal": 0,
"price": 0,
"tax": 0,
"returnStatus": "notReturned",
"invoiceStatus": "invoiced",
"inventoryStatus": "received",
"isComponent": false
}
],
"sale": {
"customer": {
"phone": "+447824449752",
"lastName": "Smith",
"firstName": "Jack",
"email": "jack@jetti.io"
},
"dateOrdered": "2018-03-05T23:05:09.000Z",
"externalId": null,
"reference": "10234",
"id": 254,
"combinedTaxRate": 0,
"tax": 0,
"discounts": 0,
"subtotal": 0,
"total": 0
},
"purchase": {
"dropship_provider_id": 1,
"company_id": 1,
"purchase_status_id": null,
"updatedAt": "2018-03-05T23:05:12.599Z",
"createdAt": "2018-03-05T23:05:12.599Z",
"reminderLastSent": null,
"reminderSent": false,
"vendorEndpointHeaders": null,
"vendorEndpointResponse": null,
"vendorEndpointFormat": null,
"vendorReceivedReference": null,
"vendorReceivedId": null,
"vendorReceivedStatus": "notSent",
"vendorReference": null,
"approved": true,
"dropshipNotes": null,
"isDropship": true,
"purchaseType": "automated_dropship",
"lastGoodsReceiptReference": 0,
"lastDropshipmentReference": 1,
"lastPurchaseInvoiceReference": 1,
"files": null,
"purchaseStatusId": null,
"saleId": 254,
"purchaseId": null,
"dropshipProviderId": 1,
"vendorId": null,
"warehouseId": null,
"priceListId": 2,
"receiverZip": null,
"receiverCountry": null,
"receiverState": null,
"receiverCity": null,
"receiverAddressLineTwo": null,
"receiverAddressLineOne": null,
"receiverName": null,
"shippingZip": "94105",
"shippingCountry": "US",
"shippingState": "CALIFORNIA",
"shippingCity": "San Francisco",
"shippingAddressLineTwo": null,
"shippingAddressLineOne": "181 Fremont St",
"shippingName": "Jack Inc",
"billingZip": "94105",
"billingCountry": "US",
"billingState": "CA",
"billingCity": "San Francisco",
"billingAddressLineTwo": null,
"billingAddressLineOne": "181 Fremont St",
"billingName": "jetti-imac-2",
"billingAddressMessage": null,
"invalidBillingAddress": false,
"shippingAddressMessage": false,
"invalidShippingAddress": false,
"shippingLastName": null,
"shippingFirstName": null,
"billingLastName": null,
"billingFirstName": null,
"tags": null,
"customerReference": null,
"notes": null,
"cancellationStatus": "none",
"returnStatus": "notReturned",
"invoiceStatus": "invoiced",
"paymentStatus": "notPaid",
"countyTaxLocation": null,
"cityTaxLocation": null,
"stateTaxLocation": null,
"districtTaxRate": null,
"countyTaxRate": null,
"cityTaxRate": null,
"stateTaxRate": null,
"quantity": 0,
"weight": 0,
"taxIncluded": false,
"taxShipping": true,
"dateOrdered": "2018-03-05T23:05:12.000Z",
"cancelledAt": null,
"cancelled": false,
"finalized": true,
"locked": false,
"reference": "10234-01",
"adjustmentReasonId": null,
"companyId": 1,
"id": 258,
"combinedTaxRate": 0,
"tax": 0,
"discounts": 0,
"subtotal": 0,
"total": 0,
"inventoryStatus": "shipped"
}
}

Line Item Properties

In some businesses, such as Gifting, it may be important to pass Line Item Properties to the vendor for customizations. This may be the type of wrapping, a gift note or other custom values.

While sending an order, Onport is able to pass this information via properties property which is set for each Purchase Item.

Below is an example portion of the payload containing the property:

"properties": [
{
"key": "Gift Note",
"value": "Greetings from UK"
}
]
๐Ÿ’ป Vendor Integration โ€” Previous
Importing Inventory
Next โ€” ๐Ÿ’ป Vendor Integration
Importing Shipment Details