Upsert Transaction
PUT
/v1/transactions/source/{source}/externalId/{externalId}Update or Insert Transaction by External ID and source
Request
External ID
Transaction Source (should be [1-9])
the attribute designed to receive a unique identifier provided by API consumers themselves (e.g. pass your own ID)
a single digit which identifies your different stores, checkout solutions, marketplaces, etc. defined by the API consumers (to avoid external id duplications)
The name of the document, as shown in the ERP systems
The price of one unit, can be positive and negative
The quantity of the units, must be positive
The total price of the unit prices time the quantity, can be positive and negative, value is before discount and sales tax. If totalPrice exist it will override the unitPrice and quantity calculation
The tax culculation will be using manualSalesTaxRate value when manualSalesTax is True. default value is False
In correlation to the value of manualSalesTax, this numeric value will be used to calculate the sales tand tax amount
The discount of the line items, must be positive
Indicates whether tax is included in the total items price (true) or added as a separate charge (false).
The billing address for the transaction
The address that the tax calculation based on
whether country, city or street are necessary
The Complyt ID of the customer associated with the transaction
The status of the transaction
External timestamps, which should reference the dates in your originating system since these are the timestamps used for sales tax calculation
The creation time of the transaction
The last update time of the transaction
The type of the transaction. Only invoices are considered for nexus tracking and for actual tax calculation
The shipping fee for the transaction
The tax culculation will be using manualSalesTaxRate value when manualSalesTax is True. default value is False
In correlation to the value of manualSalesTax, this numeric value will be used to calculate the sales tand tax amount
The total price of the shipping fee
The external ID of the document that preceded this transaction creation (e.g., when creating an invoice, you can pass the ID of the sales order that it originated from here)
The discount to apply on the overall transaction
Indicates the status of the transaction in relation to its submission to a specific state. Possible values include:
- NOT_FILED: The transaction has not been submitted to the state.
- FILED: The transaction has been successfully submitted to the state.
The currency of the transaction. not mandatory
The manual currency exchange rate
If set to true, the sales tax will be taken from the invoice specified in the createdFrom field and returned as the refund's salesTax.amount
{
"externalId": "{{transactionExternalId}}",
"source": "{{source}}",
"items": [
{
"unitPrice": 100,
"quantity": 1,
"totalPrice": 100,
"description": "string",
"name": "string",
"taxCode": "C1S1",
"manualSalesTax": false,
"manualSalesTaxRate": 0
}
],
"billingAddress": {
"city": "",
"country": "US",
"county": null,
"state": "CA",
"street": "3098 N Remington Ave",
"zip": "93711-5508",
"region": "string",
"isPartial": false
},
"shippingAddress": {
"city": "fresno",
"country": "US",
"county": null,
"state": "CA",
"street": "3098 N Remington Ave",
"zip": "93711-5508",
"region": "string",
"isPartial": false
},
"customerId": "{{customerComplytId}}",
"externalTimestamps": {
"createdDate": "2023-02-05T12:24:43.193Z",
"updatedDate": "2023-02-05T12:24:43.193Z"
},
"transactionStatus": "ACTIVE",
"transactionType": "INVOICE",
"createdFrom": "string",
"transactionFilingStatus": "NOT_FILED",
"currency": "USD"
}
Request samples
Responses
The unique identifier in Complyt of the transaction. Required only on update operations.
the attribute designed to receive a unique identifier provided by API consumers themselves (e.g. pass your own ID)
a single digit which identifies your different stores, checkout solutions, marketplaces, etc. defined by the API consumers (to avoid external id duplications)
The name of the document, as shown in the ERP systems
The price of one unit, can be positive and negative
The quantity of the units, must be positive
The total price of the unit prices time the quantity, can be positive and negative, value is before discount and sales tax
The calculated price of the items. represents the total price (or amount time quantity if not provided), after discount. calculated on run time
The tax culculation will be using manualSalesTaxRate value when manualSalesTax is True. default value is False
In correlation to the value of manualSalesTax, this numeric value will be used to calculate the sales tand tax amount
The discount of the line items, must be positive
The relative transaction level discount to apply on a specific item. calculated on run time
Indicates whether tax is included in the total items price (true) or added as a separate charge (false).
The billing address for the transaction
The address that the tax calculation based on
whether country, city or street are necessary
The Complyt ID of the customer associated with the transaction
The buyer. All transactions are associated with a customer
The unique identifier in Complyt of the customer
the attribute designed to receive a unique identifier provided by API consumers themselves (e.g. pass your own ID)
a single digit which identifies your different stores, checkout solutions, marketplaces, etc. defined by the API consumers (to avoid external id duplications)
The customer's name
An (Optional) Email address associated with the customer
Indicates whether the customer is 'retail'/'reseller'/'marketplace'
read-only. The APIs internal timestamps for this resource
External timestamps, which should reference the dates in your originating system since these are the timestamps used for sales tax calculation
wheter global tax / vat / sales tax are applied, this field will hold the final amount that is applied on the transaction
wheter global tax / vat / sales tax are applied, this field will hold the final rate that is applied on the transaction
If sales tax are applied, this field will hold the relevant data
If global tax / vat are applied, this field will hold the relevant data
The status of the transaction
read-only. The APIs internal timestamps for this resource
External timestamps, which should reference the dates in your originating system since these are the timestamps used for sales tax calculation
The type of the transaction. Only invoices are considered for nexus tracking and for actual tax calculation
The shipping fee for the transaction
The tax culculation will be using manualSalesTaxRate value when manualSalesTax is True. default value is False
In correlation to the value of manualSalesTax, this numeric value will be used to calculate the sales tand tax amount
The total price of the shipping fee
The external ID of the document that preceded this transaction creation (e.g., when creating an invoice, you can pass the ID of the sales order that it originated from here)
The amount of taxable items in the transaction, tax excluded
The amount of tangible items in the transaction, tax excluded
The total amount of items in the transaction. tax and discount excluded
The total discount of all the items combined. calculated on save
The discount to apply on the overall transaction
The total amount of the transaction after discounts and taxes
Indicates the status of the transaction in relation to its submission to a specific state. Possible values include:
- NOT_FILED: The transaction has not been submitted to the state.
- FILED: The transaction has been successfully submitted to the state.
The currency of the transaction. not mandatory
The manual currency exchange rate
Details regarding the currency conversion
The transaction totalItemsAmount converted to USD
The transaction salesTax.amount converted to USD
The transaction final amount converted to USD (items and sales tax)
The original currency specified in the transaction
The target currency (USD)
The exchange rate that applied on the transaction
The source of fxRate. If entered manually in refRate then the value would be CLIENT.
Flag that specified whether the exchange rate is estimate. true for future transactions
The date in which the exchange rate was taken
{
"complytId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"externalId": "999444",
"source": "1",
"items": [
{
"unitPrice": 0,
"quantity": 0,
"totalPrice": 0,
"calculatedTotal":0,
"discount":0,
"description": "string",
"name": "string",
"taxCode": "string",
"jurisdictionalSalesTaxRules": {
"name": "string",
"abbreviation": "string",
"taxable": true,
"specialTreatment": true,
"calculationType": "FIXED",
"description": "string",
"calculationValue": 0,
"cities": null,
"regions":null
},
"salesTaxRates": {
"cityDistrictRate": 0,
"cityRate": 0,
"countyDistrictRate": 0,
"countyRate": 0,
"stateRate": 0,
"taxRate": 0
},
"gtRates": {
"countryRate": 0,
"regionRate": 0,
"taxRate": 0
},
"manualSalesTax": true,
"manualSalesTaxRate": 0,
"tangibleCategory": "TANGIBLE",
"taxableCategory": "TAXABLE"
}
],
"billingAddress": {
"city": "string",
"country": "string",
"county": "string",
"state": "string",
"street": "string",
"zip": "string",
"isPartial": false
},
"shippingAddress": {
"city": "string",
"country": "string",
"county": "string",
"state": "string",
"street": "string",
"zip": "string",
"region":"string",
"isPartial": false
},
"customerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"customer": {
"complytId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"externalId": "string",
"source": "7",
"name": "string",
"address": {
"city": "string",
"country": "string",
"county": "string",
"state": "string",
"street": "string",
"zip": "string",
"isPartial": false
},
"email": "example@some.mail.com",
"customerType": "RETAIL",
"internalTimestamps": {
"createdDate": "2023-02-05T12:24:43.193Z",
"updatedDate": "2023-02-05T12:24:43.193Z"
},
"externalTimestamps": {
"createdDate": "2023-02-05T12:24:43.193Z",
"updatedDate": "2023-02-05T12:24:43.193Z"
}
},
"salesTax": {
"amount": 0,
"taxRate": 0,
"salesTaxRates": {
"cityDistrictRate": 0,
"cityRate": 0,
"countyDistrictRate": 0,
"countyRate": 0,
"stateRate": 0,
"taxRate": 0
},
"gtRates": {
"countryRate": 0,
"regionRate": 0,
"taxRate": 0
},
},
"transactionStatus": "ACTIVE",
"internalTimestamps": {
"createdDate": "2023-02-05T12:24:43.193Z",
"updatedDate": "2023-02-05T12:24:43.193Z"
},
"externalTimestamps": {
"createdDate":"2023-02-05T12:24:43.193Z",
"updatedDate": "2023-02-05T12:24:43.193Z"
},
"transactionType": "SALES_ORDER",
"shippingFee": {
"manualSalesTax": true,
"manualSalesTaxRate": 0,
"totalPrice": 0,
"calculatedTotal":0,
"taxCode": "string",
"taxableCategory": "TAXABLE",
"tangibleCategory": "TANGIBLE",
"jurisdictionalSalesTaxRules": {
"name": "string",
"abbreviation": "string",
"taxable": true,
"specialTreatment": true,
"calculationType": "FIXED",
"description": "string",
"calculationValue": 0,
"cities": null
},
"salesTaxRates": {
"cityDistrictRate": 0,
"cityRate": 0,
"countyDistrictRate": 0,
"countyRate": 0,
"stateRate": 0,
"taxRate": 0
},
"gtRates": {
"countryRate": 0,
"regionRate": 0,
"taxRate": 0
},
},
"createdFrom": "string",
"taxableItemsAmount": 0,
"tangibleItemsAmount": 0,
"totalItemsAmount": 0,
"totalDiscount" :0,
"transactionFilingStatus": "NOT_FILED"
}