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

Read one of the Seller's official Invoices

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

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

GET
/v1/me/seller/invoices/{invoiceId}

Returns the Invoice with its lines, each with the Agency Contract number it carries. It never carries the Buyer: no company name, national ID or economic code; a Buyer's Invoice shows only asBusiness. Another Seller's Invoice, a cancellation and a withdrawn Invoice are 404 INVOICE_NOT_FOUND. 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.

پارامترهای مسیر

invoiceId*string

The id of the Invoice.

قالبuuid

بدنه پاسخ

The Invoice.

application/json
  1. response

An official Invoice of the caller's Seller with its lines, never with the Buyer's identity.

asBusiness?boolean

Whether the Invoice is the business's that ordered, issued as type 1 with its economic code; false for a consumer's Order, and for an Invoice the Operator issued without the buyer's details. The business's identity is never shown to a Seller. Absent on a Commission Invoice.

cancelledAt?string

When its cancellation was registered.

قالبdate-time
id*string

The id of the Invoice.

قالبuuid
issuedAt*string

When the Invoice was issued.

قالبdate-time
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""COMMISSION""RETURN"
lines*array<>

The Invoice's lines, in order.

month?integer

The Persian month a Commission Invoice covers, 1 to 12.

قالبint32
number*integer

Chasbi's own number of the Invoice, shown to people.

قالبint64
orderNumber?integer

The Order's number, on a Buyer's Invoice and a return Invoice.

قالبint64
paidTotal?integer

On a Buyer's Invoice that has its lines, what the Buyer paid for its Shipment, its lines and its shipping fee: total plus roundingDifference, in Rial. Absent on a cancellation, a Commission Invoice, and a Buyer's Invoice still without its lines.

قالبint64
part?integer

Which part of its month a Commission Invoice is, from 1.

قالبint32
registeredAt?string

When the Invoice was registered.

قالبdate-time
roundingDifference*integer

The Rial that splitting each paid price into an amount and its VAT, both whole Rial with the VAT truncated, leaves outside the Invoice: at most one per line, 0 when none. A Buyer's Invoice's total and this make what its Shipment was paid.

قالبint64
shipmentPosition?integer

The Shipment's position in its Order, on a Buyer's Invoice and a return Invoice.

قالبint32
status*string

Where the Invoice stands for the Seller: IN_PROGRESS until the Taxpayers System registers it, then REGISTERED, or CANCELLED once its cancellation is registered.

مقدار در"IN_PROGRESS""REGISTERED""CANCELLED"
taxNumber?string

The 22-character tax number, once the Taxpayers System registered the Invoice.

total*integer

The Invoice's total with VAT, in Rial.

قالبint64
vat*integer

The VAT in the total, in Rial.

قالبint64
waiting*boolean

Whether it waits for the caller: never.

year?integer

The Persian year a Commission Invoice covers.

قالبint32
نمونه درخواست
curl -X GET 'https://api.chasbi.com/v1/me/seller/invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08'
نمونه پاسخ
{  "asBusiness": true,  "cancelledAt": "2019-08-24T14:15:22Z",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "issuedAt": "2019-08-24T14:15:22Z",  "kind": "BUYER",  "lines": [    {      "agencyContractNumber": "string",      "amount": 0,      "paid": 0,      "position": 0,      "quantity": 0,      "roundingDifference": 0,      "taxItemCode": "string",      "title": "string",      "total": 0,      "unitAmount": 0,      "vat": 0,      "vatPercent": 0    }  ],  "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}