Issue identical invoices
Issue one invoice to many recipients.
1 | POST /identical/ |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | { "name": "Membership fee 2016, Senior", "comment": "Yearly invoice for senior membership", "invoice": { "invoiceText": "Membership fee 2016", "invoiceDate": "2016-03-10", "orderDate": "2016-03-10", "dueDate": "2016-03-24", "orderNumber": "SK-123456", "ourReference": "", "accountNumber": "12345678901", "items": [{ "number": 1, "quantity": 1, "productCode": "75", "description": "Membership fee 2016", "unitPrice": 7500.00, "discount": 0.00, "taxRate": 25 }] }, "recipients": [{ "number": 2 }, { "number": 7 }], "shipment": { "preferred": "preference|email|paper", "sms": { "message": "Your sms message here (link to the invoice will be appended to your message)" } } } |
* required fields
*"name":
- 255 characters- Internal shipment name for your usage.
"comment":
- 64 Kb- Will not be printed on any invoices or be viewable by others.
- No default value, ignored if omitted
*"invoice": {Object}
"invoiceText":
- 105 characters- This is a line that will be printed out on the invoice right above the invoice lines. If this is omitted, and permanent invoice text is set on the account, that text will be used.
"invoiceDate":
- yyyy-mm-dd- The invoice date.
- Default value, if omitted,
today()
"orderDate":
- yyyy-mm-dd- Specifies when the order took place. Usually the same date as the invoice date, but then it is common to omit this element.
- No default value, ignored if omitted
"dueDate":
- yyyy-mm-dd- The invoice due date. Default value, if omitted: number of due days specified on recipient. If not specified on recipient, default due days from account, if not specified on account, fallback to 14 days.
dueDate
can’t be beforeinvoiceDate
"orderNumber":
- 30 characters- Text field on the invoice that specifies the originator’s order number
- No default value, ignored if omitted
"ourReference":
- 30 characters- Originator’s reference
- No default value, ignored if omitted
yourReference
will be taken from the default your reference on each recipient. If not set on a recipient, the field on the invoice will be empty and the invoice will be ineligible for sending by EHF.
"accountNumber":
- 13 characters- Originator’s accountNumber
- If not provided, the main account number of recipient will be used.</td>
*"items" [Array]
"number":
- 1-18 (inclusive)- The first line has the number 1, the last line has the number 18. This is simply the line’s placement on the invoice. If this is omitted, the lines will be in the order that they appear in JSON. Either all are set, or none are set.
*"quantity":
- Positive decimal (maximum 6 characters, including punctuation marks and signs)- Quantity is used together with the
unitPrice
to find the line total, which means that (quantity
*unitPrice
) -discount
+taxRate
is equal to the line total.
- Quantity is used together with the
"productCode":
- 9 characters- Used to distinguish between the various products that are invoiced, this means that you can run reports in the meantime that tell how much you have invoiced of a given product. A product will be created in the product list when specifying a product code. If it already exists a product with this product code, the product will NOT be updated.
- No default value, ignored if omitted
*"description":
- 75 characters- Describe the service/goods you are invoicing.
*"unitPrice":
- Decimal - maximum 9 characters, including punctuation marks and signs- See
"quantity"
for further explanation
- See
"discount":
- Positive decimal - maximum 5 characters, including punctuation marks. Must be >= 0 and <= 100- If omitted, the line rebate is not set at all. In order to specify a 0% discount, this value must be set to 0. A valid value for this element is a decimal number from 0 to 100. Note that the % sign must NOT be included and will generate an error message. See
"quantity"
for further explanation.
- If omitted, the line rebate is not set at all. In order to specify a 0% discount, this value must be set to 0. A valid value for this element is a decimal number from 0 to 100. Note that the % sign must NOT be included and will generate an error message. See
"taxRate":
- Integer - maximum 2 figures.- If omitted, then the current VAT rate will be used, which is 25% as of today’s date (March 17, 2016). This rate can be changed by the authorities and will be automatically updated by SendRegning. See
"quantity"
for further explanation.
- If omitted, then the current VAT rate will be used, which is 25% as of today’s date (March 17, 2016). This rate can be changed by the authorities and will be automatically updated by SendRegning. See
*"recipients": [Array]
"number":
- Maximum 11 figures.- The receiver of the invoice, identified by the SendRegning auto generated recipient number.
- This mean all recipients must exists in SendRegning before you can include them as recipient in an identical shipment.
"shipment": {Object}
"preferred":
- “preference”, “email” or “paper”- If you omit the shipment object, we will look at each recipient’s preference for preferred shipment and use that value deciding how to send the invoice.
- If you specify email in the shipment, we will send the invoice to recipients with a registered email address. Recipients without an email address will receive the invoice on paper (Recipient preferred shipment is totally ignored).
- If you specify paper in the shipment, all recipient will get the invoice on paper. We will not look at the recipient preferred shipment value at all.
"sms": {Object}
"message":
- Maximum 140 characters (20 reserved for url to the invoice)- The sms will of course only be sent to recipient with a registered mobile number.
"message"
is required when the"sms"
object is present.
Example of the absolutely smallest JSON object that can be transferred for sending out an identical shipment
1 2 3 4 5 6 7 8 9 10 11 12 13 | { "name": "Membership fee 2016, Senior", "invoice": { "items": [{ "quantity": 1, "description": "Membership fee 2016", "unitPrice": 7500.00 }] }, "recipients": [{ "number": 2 }] } |
Response
1 2 | HTTP/1.1 201 Created Location: https://www.sendregning.no/identical/{number} |