- Getting Started
- Endpoints
- Authentication
- Customers
- Exemptions
- Transactions
- Address Validation
- Sales Tax Rates
- Vat Validation
- Special Features
Upsert Transaction
PUT
/v1/transactions/source/{source}/externalId/{externalId}
transaction
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Path Params
externalId
string
required
Example:
{{transactionExternalId}}
source
string
required
Example:
{{source}}
Match pattern:
[1-9]
Body Params application/json
externalId
string
required
>= 1 characters<= 256 characters
source
string
required
Match pattern:
^(10|[1-9])$
documentName
string
optional
>= 0 characters<= 50 characters
items
array[object (Item Request) {9}]
required
unitPrice
number
required
quantity
number
required
totalPrice
number
optional
description
string
optional
name
string
required
>= 1 characters<= 256 characters
taxCode
string
required
>= 0 characters<= 256 characters
manualSalesTax
boolean
optional
manualSalesTaxRate
number
optional
<= 0.2
discount
number
optional
isTaxInclusive
boolean
optional
billingAddress
object (billingAddress)
optional
city
string
optional
>= 0 characters<= 100 characters
country
string
optional
>= 0 characters<= 50 characters
county
string
optional
>= 0 characters<= 100 characters
state
string
optional
>= 0 characters<= 100 characters
street
string
optional
>= 0 characters<= 200 characters
region
string
optional
>= 0 characters<= 20 characters
zip
string
optional
>= 0 characters<= 20 characters
shippingAddress
object (shippingAddress Copy)
required
country
string
required
>= 0 characters<= 50 characters
region
string
optional
>= 0 characters<= 20 characters
city
string
optional
>= 0 characters<= 100 characters
county
string
optional
>= 0 characters<= 100 characters
state
string
optional
>= 0 characters<= 100 characters
street
string
optional
>= 0 characters<= 200 characters
zip
string
optional
>= 0 characters<= 20 characters
isPartial
boolean
optional
customerId
string <uuid>
required
transactionStatus
enum<string>
required
Allowed values:
ACTIVECANCELLEDPAID
externalTimestamps
object (externalTimestamps)
required
createdDate
string
required
updatedDate
string
required
transactionType
enum<string>
required
Allowed values:
SALES_ORDERINVOICEESTIMATEREFUNDTAXABLE_REFUND
shippingFee
object (ShippingFee)
optional
manualSalesTax
boolean
optional
manualSalesTaxRate
number
optional
totalPrice
number
optional
taxCode
string
required
>= 0 characters<= 256 characters
salesTaxRates
object (SalesTaxRates)
required
gtRates
object (GtRates)
required
createdFrom
string
optional
>= 0 characters<= 256 characters
transactionLevelDiscount
number
optional
transactionFilingStatus
enum<string>
optional
Allowed values:
NOT_FILEDFILED
currency
string
optional
refRate
number
optional
subsidiary
string
optional
isRefundLinked
boolean
optional
Example
{
"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
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request PUT 'https://sandbox.complyt.io/v1/transactions/source//externalId/' \
--header 'Content-Type: application/json' \
--data-raw '{
"externalId": "",
"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": "",
"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"
}'
Responses
🟢200Successful operation
application/json
Body
A transaction between the API consumer and a customer
complytId
string <uuid>
optional
externalId
string
required
>= 1 characters<= 256 characters
source
string
required
Match pattern:
^(10|[1-9])$
documentName
string
optional
>= 0 characters<= 50 characters
items
array[object (Item Response) {16}]
required
unitPrice
number
required
quantity
number
required
totalPrice
number
optional
calculatedTotal
number
optional
description
string
optional
name
string
required
>= 1 characters<= 256 characters
taxCode
string
required
>= 0 characters<= 256 characters
jurisdictionalSalesTaxRules
object (JurisdictionalSalesTaxRules)
optional
salesTaxRates
object (SalesTaxRates)
optional
gtRates
object (GtRates)
optional
manualSalesTax
boolean
optional
manualSalesTaxRate
number
optional
<= 0.2
discount
number
optional
relativeTransactionDiscount
number
optional
tangibleCategory
enum<string>
optional
Allowed values:
TANGIBLEINTANGIBLE
taxableCategory
enum<string>
optional
Allowed values:
TAXABLENOT_TAXABLE
isTaxInclusive
boolean
optional
billingAddress
object (billingAddress)
optional
city
string
optional
>= 0 characters<= 100 characters
country
string
optional
>= 0 characters<= 50 characters
county
string
optional
>= 0 characters<= 100 characters
state
string
optional
>= 0 characters<= 100 characters
street
string
optional
>= 0 characters<= 200 characters
region
string
optional
>= 0 characters<= 20 characters
zip
string
optional
>= 0 characters<= 20 characters
shippingAddress
object
required
city
string
required
>= 0 characters<= 100 characters
country
string
required
>= 0 characters<= 50 characters
county
string
optional
>= 0 characters<= 100 characters
state
string
required
>= 0 characters<= 100 characters
street
string
required
>= 0 characters<= 200 characters
region
string
optional
>= 0 characters<= 20 characters
zip
string
required
>= 0 characters<= 20 characters
isPartial
boolean
required
matchedAddressData
object
optional
customerId
string <uuid>
required
customer
object (Customer)
optional
complytId
string <uuid>
optional
externalId
string
required
>= 1 characters<= 256 characters
source
string
required
Match pattern:
^(10|[1-9])$
name
string
optional
>= 1 characters<= 256 characters
address
object
optional
email
string
optional
customerType
enum<string>
required
Allowed values:
RETAILMARKETPLACERESELLERRETAIL_EXEMPT
internalTimestamps
object (internalTimestamps)
optional
externalTimestamps
object (externalTimestamps)
required
comment
string
optional
>= 0 characters<= 200 characters
salesTax
object
optional
amount
number
optional
rate
number
optional
salesTaxRates
object
optional
gtRates
object (GtRates)
optional
transactionStatus
enum<string>
required
Allowed values:
ACTIVECANCELLEDPAID
internalTimestamps
object (internalTimestamps)
optional
externalTimestamps
object (externalTimestamps)
required
transactionType
enum<string>
required
Allowed values:
SALES_ORDERINVOICEESTIMATEREFUNDTAXABLE_REFUND
shippingFee
object (ShippingFee)
optional
manualSalesTax
boolean
optional
manualSalesTaxRate
number
optional
totalPrice
number
optional
taxCode
string
required
>= 0 characters<= 256 characters
salesTaxRates
object (SalesTaxRates)
required
gtRates
object (GtRates)
required
createdFrom
string
optional
>= 0 characters<= 256 characters
taxableItemsAmount
number
optional
tangibleItemsAmount
number
optional
totalItemsAmount
number
optional
totalDiscount
number
optional
transactionLevelDiscount
number
optional
finalTransactionAmount
number
optional
transactionFilingStatus
enum<string>
optional
Allowed values:
NOT_FILEDFILED
currency
string
optional
refRate
number
optional
exchangeRateInfo
object (ExchangeRateInfo)
optional
totalItemsAmountInUsd
number
optional
transactionSalesTaxInUsd
number
optional
finalTransactionAmountInUsd
number
optional
fromCurrency
string
optional
toCurrency
string
optional
fxRate
number
optional
source
enum<string>
optional
Allowed values:
COMPLYTCLIENT
isExchangeRateEstimated
boolean
optional
exchangeRateDate
string
optional
subsidiary
string
optional
Example
{
"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,
"matchedAddressData": {
"address": {
"city": "string",
"country": "string",
"county": "string",
"state": "string",
"zip": "string"
},
"scoring": {
"matchLevel": "string",
"score": 1.0,
"fieldScore": {
"countryMatch": "string",
"stateMatch": "string",
"cityMatch": "string",
"zipMatch": "string"
}
}
}
},
"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"
}
🟢201Successful operation
🟠400Something is wrong with your request
🟠401Unauthorized
🟠403Forbidden
🟠404Transaction Not Found
🔴500Internal Error
🟠400ERR-ADDR-001
Modified at 2025-02-12 15:50:11