Create new document
POST
https://restapidev.payplus.co.il/api/v1.0/books/docs/new/{docType}סביבה
כותרות (Headers)
stringחובה
API Key
stringחובה
Secret Key
פרמטרים בנתיב
stringחובה
Type of document to create
גוף הבקשה
| שדה | סוג | תיאור |
|---|---|---|
tags | string[] | Array of arbitrary strings used to catalogue/ tag documents |
draft | boolean | Create a draft document. No actual document will be generated if set to true |
items | object[] | |
items[].name | string | Item/product name |
items[].price | integer (int) | |
items[].barcode | string | |
items[].quantity | integer (int) | |
items[].currency_code | string | EX: ILS |
items[].discount_type | string | 'percentage' OR 'amount' |
items[].vat_type_code | string | If omitted, document level value will be used instead. |
items[].discount_value | integer (int) | See previous entry for more details |
items[].conversion_rate | integer (int) | Required if currency code is specified and is different from the base currency. |
items[].is_summary_item | boolean | Show item as a summary line |
preview | boolean | Get a preview of the document. No document will be generated if set to true |
vatType | string | If omitted, configuration values will be used instead |
customer | object | |
customer.city | string | |
customer.name | string | Name, to be displayed as the document recipient. Required unless existing valid customer uuid provided |
customer.emailחובה | string | Shall be displayed on the document. Additionally, if provided, an email message containing the original document will be dispatched to this address. |
customer.phone | string | If specified, this number will appear on the document. Also the phone number to send an SMS message if applicable |
customer.paying_vat | boolean | |
customer.vat_number | string | Recipient vat number/ID to be displayed on the document |
customer.country_ISO | string | EX: IL |
customer.postal_code | string | |
customer.street_name | string | |
customer.balance_name | string | Will be used as the balance name for journal exports |
customer.customer_uid | string | Reference code of a previously created customer. If specified, document customer information shall be taken from the customer record |
customer.street_number | string | |
customer.create_customer | boolean | If true, will attempt to create a new customer from the provided information. If customer with similar details already exists, it will be used instead and all missing details will be added from th |
doc_date | string | string Document issue date. Format: YYYY-MM-DD. Defaults to current da |
language | string | |
payments | object[] | |
payments[].rate | integer (int) | |
payments[].amount | number | Total payment amount |
payments[].payments | string | Payment type: credit-card. Number of payments |
payments[].card_type | string | payment type: credit-card |
payments[].bank_number | string | payment type: payment-check,bank-transfer |
payments[].description | string | Payment description |
payments[].four_digits | string | Payment type: credit-card/ payment-app. Last four digits of the credit card number |
payments[].payment_app | string | payment type: payment-app |
payments[].check_number | string | payment type: payment-check |
payments[].payment_date | string | Date in the format YYYY-MM-DD. Defaults to whatever was set for doc_date |
payments[].payment_type | string | Type of the payment being submitted |
payments[].branch_number | string | |
payments[].currency_code | string | See currencies for more information |
payments[].first_payment | string | Payment type: credit-card. First payment amount |
payments[].payer_account | string | |
payments[].account_number | string | payment type: payment-check,bank-transfer |
payments[].transaction_type | string | payment type: credit-card |
payments[].other_payment_type | string | payment type: other |
payments[].transaction_number | string | payment type: paypal |
payments[].subsequent_payments | string | Payment type: credit-card. The amount of the subsequent payments |
close_doc | string | UUID of a previously created document. If supplied, the new document will also close the document indicated by the UUID |
more_info | string | nullable Optional identifier. Will appear at the bottom of the document |
brand_uuid | string | If multiple brands exist, specify brand uuid to create document associated with a specific brand. If none provided, the default brand |
cancel_doc | string | UUID of a previously created document. If supplied, the new document will also cancel the document indicated by the UUID |
totalAmount | integer (int) | Total sum of the document. |
callback_url | string | If valid url is specified, payplus will send a notification to the specified URL upon successful document creation |
currency_code | string | |
prevent_email | boolean | If true, will not send |
vat_percentage | integer (int) | Vat percentage to use for calculations. If omitted, configuration values will be used instead |
conversion_rate | number (float) | If document currency specified is not ILS, this value will be used as the conversion rate for all the prices into the base currency. |
transaction_uuid | string | UUID of a PayPlus transaction |
send_document_sms | boolean | send_document_sms |
unique_identifier | string | Arbitrary, unique string. If supplied, the system will refuse further creation attempts if it finds a duplicate, ensuring that this value will always be unique per document. |
autocalculate_rate | boolean | If the conversion rate parameter is omitted, determine conversion rate automatically |
hide_base_currency | boolean | Whether or not to hide the base currency (usually ILS) in a foreign currency document. |
send_document_email | boolean | Send email upon document creation. Will override the whatever's defined in your account |
עריכת גוף הבקשה
תשובות
200 200
| שדה | סוג | תיאור |
|---|---|---|
brand | object | |
brand.name | string | |
brand.uuid | string | |
docUID | string | |
number | string | |
barcode | string | |
customer | object | |
customer.uuid | string | |
customer.email | string | |
customer.phone | string | |
customer.vat_number | string | |
customer.subject_code | string | |
customer.customer_name | string | |
doc_date | string | |
doc_type | string | |
more_info | any | |
currency_code | string | |
customer_uuid | string | |
copyDocAddress | string | |
originalDocAddress | string | |
validDocumentGenerated | boolean | |
total_items_base_currency | integer |