رفتن به محتوا
چسبیتوسعه‌دهندگان
فاکتورهای رسمی

List the Seller's official Invoices

شرح نقطه‌های پایانی در مرجع API به انگلیسی است؛ واژه‌ها و قالب‌ها همان است که در پاسخ‌ها می‌بینید.

نمونه‌ها نشانی محیط اصلی را دارند، اما «امتحان کنید» همان درخواست را فقط به محیط آزمایشی می‌فرستد. کلید محرمانه شما نه در این سایت ذخیره می‌شود و نه در گزارش‌های آن می‌آید.

GET
/v1/me/seller/invoices

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.

احراز هویت

oauth2
headerAuthorizationBearer <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?string

Which tab.

پیش‌فرض"IN_PROGRESS"
مقدار در"IN_PROGRESS""REGISTERED""CANCELLED"
waiting?boolean

Lists what waits for the caller, which is none: the page is empty.

پیش‌فرضfalse
kind?string

Only 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 <= 50
cursor?string

The next of the page before, which is opaque. Leave it out for the first page.

الگو^[A-Za-z0-9_-]+$
limit?integer

The most items the page holds, from 1 to 50.

قالبint32
بازه1 <= value <= 50
پیش‌فرض20

بدنه پاسخ

A page of Invoices.

application/json
  1. response

A page of the caller's Invoices in one tab.

invoices*array<>

The page's Invoices.

next?string

An 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"}