Skip to main content

Import ShipMyOrders Invoice

POST 

/api/shipmyorders/invoices

Imports a ShipMyOrders invoice from a CSV file you have already uploaded, then processes it straight away (see Process ShipMyOrders Invoice).

Not yet available to API tokens

This endpoint currently requires session authentication; Personal Access Token scope support is in progress.

Two steps:

  1. Upload the file as multipart form data to POST /api/store-file with fields file (the .csv or .txt, max ~7 MB) and destination=smo_invoices. The response contains stored_name.
  2. Call this endpoint with that stored_name.

File format: the ShipMyOrders invoice export — no header row, nine quoted columns per line: record type (ignored), invoice number, date (m/d/Y), reference, description, amount (unit price), quantity, subtotal, tax (may be empty). Example line: "NV","SIBER10495","6/3/2024","SO-10231.1","Fulfillment Fee","5.00","1","5.00","0.10". The invoice number comes from the first line, the invoice date is the latest line date, and the total is the sum of subtotal + tax.

Body: stored_name (string, required).

The uploaded file is removed after the import attempt. Errors return 400: File not exists (unknown stored_name), The file is empty, or Invoice already exists (the invoice number was imported before).

Returns the imported invoice in the same shape as Get ShipMyOrders Invoice.

Requires the integrations.update permission.

Authentication: Bearer token (Personal Access Token).

Request​

Responses​

OK

Response Headers
    Content-Type