Documents

Import an invoice

The caller sends the lines it confirmed, not the lines the parser read. A line with no ASIN does not go in. Every item of the order goes back through the profit calculation, because the order level costs are spread over all of them. The plan must carry the feature invoice_parsing.

One document goes into the order once. The import adds the quantity of a line to the item that already carries that ASIN, so a second call would count the same goods twice. A document that carries `applied_at` answers 409, and a retry cannot make it work.
post/api/v1/documents/{id}/import

Request

  • Base URL: https://app.sellerassistant.app (the document declares no server; this is the origin it was published from)
  • URL: https://app.sellerassistant.app/api/v1/documents/{id}/import
  • Auth: one of:
    • API key in query parameter api_key
    • API key in header X-Api-Key

Path parameters

idinteger required
Example:5

Request body

Example request

{
  "items": [
    {
      "asin": "B08N5WRWNW",
      "quantity": 12,
      "unit_price": 9.5
    }
  ]
}

Response

What the import wrote

Example response

{
  "data": {
    "purchase_order_id": 42,
    "imported_count": 12,
    "costs_applied": true
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.