Business-to-Business Order Process (More Calls)
NOTE: This page contains information for Production Environment users only.
This process shows a typical order process between two business users, for example, between a vendor and its supplier. In this instance, the vendor (or shopper, as shown in the figure below) adds two items to their cart consecutively, enters their shipping and billing information, and then finalizes the transaction. Notice that in this example, a call is made for each shopper action.
Sample Request/Response A: Shopper Adds Item to Cart
Request
POST https://<S1 host>/api/basic-auth/simple-connect-ar/v1/transactions?state=PENDING
Body
{
"currencyCode": "USD",
"customerCode": "CU5689",
"invoiceDate": "2019-05-05",
"invoiceNumber": "INV-123456",
"lineItems": [
{
"description": "Clothing - Modern Fit Jeans (30x28)",
"goodServiceCode": "CLTH867",
"grossAmount": 200,
"identifier": "INV-123456-001",
"quantity": 2
}
],
"shipFrom": {
"address": "123 Main Street",
"cityMunicipality": "New York",
"country": "USA",
"stateProvince": "NY",
"zipPostalCode": "10004"
},
"shipTo": {
"address": "451 Broadway",
"cityMunicipality": "Denver",
"country": "USA",
"stateProvince": "CO",
"zipPostalCode": "80203"
}
}
Response
Body
{
"status": 200,
"message": "Successfully created new transaction with new state: PENDING",
"data": {
"transactionId": "230822a5-9f04-4edf-8e8d-ef464c6a2f3a",
"invoiceNumber": "INV-123456",
"currencyCode": "USD",
"invoiceDate": "2019-05-05",
"customerCode": "CU5689",
"totalTaxAmount": 16.62,
"shipTo": {
"cityMunicipality": "Denver",
"stateProvince": "CO",
"country": "USA",
"zipPostalCode": "80203",
"address": "451 Broadway"
},
"shipFrom": {
"cityMunicipality": "New York",
"stateProvince": "NY",
"country": "USA",
"zipPostalCode": "10004",
"address": "123 Main Street"
},
"lineItems": [
{
"identifier": "INV-123456-001",
"totalTaxAmount": 16.62,
"taxInfo": [
{
"type": "SALES_TAX",
"authorityName": "CO State Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 5.8,
"taxRate": 0.029,
"taxableAmount": 200,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "STATE"
},
{
"type": "SALES_TAX",
"authorityName": "CO City Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 8.62,
"taxRate": 0.0431,
"taxableAmount": 200,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "CITY",
"cityOrCountyOrDistrict": "DENVER"
},
{
"type": "SALES_TAX",
"authorityName": "CO District Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 0.2,
"taxRate": 0.001,
"taxableAmount": 200,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "SCIENTIFIC AND CULTURAL FACILITIES DISTRICT"
},
{
"type": "SALES_TAX",
"authorityName": "CO District Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 2,
"taxRate": 0.01,
"taxableAmount": 200,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "REGIONAL TRANSPORTATION DISTRICT"
}
]
}
]
},
"success": true
}
Sample Request/Response B: Shopper Adds Item to Cart
Request
PUT https://<S1 host>/api/api/basic-auth/simple-connect-ar/v1/transactions/230822a5-9f04-4edf-8e8d-ef464c6a2f3a?state=PENDING
Body
{
"currencyCode": "USD",
"customerCode": "CU5689",
"invoiceDate": "2019-05-05",
"invoiceNumber": "INV-123456",
"lineItems": [
{
"description": "Clothing - Modern Fit Jeans (30x28)",
"goodServiceCode": "CLTH867",
"grossAmount": 200,
"identifier": "INV-123456-001",
"quantity": 2
},
{
"description": "Clothing - Blue Buttoned Down Dress Shirt (M)",
"goodServiceCode": "CLTH5309",
"grossAmount": 75,
"identifier": "INV-123456-002",
"quantity": 1,
"discounts": [
{
"amount": 10
}
]
}
],
"shipFrom": {
"address": "123 Main Street",
"cityMunicipality": "New York",
"country": "USA",
"stateProvince": "NY",
"zipPostalCode": "10004"
},
"shipTo": {
"address": "451 Broadway",
"cityMunicipality": "Denver",
"country": "USA",
"stateProvince": "CO",
"zipPostalCode": "80203"
}
}
Response
Body
{
"status": 200,
"message": "Successfully overrode transaction with new state: PENDING",
"data": {
"transactionId": "230822a5-9f04-4edf-8e8d-ef464c6a2f3a",
"invoiceNumber": "INV-123456",
"currencyCode": "USD",
"invoiceDate": "2019-05-05",
"customerCode": "CU5689",
"totalTaxAmount": 22.02,
"shipTo": {
"cityMunicipality": "Denver",
"stateProvince": "CO",
"country": "USA",
"zipPostalCode": "80203",
"address": "451 Broadway"
},
"shipFrom": {
"cityMunicipality": "New York",
"stateProvince": "NY",
"country": "USA",
"zipPostalCode": "10004",
"address": "123 Main Street"
},
"lineItems": [
{
"identifier": "INV-123456-001",
"totalTaxAmount": 16.62,
"taxInfo": [
{
"type": "SALES_TAX",
"authorityName": "CO State Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 5.8,
"taxRate": 0.029,
"taxableAmount": 200,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "STATE"
},
{
"type": "SALES_TAX",
"authorityName": "CO City Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 8.62,
"taxRate": 0.0431,
"taxableAmount": 200,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "CITY",
"cityOrCountyOrDistrict": "DENVER"
},
{
"type": "SALES_TAX",
"authorityName": "CO District Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 0.2,
"taxRate": 0.001,
"taxableAmount": 200,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "SCIENTIFIC AND CULTURAL FACILITIES DISTRICT"
},
{
"type": "SALES_TAX",
"authorityName": "CO District Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 2,
"taxRate": 0.01,
"taxableAmount": 200,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "REGIONAL TRANSPORTATION DISTRICT"
}
]
},
{
"identifier": "INV-123456-002",
"totalTaxAmount": 5.4,
"taxInfo": [
{
"type": "SALES_TAX",
"authorityName": "CO State Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 1.89,
"taxRate": 0.029,
"taxableAmount": 65,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "STATE"
},
{
"type": "SALES_TAX",
"authorityName": "CO City Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 2.8,
"taxRate": 0.0431,
"taxableAmount": 65,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "CITY",
"cityOrCountyOrDistrict": "DENVER"
},
{
"type": "SALES_TAX",
"authorityName": "CO District Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 0.06,
"taxRate": 0.001,
"taxableAmount": 65,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "SCIENTIFIC AND CULTURAL FACILITIES DISTRICT"
},
{
"type": "SALES_TAX",
"authorityName": "CO District Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 0.65,
"taxRate": 0.01,
"taxableAmount": 65,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "REGIONAL TRANSPORTATION DISTRICT"
}
]
}
]
},
"success": true
}
Sample Request/Response C: Shopper Enters Complete Bill-To and Ship-To Information
Request
PUT https://<S1 host>/api/basic-auth/simple-connect-ar/v1/transactions/230822a5-9f04-4edf-8e8d-ef464c6a2f3a?state=PENDING
Body
{
"currencyCode": "USD",
"customerCode": "CU5689",
"invoiceDate": "2019-05-05",
"invoiceNumber": "INV-123456",
"lineItems": [
{
"description": "Clothing - Modern Fit Jeans (30x28)",
"goodServiceCode": "CLTH867",
"grossAmount": 200,
"identifier": "INV-123456-001",
"quantity": 2,
"deliveryAmount": 5,
"deliveryDate": "2019-05-13"
},
{
"description": "Clothing - Blue Buttoned Down Dress Shirt (M)",
"goodServiceCode": "CLTH5309",
"grossAmount": 75,
"identifier": "INV-123456-002",
"quantity": 1,
"deliveryAmount": 3,
"deliveryDate": "2019-05-13",
"discounts": [
{
"amount": 10
}
]
}
],
"shipFrom": {
"address": "123 Main Street",
"cityMunicipality": "New York",
"country": "USA",
"stateProvince": "NY",
"zipPostalCode": "10004"
},
"shipTo": {
"address": "451 Broadway",
"cityMunicipality": "Denver",
"country": "USA",
"stateProvince": "CO",
"zipPostalCode": "80203"
},
"billTo": {
"address": "451 Broadway",
"cityMunicipality": "Denver",
"country": "USA",
"stateProvince": "CO",
"zipPostalCode": "80203"
}
}
Response
Body
{
"status": 200,
"message": "Successfully overrode transaction with new state: PENDING",
"data": {
"transactionId": "230822a5-9f04-4edf-8e8d-ef464c6a2f3a",
"invoiceNumber": "INV-123456",
"currencyCode": "USD",
"invoiceDate": "2019-05-05",
"customerCode": "CU5689",
"totalTaxAmount": 22.69,
"billTo": {
"cityMunicipality": "Denver",
"stateProvince": "CO",
"country": "USA",
"zipPostalCode": "80203",
"address": "451 Broadway"
},
"shipTo": {
"cityMunicipality": "Denver",
"stateProvince": "CO",
"country": "USA",
"zipPostalCode": "80203",
"address": "451 Broadway"
},
"shipFrom": {
"cityMunicipality": "New York",
"stateProvince": "NY",
"country": "USA",
"zipPostalCode": "10004",
"address": "123 Main Street"
},
"lineItems": [
{
"identifier": "INV-123456-001",
"totalTaxAmount": 17.04,
"taxInfo": [
{
"type": "SALES_TAX",
"authorityName": "CO State Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 5.95,
"taxRate": 0.029,
"taxableAmount": 205,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "STATE"
},
{
"type": "SALES_TAX",
"authorityName": "CO City Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 8.84,
"taxRate": 0.0431,
"taxableAmount": 205,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "CITY",
"cityOrCountyOrDistrict": "DENVER"
},
{
"type": "SALES_TAX",
"authorityName": "CO District Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 0.2,
"taxRate": 0.001,
"taxableAmount": 205,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "SCIENTIFIC AND CULTURAL FACILITIES DISTRICT"
},
{
"type": "SALES_TAX",
"authorityName": "CO District Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 2.05,
"taxRate": 0.01,
"taxableAmount": 205,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "REGIONAL TRANSPORTATION DISTRICT"
}
]
},
{
"identifier": "INV-123456-002",
"totalTaxAmount": 5.65,
"taxInfo": [
{
"type": "SALES_TAX",
"authorityName": "CO State Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 1.97,
"taxRate": 0.029,
"taxableAmount": 68,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "STATE"
},
{
"type": "SALES_TAX",
"authorityName": "CO City Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 2.93,
"taxRate": 0.0431,
"taxableAmount": 68,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "CITY",
"cityOrCountyOrDistrict": "DENVER"
},
{
"type": "SALES_TAX",
"authorityName": "CO District Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 0.07,
"taxRate": 0.001,
"taxableAmount": 68,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "SCIENTIFIC AND CULTURAL FACILITIES DISTRICT"
},
{
"type": "SALES_TAX",
"authorityName": "CO District Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 0.68,
"taxRate": 0.01,
"taxableAmount": 68,
"exemptAmount": 0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "REGIONAL TRANSPORTATION DISTRICT"
}
]
}
]
},
"success": true
}
Sample Request/Response D: Shopper Finalizes Transaction
Request
PATCH https://<S1 host>/api/basic-auth/simple-connect-ar/v1/transactions/230822a5-9f04-4edf-8e8d-ef464c6a2f3a?state=SCHED_COMMIT
Body
{
"commitDate":"2019-06-01"
}
Response
Body
{
"status":200,
"message":"Successfully patched transaction with new state: SCHED_COMMIT",
"success":true
}
Sample Request/Response E: Committed an Evaluate Transaction
Request
PATCH https://<S1 host>/api/basic-auth/simple-connect-ar/v1/transactions/15ed9455-6e47-433b-b083-8cb74fe7a2bc?state=COMMIT_PENDING
Body
{
"currencyCode": "USD",
"customerCode": "CU5689",
"invoiceDate": "2019-05-05",
"invoiceNumber": "INV-123456",
"lineItems": [
{
"description": "Clothing - Modern Fit Jeans (30x28)",
"goodServiceCode": "CLTH867",
"grossAmount": 200,
"identifier": "INV-123456-001",
"quantity": 2,
"deliveryAmount": 5,
"deliveryDate": "2019-05-13"
},
{
"description": "Clothing - Blue Buttoned Down Dress Shirt (M)",
"goodServiceCode": "CLTH5309",
"grossAmount": 75,
"identifier": "INV-123456-002",
"quantity": 1,
"deliveryAmount": 3,
"deliveryDate": "2019-05-13",
"discounts": [
sovos.com/portal
Sovos Simple Connect API – AR User Guide V 1.3-18.MAY.2020
Proprietary and Confidential – Do Not Distribute - ©Copyright 2020 36
{
"amount": 10
}
]
}
],
"shipFrom": {
"address": "123 Main Street",
"cityMunicipality": "New York",
"country": "USA",
"stateProvince": "NY",
"zipPostalCode": "10004"
},
"shipTo": {
"address": "451 Broadway",
"cityMunicipality": "Denver",
"country": "USA",
"stateProvince": "CO",
"zipPostalCode": "80203"
},
"billTo": {
"address": "451 Broadway",
"cityMunicipality": "Denver",
"country": "USA",
"stateProvince": "CO",
"zipPostalCode": "80203"
}
}
Response
Body
{
"status":200,
"message":"Successfully patched transaction with new state: COMMIT",
"success":true
}