Skip to main content

Create invoice asynchronously

POST 

/v2/ob/invoices

Create invoice asynchronously and return tracking identifier to fetch processing status and result. Submitted request will be validated, added to queue and processed enventually.

Request

Body

    invoice_data

    object

    required

    consumer

    object

    Customer information

    code string

    Possible values: <= 255 characters

    Customer code

    name string

    Possible values: <= 255 characters

    Customer name

    tax_code string

    Possible values: <= 14 characters

    Customer tax code

    address string

    Possible values: <= 255 characters

    Customer address

    citizen_identification string

    Possible values: <= 12 characters

    Customer citizen identification card

    phone string

    Possible values: <= 20 characters

    Customer phone number

    buyer_name string

    Possible values: <= 255 characters

    Buyer's name

    bank_account string

    Possible values: <= 255 characters

    Buyer's bank account information

    invoice_template_id uuidrequired

    Possible values: Value must match regular expression [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}

    Invoice template Id

    invoice_lines

    object[]

    required

    Detail product information

  • Array [

  • code string

    Possible values: <= 255 characters

    Product code

    name stringrequired

    Possible values: <= 500 characters

    Product name

    unit stringrequired

    Possible values: <= 255 characters

    Unit of Product

    price numberrequired

    Product price

    quantity numberrequired

    Number of products purchased

    tax_amount number

    Total tax payable

    vat_rate VatRate (string)

    Possible values: [UNDECLARED, NONE, ZERO, FIVE, EIGHT, TEN]

    Tax type: NONE | UNDECLARED | ZERO | FIVE | EIGHT | TEN

    amount number

    Amount = (price * quantity) - discount_amount

    discount_amount number

    Discount money

    promoted boolean

    Is promotional item

  • ]

  • has_tax_authorities booleanrequired

    Default value: true

    Is an invoice with a tax authority code

    payment_method PaymentMethod (string)

    Possible values: [CASH, BANK_TRANSFER, UNKNOWN]

    The method used to pay the invoice: UNKNOWN | BANK_TRANSFER | CASH

    submit_to_tax_request

    object

    recipients string[]

    Email of invoice recipients

    need_to_send_mail booleanrequired

    Default value: true

    Need to send mail for buyer

    submit_to_tax booleanrequired

    Default value: true

    Automation submit to tax after create invoice

Responses

OK

Schema

    request_id uuid

    Possible values: Value must match regular expression [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}

    Unique identifier of submitted request, is used for tracking processing status and fetch result of asynchronous processing

    status ProcessStatus (string)

    Possible values: [FAILED, SUCCESS, NEW]

    Submitted request processing status

Loading...