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).
This endpoint currently requires session authentication; Personal Access Token scope support is in progress.
Two steps:
- Upload the file as multipart form data to
POST /api/store-filewith fieldsfile(the.csvor.txt, max ~7 MB) anddestination=smo_invoices. The response containsstored_name. - 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
- 200
- 400
- 401
- 403
- 422
- 429
OK
Response Headers
Bad Request
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.