Financial Documents Configuration API (1.0)
Download OpenAPI specification:Download
Use this API to configure financial documents generated via the NewStore platform for your business operations. This includes:
- Configuring the format of the number generated in invoice documents during checkout.
- Specifying the address information that is included in financial documents generated for your business.The API to request, add and change configurations for financial documents.
For more information, see the configuration guide.
Get financial documents configuration
Retrieves the current configuration set up to generate financial documents for your business. The response payload also includes metadata such as who updated the configuration and when.
For more information, see the parent resource.
Authorizations:
Responses
Response samples
- 200
{- "value": {
- "accounting_settings": {
- "accounting_entities": [
- {
- "accounting_address": {
- "address_line_1": "5600 Argosy Circle",
- "city": "Huntington Beach",
- "country": "United States",
- "country_code": "US",
- "name": "Retailer, Inc.",
- "state": "CA",
- "zip_code": "92649"
}, - "id": "US"
}
]
}, - "generate_external_invoice_id_format": "{tenant}{country_code}{unique_number:08d}"
}, - "updated_by": "user@retailer.com",
- "updated_at": "2021-11-04T10:11:44Z"
}
Create or replace financial documents configuration
Use this method to completely replace or create the current configuration set up to generate financial documents for your business. For more information, see the parent resource.
Authorizations:
Request Body schema: application/json
The updated config value
generate_external_invoice_id_format required | string Describes the generation of the Invoice ID (https://docs.python.org/3.4/library/functions.html#format) keys available: {tenant} - first 3 chars of the tenant environment value, {country_code} - tenant's country code, {unique_number} - a unique number generated per tenant |
required | object |
Responses
Request samples
- Payload
{- "accounting_settings": {
- "accounting_entities": [
- {
- "accounting_address": {
- "address_line_1": "5600 Argosy Circle",
- "city": "Huntington Beach",
- "country": "United States",
- "country_code": "US",
- "name": "Retailer, Inc.",
- "state": "CA",
- "zip_code": "92649"
}, - "id": "US"
}
]
}, - "generate_external_invoice_id_format": "{tenant}{country_code}{unique_number:08d}"
}
Response samples
- 200
{- "value": {
- "accounting_settings": {
- "accounting_entities": [
- {
- "accounting_address": {
- "address_line_1": "5600 Argosy Circle",
- "city": "Huntington Beach",
- "country": "United States",
- "country_code": "US",
- "name": "Retailer, Inc.",
- "state": "CA",
- "zip_code": "92649"
}, - "id": "US"
}
]
}, - "generate_external_invoice_id_format": "{tenant}{country_code}{unique_number:08d}"
}, - "updated_by": "user@retailer.com",
- "updated_at": "2021-11-04T10:11:44Z"
}
Update financial documents configuration
Updates the current configuration set up to generate financial documents for your business. For more information, see the parent resource.
Authorizations:
Request Body schema: application/json
Configuration options to be updated
generate_external_invoice_id_format required | string Describes the generation of the Invoice ID (https://docs.python.org/3.4/library/functions.html#format) keys available: {tenant} - first 3 chars of the tenant environment value, {country_code} - tenant's country code, {unique_number} - a unique number generated per tenant |
required | object |
Responses
Request samples
- Payload
{- "generate_external_invoice_id_format": "{tenant}{country_code}{unique_number:08d}"
}
Response samples
- 200
{- "value": {
- "accounting_settings": {
- "accounting_entities": [
- {
- "accounting_address": {
- "address_line_1": "5600 Argosy Circle",
- "city": "Huntington Beach",
- "country": "United States",
- "country_code": "US",
- "name": "Retailer, Inc.",
- "state": "CA",
- "zip_code": "92649"
}, - "id": "US"
}
]
}, - "generate_external_invoice_id_format": "{tenant}{country_code}{unique_number:08d}"
}, - "updated_by": "user@retailer.com",
- "updated_at": "2021-11-04T10:11:44Z"
}