List the Seller's official Invoices
شرح نقطههای پایانی در مرجع API به انگلیسی است؛ واژهها و قالبها همان است که در پاسخها میبینید.
نمونهها نشانی محیط اصلی را دارند، اما «امتحان کنید» همان درخواست را فقط به محیط آزمایشی میفرستد. کلید محرمانه شما نه در این سایت ذخیره میشود و نه در گزارشهای آن میآید.
Returns a page of the caller's Seller's Invoices in one tab: IN_PROGRESS, the default, while the Taxpayers System hasn't registered them, REGISTERED, or CANCELLED, the newest first, then by id. A NEEDS_OPERATOR Invoice reads IN_PROGRESS, and a withdrawn one isn't listed. kind keeps only the Buyers' Invoices or only the Commission Invoices. When more follow, next is the cursor of the next page; send it back with the same tab, kind and limit. A malformed cursor, or one made for another list or filter, is VALIDATION_FAILED with TYPE_MISMATCH.
Nothing about an Invoice waits for a Seller, so waiting=true holds no Invoice. With ids, from 1 to 50, the page holds exactly those of the caller's Invoices, in that order. It never carries the Buyer: no company name, national ID or economic code; a Buyer's Invoice shows only asBusiness. The call needs a token of the chasbi realm whose Account holds the Seller power FINANCE: the owner, or a Seller Member with the role MANAGER or FINANCE; or an access token of the chasbi-partners realm for an API Key of the Seller with the role MANAGER or FINANCE. Any other token is refused with ACCESS_DENIED.
oauth2AuthorizationBearer <token>An access token of the chasbi-partners realm, made by the client-credentials grant with an API Key's client id and secret in the Authorization: Basic header. It lives five minutes and comes with no refresh token: ask for a new one when it ends.
tab?stringWhich tab.
"IN_PROGRESS""IN_PROGRESS""REGISTERED""CANCELLED"waiting?booleanLists what waits for the caller, which is none: the page is empty.
falsekind?stringOnly this kind of Invoice: BUYER, the Buyer's Invoice of a Shipment, RETURN, the return Invoice of goods a Return Request brought back, which refers to the Buyer's Invoice, or COMMISSION, Chasbi's Invoice to the Seller for its Commission.
"BUYER""CANCELLATION""COMMISSION""RETURN"ids?array<>Exactly these Invoices, from 1 to 50, in this order, whatever their tab; every other filter, cursor and limit are left aside, and there is no next. An id the caller may not see is left out.
1 <= items <= 50cursor?stringThe next of the page before, which is opaque. Leave it out for the first page.
^[A-Za-z0-9_-]+$limit?integerThe most items the page holds, from 1 to 50.
int321 <= value <= 5020A page of Invoices.
application/json- response
A page of the caller's Invoices in one tab.
invoices*array<>The page's Invoices.
next?stringAn opaque token to send as cursor for the next page, with the same limit. Absent on the last page.
curl -X GET 'https://api.chasbi.com/v1/me/seller/invoices'{ "invoices": [ { "asBusiness": true, "cancelledAt": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "issuedAt": "2019-08-24T14:15:22Z", "kind": "BUYER", "month": 0, "number": 0, "orderNumber": 0, "paidTotal": 0, "part": 0, "registeredAt": "2019-08-24T14:15:22Z", "roundingDifference": 0, "shipmentPosition": 0, "status": "IN_PROGRESS", "taxNumber": "string", "total": 0, "vat": 0, "waiting": true, "year": 0 } ], "next": "string"}