Business-to-Business Order Process
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 only made when more detailed shipping information is added and the user requests an estimate of the tax, and later when the order is finalized.
Sample Request/Response A: Shopper Enters ZIP and Clicks Estimate Tax
Request
POST /api/basic-auth/simple-connect-ar/v1/transactions?state=EVALUATE
Body
{
"currencyCode": "USD",
"customerCode": "CU5689",
"invoiceDate": "2019-05-05",
"invoiceNumber": "INV-123456",
"deliveryAmount": 8.00,
"lineItems": [
{
"goodServiceCode": "CLTH867",
"grossAmount": 200,
"identifier": "INV-123456-001",
"quantity": 2,
"deliveryDate": "2019-05-13"
},
{
"goodServiceCode": "CLTH5309",
"grossAmount": 75,
"identifier": "INV-123456-002",
"quantity": 1,
"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 created new transaction with new state: EVALUATE",
"data": {
"currencyCode": "USD",
"totalTaxAmount": 10.92,
"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": 8.23,
"taxInfo": [
{
"type": "SALES_TAX",
"authorityName": "CO State Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 5.97,
"taxRate": 0.029,
"taxableAmount": 205.82,
"exemptAmount": 0.0,
"messages": [],
"jurisdictionType": "STATE"
},
{
"type": "SALES_TAX",
"authorityName": "CO City Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 0.0,
"taxRate": 0.0,
"taxableAmount": 0.0,
"exemptAmount": 0.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.82,
"exemptAmount": 0.0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "SCIENTIFIC AND CULTURAL FACILITIES DISTRICT"
},
{
"type": "SALES_TAX",
"authorityName": "CO District Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 2.06,
"taxRate": 0.01,
"taxableAmount": 205.82,
"exemptAmount": 0.0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "REGIONAL TRANSPORTATION DISTRICT"
}
]
},
{
"identifier": "INV-123456-002",
"totalTaxAmount": 2.69,
"taxInfo": [
{
"type": "SALES_TAX",
"authorityName": "CO State Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 1.95,
"taxRate": 0.029,
"taxableAmount": 67.18,
"exemptAmount": 0.0,
"messages": [],
"jurisdictionType": "STATE"
},
{
"type": "SALES_TAX",
"authorityName": "CO City Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 0.0,
"taxRate": 0.0,
"taxableAmount": 0.0,
"exemptAmount": 0.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": 67.18,
"exemptAmount": 0.0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "SCIENTIFIC AND CULTURAL FACILITIES DISTRICT"
},
{
"type": "SALES_TAX",
"authorityName": "CO District Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 0.67,
"taxRate": 0.01,
"taxableAmount": 67.18,
"exemptAmount": 0.0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "REGIONAL TRANSPORTATION DISTRICT"
}
]
}
],
"invoiceDate": "2019-05-05",
"customerCode": "CU5689",
"invoiceNumber": "INV-123456"
},
"success": true
}
Sample Request/Response B: Shopper Finalizes Transaction
Request
POST /api/basic-auth/simple-connect-ar/v1/transactions?state=COMMIT
Body
{
"currencyCode": "USD",
"customerCode": "CU5689",
"invoiceDate": "2019-05-05",
"invoiceNumber": "INV-123456",
"deliveryAmount": 8.00,
"lineItems": [
{
"goodServiceCode": "CLTH867",
"grossAmount": 200,
"identifier": "INV-123456-001",
"quantity": 2,
"deliveryDate": "2019-05-13"
},
{
"goodServiceCode": "CLTH5309",
"grossAmount": 75,
"identifier": "INV-123456-002",
"quantity": 1,
"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 created new transaction with new state: COMMIT",
"data": {
"transactionId": "9ce48347-6066-4335-9dcd-c28873a958d5_173576579",
"currencyCode": "USD",
"totalTaxAmount": 10.92,
"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": 8.23,
"taxInfo": [
{
"type": "SALES_TAX",
"authorityName": "CO State Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 5.97,
"taxRate": 0.029,
"taxableAmount": 205.82,
"exemptAmount": 0.0,
"messages": [],
"jurisdictionType": "STATE"
},
{
"type": "SALES_TAX",
"authorityName": "CO City Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 0.0,
"taxRate": 0.0,
"taxableAmount": 0.0,
"exemptAmount": 0.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.82,
"exemptAmount": 0.0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "SCIENTIFIC AND CULTURAL FACILITIES DISTRICT"
},
{
"type": "SALES_TAX",
"authorityName": "CO District Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 2.06,
"taxRate": 0.01,
"taxableAmount": 205.82,
"exemptAmount": 0.0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "REGIONAL TRANSPORTATION DISTRICT"
}
]
},
{
"identifier": "INV-123456-002",
"totalTaxAmount": 2.69,
"taxInfo": [
{
"type": "SALES_TAX",
"authorityName": "CO State Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 1.95,
"taxRate": 0.029,
"taxableAmount": 67.18,
"exemptAmount": 0.0,
"messages": [],
"jurisdictionType": "STATE"
},
{
"type": "SALES_TAX",
"authorityName": "CO City Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 0.0,
"taxRate": 0.0,
"taxableAmount": 0.0,
"exemptAmount": 0.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": 67.18,
"exemptAmount": 0.0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "SCIENTIFIC AND CULTURAL FACILITIES DISTRICT"
},
{
"type": "SALES_TAX",
"authorityName": "CO District Tax",
"stateOrProvince": "COLORADO",
"country": "UNITED STATES",
"taxAmount": 0.67,
"taxRate": 0.01,
"taxableAmount": 67.18,
"exemptAmount": 0.0,
"messages": [],
"jurisdictionType": "DISTRICT",
"cityOrCountyOrDistrict": "REGIONAL TRANSPORTATION DISTRICT"
}
]
}
],
"invoiceDate": "2019-05-05",
"customerCode": "CU5689",
"invoiceNumber": "INV-123456"
},
"success": true
}