Read one of the Seller's official Invoices
شرح نقطههای پایانی در مرجع API به انگلیسی است؛ واژهها و قالبها همان است که در پاسخها میبینید.
نمونهها نشانی محیط اصلی را دارند، اما «امتحان کنید» همان درخواست را فقط به محیط آزمایشی میفرستد. کلید محرمانه شما نه در این سایت ذخیره میشود و نه در گزارشهای آن میآید.
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.
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.
invoiceId*stringThe id of the Invoice.
uuidThe Invoice.
application/json- response
An official Invoice of the caller's Seller with its lines, never with the Buyer's identity.
asBusiness?booleanWhether 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?stringWhen its cancellation was registered.
date-timeid*stringThe id of the Invoice.
uuidissuedAt*stringWhen the Invoice was issued.
date-timekind*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""COMMISSION""RETURN"lines*array<>The Invoice's lines, in order.
month?integerThe Persian month a Commission Invoice covers, 1 to 12.
int32number*integerChasbi's own number of the Invoice, shown to people.
int64orderNumber?integerThe Order's number, on a Buyer's Invoice and a return Invoice.
int64paidTotal?integerOn 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.
int64part?integerWhich part of its month a Commission Invoice is, from 1.
int32registeredAt?stringWhen the Invoice was registered.
date-timeroundingDifference*integerThe 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.
int64shipmentPosition?integerThe Shipment's position in its Order, on a Buyer's Invoice and a return Invoice.
int32status*stringWhere 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?stringThe 22-character tax number, once the Taxpayers System registered the Invoice.
total*integerThe Invoice's total with VAT, in Rial.
int64vat*integerThe VAT in the total, in Rial.
int64waiting*booleanWhether it waits for the caller: never.
year?integerThe Persian year a Commission Invoice covers.
int32curl -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}