B2B
B2B (Business-to-Business) operations involve Creating and Updating company profiles and managaing Business Quotes. This page contains B2B Endpoints created to manage company profiles and Business Quotes
Get list of companies.
This endpoint allows you to get a list of companies.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Getting companies | /api/v2/commerce/b2b/companies | Get list of companies. |
Response Properties
- Name
statusCode
- Type
- number
- Description
Status code of the response
- Name
status
- Type
- string
- Description
Status of the response
- Name
errors
- Type
- array
- Description
List of errors in the response
- Name
success
- Type
- boolean
- Description
Success status of the response
- Name
message
- Type
- string
- Description
Message of the response
- Name
messageCode
- Type
- string
- Description
Message code of the response
- Name
result
- Type
- array
- Description
Result of the response
- Name
id
- Type
- string
- Description
Company Id to identify a company
- Name
name
- Type
- string
- Description
Name of the company
Request
curl --location 'https://api20.bettercommerce.io/api/v2/commerce/b2b/companies'
Response
{
"statusCode": 406,
"status": "consectetur adipisicing Lorem proident deserunt",
"errors": [
"in",
"ut ullamco"
],
"success": true,
"message": "non sed voluptate",
"messageCode": "Duis nostru",
"result": [
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "et aliqua enim"
},
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "reprehenderit eiusmod"
}
]
}
Save quotation.
This endpoint allows you to save a Quotation.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Posting Quotations | /api/v2/commerce/b2b/quote/save | Save quotation. |
Required attributes
- Name
quote
- Type
- model
- Description
Quotation values to be saved
Model attributes
- Name
id
- Type
- string
- Description
id to identify the user
- Name
title
- Type
- string
- Description
Title of the user e.g. Miss./Mrs./Mr.
- Name
firstName
- Type
- string
- Description
First name of the user
- Name
lastName
- Type
- string
- Description
Last name of the user
- Name
address1
- Type
- string
- Description
Address Line 1 provided by the user
- Name
address2
- Type
- string
- Description
Address Line 2 provided by the user
- Name
address3
- Type
- string
- Description
Address Line 3 provided by the user
- Name
city
- Type
- string
- Description
City name provided by the user
- Name
state
- Type
- string
- Description
State name provided by the user
- Name
country
- Type
- string
- Description
Country name provided by the user
- Name
countryCode
- Type
- string
- Description
Country code provided by the user
- Name
postCode
- Type
- string
- Description
Post code provided by the user
- Name
phoneNo
- Type
- string
- Description
Phone number of the user
- Name
mobileNo
- Type
- string
- Description
Mobile number of the user
- Name
customerId
- Type
- string
- Description
Customer Id to identify the user
- Name
isDefault
- Type
- boolean
- Description
Flag to check if the address is default address
- Name
isDefaultDelivery
- Type
- boolean
- Description
Flag to check if the addresss is default delivery address
- Name
isDefaultForSubscription
- Type
- boolean
- Description
Flag to check if the address is default
- Name
companyName
- Type
- string
- Description
Name of the company provided by the user
- Name
isDefaultBilling
- Type
- boolean
- Description
Flag to check if the address is default billing address
- Name
purchaseOrderNo
- Type
- string
- Description
Order number of the purchase made
- Name
quoteName
- Type
- string
- Description
Name of the quotation
- Name
companyId
- Type
- string
- Description
Company Id to identify the company
- Name
shippingAddress
- Type
- object
- Description
Shipping address of the company
- Name
billingAddress
- Type
- object
- Description
Billing address of the company
Response Properties
- Name
statusCode
- Type
- number
- Description
Status code of the response
- Name
status
- Type
- string
- Description
Status of the response
- Name
errors
- Type
- array
- Description
List of errors in the response
- Name
success
- Type
- boolean
- Description
Success status of the response
- Name
message
- Type
- string
- Description
Message of the response
- Name
messageCode
- Type
- string
- Description
Message code of the response
- Name
result
- Type
- boolean
- Description
Result of the response
Request
curl --location 'https://api20.bettercommerce.io/api/v2/commerce/b2b/quote/save' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data '{
"id": "00000000-0000-0000-0000-000000000000",
"purchaseOrderNo": "string",
"quoteName": "string",
"email": "string",
"companyId": "00000000-0000-0000-0000-000000000000",
"shippingAddress": {
"customerId": "5f1ebc4b-12bf-458f-920b-a13eba2d15ee",
"isDefault": false,
"isDefaultDelivery": false,
"isDefaultForSubscription": false,
"isDefaultBilling": false,
"id": 0,
"title": "Mr.",
"firstName": "David",
"lastName": "Smith",
"address1": "Address Line 1",
"address2": "Address Line 2",
"address3": "Address Line 3",
"city": "London",
"state": "London",
"country": "United Kingdom",
"countryCode": "UK",
"postCode": "XX55YY",
"phoneNo": "9999999999",
"mobileNo": "888888888",
"companyName": "My Company"
},
"billingAddress": {
"customerId": "5f1ebc4b-12bf-458f-920b-a13eba2d15ee",
"isDefault": false,
"isDefaultDelivery": false,
"isDefaultForSubscription": false,
"isDefaultBilling": false,
"id": 0,
"title": "Mr.",
"firstName": "David",
"lastName": "Smith",
"address1": "Address Line 1",
"address2": "Address Line 2",
"address3": "Address Line 3",
"city": "London",
"state": "London",
"country": "United Kingdom",
"countryCode": "UK",
"postCode": "XX55YY",
"phoneNo": "9999999999",
"mobileNo": "888888888",
"companyName": "My Company"
}
}'
Response
{
"statusCode": 410,
"status": "mollit incididunt reprehenderit id aliqua",
"errors": [
"dolor do",
"sit consequat consectetur"
],
"success": false,
"message": "nisi Lorem deserunt tempor",
"messageCode": "non voluptate veniam et",
"result": true
}
Register Company.
This endpoint allows you to register a company.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Registering a company | /api/v2/commerce/b2b/create | Register Company. |
Required attributes
- Name
value
- Type
- model
- Description
Company values to be saved
Model attributes
- Name
businessType
- Type
- string
- Description
Business type of the company
- Name
registeredNumber
- Type
- string
- Description
Registered number of the company
- Name
priceListId
- Type
- string
- Description
Price list Id used to identify the price list
- Name
companyUserRole
- Type
- string
- Description
User role of the company
- Name
customerGroupId
- Type
- string
- Description
CustomerGroupId used to identify Customer groups
- Name
companyId
- Type
- string
- Description
Company Id to identify the company
- Name
id
- Type
- string
- Description
id to identify the user address
- Name
title
- Type
- string
- Description
Title of the user e.g. Miss./Mrs./Mr.
- Name
firstName
- Type
- string
- Description
First name of the user
- Name
lastName
- Type
- string
- Description
Last name of the user
- Name
address1
- Type
- string
- Description
Address Line 1 provided by the user
- Name
address2
- Type
- string
- Description
Address Line 2 provided by the user
- Name
address3
- Type
- string
- Description
Address Line 3 provided by the user
- Name
city
- Type
- string
- Description
City name provided by the user
- Name
state
- Type
- string
- Description
State name provided by the user
- Name
country
- Type
- string
- Description
Country name provided by the user
- Name
countryCode
- Type
- string
- Description
Country code provided by the user
- Name
postCode
- Type
- string
- Description
Post code provided by the user
- Name
phoneNo
- Type
- string
- Description
Phone number of the user
- Name
mobileNo
- Type
- string
- Description
Mobile number of the user
- Name
companyName
- Type
- string
- Description
Name of the company provided by the user
- Name
address
- Type
- object
- Description
Address of the company
- Name
username
- Type
- string
- Description
Username of the user
- Name
email
- Type
- string
- Description
Email of the company
- Name
telephone
- Type
- string
- Description
Telephone number of the user
- Name
mobile
- Type
- string
- Description
Mobile number of the user
- Name
gender
- Type
- string
- Description
Gender of the user
- Name
password
- Type
- string
- Description
Password of the user
- Name
nickName
- Type
- string
- Description
Nick name of the user
- Name
dayOfBirth
- Type
- string
- Description
Day of birth of the user
- Name
monthOfBirth
- Type
- string
- Description
Month of birth of the user
- Name
yearOfBirth
- Type
- string
- Description
Year of birth of the user
- Name
birthDate
- Type
- string
- Description
Birth date of the user
- Name
newsLetterSubscribed
- Type
- boolean
- Description
Flag to check if newsletter is subscribed by the user
- Name
userSourceType
- Type
- number
- Description
Source type of the user e.g. 1
- Name
referralType
- Type
- string
- Description
Referral type of the user
- Name
userReferrer
- Type
- string
- Description
Referrer of the the user
- Name
notifyByEmail
- Type
- boolean
- Description
Flag to check if user wants to be notified by email
- Name
notifyBySMS
- Type
- boolean
- Description
Flag to check if user wants to be notified by SMS
- Name
notifyByPost
- Type
- boolean
- Description
Flag to check if user wants to be notified by Post
- Name
registrationSource
- Type
- string
- Description
Registration source of the company
Response Properties
- Name
statusCode
- Type
- number
- Description
Status code of the response
- Name
status
- Type
- string
- Description
Status of the response
- Name
errors
- Type
- array
- Description
List of errors in the response
- Name
success
- Type
- boolean
- Description
Success status of the response
- Name
message
- Type
- string
- Description
Message of the response
- Name
messageCode
- Type
- string
- Description
Message code of the response
- Name
result
- Type
- boolean
- Description
Result of the response
Request
curl --location 'https://api20.bettercommerce.io/api/v2/commerce/b2b/create' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data '{
"companyId": "00000000-0000-0000-0000-000000000000",
"businessType": "string",
"registeredNumber": "string",
"priceListId": "00000000-0000-0000-0000-000000000000",
"companyUserRole": 0,
"customerGroupId": "00000000-0000-0000-0000-000000000000",
"address": {
"id": 0,
"title": "string",
"firstName": "string",
"lastName": "string",
"address1": "string",
"address2": "string",
"address3": "string",
"city": "string",
"state": "string",
"country": "string",
"countryCode": "string",
"postCode": "string",
"phoneNo": "string",
"mobileNo": "string",
"companyName": "string"
},
"username": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"title": "string",
"telephone": "string",
"mobile": "string",
"gender": "string",
"password": "string",
"nickName": "string",
"dayOfBirth": "string",
"monthOfBirth": "string",
"yearOfBirth": "string",
"birthDate": "string",
"postCode": "string",
"newsLetterSubscribed": true,
"userSourceType": 1,
"referralType": "Direct",
"userReferrer": "string",
"companyName": "string",
"notifyByEmail": true,
"notifyBySMS": true,
"notifyByPost": true,
"registrationSource": "string"
}'
Response
{
"statusCode": 410,
"status": "mollit incididunt reprehenderit id aliqua",
"errors": [
"dolor do",
"sit consequat consectetur"
],
"success": false,
"message": "nisi Lorem deserunt tempor",
"messageCode": "non voluptate veniam et",
"result": true
}
Update Company.
This endpoint allows you to update a company.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Update a company | /api/v2/commerce/b2b/:companyId/update | Update Company. |
Required attributes
- Name
id
- Type
- string
- Description
Id to identify the company to be updated
- Name
value
- Type
- model
- Description
Company values to be saved
Model attributes
- Name
businessType
- Type
- string
- Description
Business type of the company
- Name
registeredNumber
- Type
- string
- Description
Registered number of the company
- Name
priceListId
- Type
- string
- Description
Price list Id used to identify the price list
- Name
companyUserRole
- Type
- string
- Description
User role of the company
- Name
customerGroupId
- Type
- string
- Description
CustomerGroupId used to identify Customer groups
- Name
companyId
- Type
- string
- Description
Company Id to identify the company
- Name
id
- Type
- string
- Description
id to identify the user address
- Name
title
- Type
- string
- Description
Title of the user e.g. Miss./Mrs./Mr.
- Name
firstName
- Type
- string
- Description
First name of the user
- Name
lastName
- Type
- string
- Description
Last name of the user
- Name
address1
- Type
- string
- Description
Address Line 1 provided by the user
- Name
address2
- Type
- string
- Description
Address Line 2 provided by the user
- Name
address3
- Type
- string
- Description
Address Line 3 provided by the user
- Name
city
- Type
- string
- Description
City name provided by the user
- Name
state
- Type
- string
- Description
State name provided by the user
- Name
country
- Type
- string
- Description
Country name provided by the user
- Name
countryCode
- Type
- string
- Description
Country code provided by the user
- Name
postCode
- Type
- string
- Description
Post code provided by the user
- Name
phoneNo
- Type
- string
- Description
Phone number of the user
- Name
mobileNo
- Type
- string
- Description
Mobile number of the user
- Name
companyName
- Type
- string
- Description
Name of the company provided by the user
- Name
address
- Type
- object
- Description
Address of the company
- Name
username
- Type
- string
- Description
Username of the user
- Name
telephone
- Type
- string
- Description
Telephone number of the user
- Name
mobile
- Type
- string
- Description
Mobile number of the user
- Name
gender
- Type
- string
- Description
Gender of the user
- Name
password
- Type
- string
- Description
Password of the user
- Name
nickName
- Type
- string
- Description
Nick name of the user
- Name
dayOfBirth
- Type
- string
- Description
Day of birth of the user
- Name
monthOfBirth
- Type
- string
- Description
Month of birth of the user
- Name
yearOfBirth
- Type
- string
- Description
Year of birth of the user
- Name
birthDate
- Type
- string
- Description
Birth date of the user
- Name
newsLetterSubscribed
- Type
- boolean
- Description
Flag to check if newsletter is subscribed by the user
- Name
userSourceType
- Type
- number
- Description
Source type of the user e.g. 1
- Name
referralType
- Type
- string
- Description
Referral type of the user
- Name
userReferrer
- Type
- string
- Description
Referrer of the the user
- Name
notifyByEmail
- Type
- boolean
- Description
Flag to check if user wants to be notified by email
- Name
notifyBySMS
- Type
- boolean
- Description
Flag to check if user wants to be notified by SMS
- Name
notifyByPost
- Type
- boolean
- Description
Flag to check if user wants to be notified by Post
- Name
registrationSource
- Type
- string
- Description
Registration source of the company
Response Properties
- Name
statusCode
- Type
- number
- Description
Status code of the response
- Name
status
- Type
- string
- Description
Status of the response
- Name
errors
- Type
- array
- Description
List of errors in the response
- Name
success
- Type
- boolean
- Description
Success status of the response
- Name
message
- Type
- string
- Description
Message of the response
- Name
messageCode
- Type
- string
- Description
Message code of the response
- Name
result
- Type
- boolean
- Description
Result of the response
Request
curl --location --request PUT 'https://api20.bettercommerce.io/api/v2/commerce/b2b/:companyId/update' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data '{
"companyId": "00000000-0000-0000-0000-000000000000",
"businessType": "string",
"registeredNumber": "string",
"priceListId": "00000000-0000-0000-0000-000000000000",
"companyUserRole": 0,
"customerGroupId": "00000000-0000-0000-0000-000000000000",
"address": {
"id": 0,
"title": "string",
"firstName": "string",
"lastName": "string",
"address1": "string",
"address2": "string",
"address3": "string",
"city": "string",
"state": "string",
"country": "string",
"countryCode": "string",
"postCode": "string",
"phoneNo": "string",
"mobileNo": "string",
"companyName": "string"
},
"username": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"title": "string",
"telephone": "string",
"mobile": "string",
"gender": "string",
"password": "string",
"nickName": "string",
"dayOfBirth": "string",
"monthOfBirth": "string",
"yearOfBirth": "string",
"birthDate": "string",
"postCode": "string",
"newsLetterSubscribed": true,
"userSourceType": 1,
"referralType": "Direct",
"userReferrer": "string",
"companyName": "string",
"notifyByEmail": true,
"notifyBySMS": true,
"notifyByPost": true,
"registrationSource": "string"
}'
Response
{
"statusCode": 410,
"status": "mollit incididunt reprehenderit id aliqua",
"errors": [
"dolor do",
"sit consequat consectetur"
],
"success": false,
"message": "nisi Lorem deserunt tempor",
"messageCode": "non voluptate veniam et",
"result": true
}
Get all users linked to a company.
This endpoint allows you to get all users linked to a company.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Get all users | /api/v2/commerce/b2b/:companyId/users | Get all users linked to a company |
. |
Required attributes
- Name
companyId
- Type
- string
- Description
Company Id used to identify the company
Response Properties
- Name
id
- Type
- string
- Description
id to identify the user
- Name
title
- Type
- string
- Description
Title of the user e.g. Miss./Mrs./Mr.
- Name
firstName
- Type
- string
- Description
First name of the user
- Name
lastName
- Type
- string
- Description
Last name of the user
- Name
address1
- Type
- string
- Description
Address Line 1 provided by the user
- Name
address2
- Type
- string
- Description
Address Line 2 provided by the user
- Name
address3
- Type
- string
- Description
Address Line 3 provided by the user
- Name
city
- Type
- string
- Description
City name provided by the user
- Name
state
- Type
- string
- Description
State name provided by the user
- Name
country
- Type
- string
- Description
Country name provided by the user
- Name
countryCode
- Type
- string
- Description
Country code provided by the user
- Name
postCode
- Type
- string
- Description
Post code provided by the user
- Name
phoneNo
- Type
- string
- Description
Phone number of the user
- Name
isDefault
- Type
- boolean
- Description
Flag to check if the address is default address
- Name
isDefaultDelivery
- Type
- boolean
- Description
Flag to check if the addresss is default delivery address
- Name
isDefaultForSubscription
- Type
- boolean
- Description
Flag to check if the address is default
- Name
companyName
- Type
- string
- Description
Name of the company provided by the user
- Name
isDefaultBilling
- Type
- boolean
- Description
Flag to check if the address is default billing address
- Name
companyId
- Type
- string
- Description
Company Id to identify the company
- Name
addressType
- Type
- number
- Description
Type of address
- Name
companyWebsite
- Type
- string
- Description
Company website url
- Name
tradingCurrency
- Type
- string
- Description
Trading currency for the region
- Name
fax
- Type
- string
- Description
Fax number of the company
- Name
recordId
- Type
- string
- Description
Record Id to identify the record
- Name
localTextKey
- Type
- string
- Description
local text key for the region
- Name
created
- Type
- string
- Description
Time when the quote was created
- Name
lastUpdated
- Type
- string
- Description
The date and time when the quote was last updated
- Name
createdBy
- Type
- string
- Description
Name of the user who created of the quote
- Name
lastUpdatedBy
- Type
- string
- Description
Name of the user who last updated the quote
- Name
ipAddress
- Type
- string
- Description
Ip address used to create the quote
- Name
orgId
- Type
- string
- Description
Organization Id of the quote
- Name
branchId
- Type
- string
- Description
Branch Id of the company that created the quote
- Name
domainId
- Type
- string
- Description
Domain Id of the company that created the quote
- Name
totalRecord
- Type
- number
- Description
Total number of records
- Name
currentPage
- Type
- number
- Description
Current page number
- Name
pageSize
- Type
- number
- Description
Size of the page
- Name
externalStatus
- Type
- string
- Description
External status of the quote
- Name
notifyByEmail
- Type
- boolean
- Description
Flag to check if user wants to be notified by email
- Name
notifyBySMS
- Type
- boolean
- Description
Flag to check if user wants to be notified by SMS
- Name
notifyByPost
- Type
- boolean
- Description
Flag to check if user wants to be notified by Post
- Name
gender
- Type
- string
- Description
Gender of the user
- Name
password
- Type
- string
- Description
Password of the user
- Name
username
- Type
- string
- Description
Username of the user
- Name
telephone
- Type
- string
- Description
Telephone number of the user
- Name
email
- Type
- string
- Description
Email of the company
- Name
salt
- Type
- string
- Description
Salt value for hashing password
- Name
lastIpAddress
- Type
- string
- Description
Last Ip address that updated the company details
- Name
isBlocked
- Type
- boolean
- Description
Flag to check if the user is blocked
- Name
userSourceType
- Type
- string
- Description
The source type of the user
- Name
culture
- Type
- string
- Description
Culture of the company
- Name
isRegistered
- Type
- boolean
- Description
Flag to check if the user is registered
- Name
browserName
- Type
- string
- Description
Name of the browser
- Name
sourceProcess
- Type
- string
- Description
Source process of the company
- Name
sessionId
- Type
- string
- Description
Session Id of the Session
- Name
deviceId
- Type
- string
- Description
Device Id to identify the device
- Name
emailexternalAccountingId
- Type
- string
- Description
External accounting Email Id
- Name
isWelcomeEmailSent
- Type
- boolean
- Description
Flag to check if the Welcome email is sent
Request
curl --location --globoff 'https://api20.bettercommerce.io/api/v2/commerce/b2b/{{b2b_company_id}}/users'
Response
[
{
"userId": "00000000-0000-0000-0000-000000000000",
"firstName": "laborum ut",
"lastName": "nisi veniam labore Duis consequat",
"title": "ipsum aliqua consequat eiusmod ut",
"phoneNo": "proident laborum Excepteur",
"gender": "adipisicing in ut",
"telephone": "cillum proiden",
"username": "labore adipisicing",
"email": "in",
"password": "ullamco nostrud Lorem",
"salt": "laboris magna Ut",
"lastIpAddress": "dolore cillum nostrud",
"isBlocked": true,
"userSourceType": "dolor in ut ad",
"companyId": "00000000-0000-0000-0000-000000000000",
"address": {
"addressType": -29723845,
"companyWebsite": "ea ipsum consequat",
"tradingCurrency": "dolor dolore",
"userId": "00000000-0000-0000-0000-000000000000",
"title": "r",
"firstName": "voluptate anim incididunt",
"lastName": "qui eiusmod laborum id",
"address1": "ad",
"address2": "eu nisi esse commodo qui",
"address3": "laboris est nulla esse elit",
"city": "cons",
"state": "mollit culpa Excepteur",
"country": "proident sit",
"countryCode": "nulla dolor fugiat dolore",
"postCode": "incididunt sed",
"phoneNo": "amet sit aliquip in velit",
"isDefaultDelivery": true,
"isDefaultBilling": true,
"isDefault": false,
"isDefaultForSubscription": true,
"companyName": "nostrud ut veniam",
"companyId": "dolore laboris nostrud consequat",
"fax": "dolor est a",
"email": "culpa est ea eni",
"id": 37751446,
"recordId": "00000000-0000-0000-0000-000000000000",
"localTextKey": "magna fugiat culpa cillum",
"created": "1955-02-21T22:52:08.558Z",
"lastUpdated": "2003-10-13T04:42:18.563Z",
"createdBy": "ut",
"lastUpdatedBy": "mollit nisi",
"ipAddress": "consectetur laborum officia",
"orgId": "00000000-0000-0000-0000-000000000000",
"branchId": "00000000-0000-0000-0000-000000000000",
"domainId": "00000000-0000-0000-0000-000000000000",
"totalRecord": -18149664,
"currentPage": -16446228,
"pageSize": 67616735,
"externalStatus": "e"
},
"companyUserRole": "Duis of",
"culture": "ut consectetur",
"isRegistered": false,
"notifyByEmail": false,
"notifyBySMS": true,
"notifyByPost": false,
"browserName": "qui pariatur officia eiusmod voluptate",
"sourceProcess": "exercitation pariatur ea",
"sessionId": "incididunt voluptate",
"deviceId": "pariatur",
"externalAccountingId": "culpa minim in cupidatat",
"isWelcomeEmailSent": true,
"id": 13918460,
"recordId": "00000000-0000-0000-0000-000000000000",
"localTextKey": "culpa",
"created": "2019-01-19T13:08:58.083Z",
"lastUpdated": "1956-06-22T04:21:04.141Z",
"createdBy": "ad ullamco veniam enim amet",
"lastUpdatedBy": "exercitation ullamc",
"ipAddress": "mollit labore amet",
"orgId": "00000000-0000-0000-0000-000000000000",
"branchId": "00000000-0000-0000-0000-000000000000",
"domainId": "00000000-0000-0000-0000-000000000000",
"totalRecord": -83590821,
"currentPage": -20772759,
"pageSize": -7792186,
"externalStatus": "cupidatat nulla magna enim"
},
{
"userId": "00000000-0000-0000-0000-000000000000",
"firstName": "in amet Duis",
"lastName": "officia irure",
"title": "Duis aliquip esse fugiat",
"phoneNo": "adipisicing sed Duis enim",
"gender": "fugiat irure officia",
"telephone": "occaecat aliqua",
"username": "sint laborum",
"email": "mollit non",
"password": "adipisicing do laboris",
"salt": "est exercitation dolore",
"lastIpAddress": "do et ",
"isBlocked": false,
"userSourceType": "fugiat",
"companyId": "00000000-0000-0000-0000-000000000000",
"address": {
"addressType": 60256982,
"companyWebsite": "amet occaecat dolore",
"tradingCurrency": "adipisicing enim aliqua aute et",
"userId": "00000000-0000-0000-0000-000000000000",
"title": "tempor enim veniam Lorem",
"firstName": "aliquip voluptate",
"lastName": "fugiat minim",
"address1": "sed id",
"address2": "ullamco voluptate",
"address3": "moll",
"city": "dolor tempor anim",
"state": "cupidatat dolore aliqua aute",
"country": "mollit sed cupidatat laborum",
"countryCode": "Lorem aute ipsum esse dolor",
"postCode": "Duis proident ipsum nulla",
"phoneNo": "anim commodo ullamco aliqua",
"isDefaultDelivery": false,
"isDefaultBilling": true,
"isDefault": true,
"isDefaultForSubscription": false,
"companyName": "enim amet officia ullamco",
"companyId": "sint anim qui",
"fax": "dolor occaecat ut",
"email": "cupidatat minim Lorem irure",
"id": 89615858,
"recordId": "00000000-0000-0000-0000-000000000000",
"localTextKey": "laboris irure aliquip dolore",
"created": "1977-07-21T18:18:05.722Z",
"lastUpdated": "1956-09-11T08:19:10.466Z",
"createdBy": "minim dolor dolore adipisicing commodo",
"lastUpdatedBy": "culpa",
"ipAddress": "nisi do",
"orgId": "00000000-0000-0000-0000-000000000000",
"branchId": "00000000-0000-0000-0000-000000000000",
"domainId": "00000000-0000-0000-0000-000000000000",
"totalRecord": 37485155,
"currentPage": -13865754,
"pageSize": 10505345,
"externalStatus": "ex aute Ut"
},
"companyUserRole": "labore adipisicing do",
"culture": "reprehenderit fugiat sed aliqua",
"isRegistered": false,
"notifyByEmail": true,
"notifyBySMS": false,
"notifyByPost": false,
"browserName": "do proident velit dolor labore",
"sourceProcess": "officia incididunt",
"sessionId": "incididunt reprehenderit labore nul",
"deviceId": "quis nisi labore deserunt",
"externalAccountingId": "eiusmod cupidatat",
"isWelcomeEmailSent": false,
"id": 75666981,
"recordId": "00000000-0000-0000-0000-000000000000",
"localTextKey": "nostrud Duis ea in est",
"created": "1991-08-23T11:32:28.024Z",
"lastUpdated": "1989-07-25T09:42:52.788Z",
"createdBy": "sed in et cupidatat consequat",
"lastUpdatedBy": "sunt tempor sit ut",
"ipAddress": "pariatur",
"orgId": "00000000-0000-0000-0000-000000000000",
"branchId": "00000000-0000-0000-0000-000000000000",
"domainId": "00000000-0000-0000-0000-000000000000",
"totalRecord": -30541217,
"currentPage": -27131341,
"pageSize": -99935579,
"externalStatus": "amet tempor n"
}
]
Get list of quotes.
This endpoint allows you to get a list of Quotes.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Getting Quotations | /api/v2/commerce/b2b/:userId/quotes | Get list of quotes. |
Required attributes
- Name
userId
- Type
- string
- Description
User Id used to identify the user
Response Properties
- Name
statusCode
- Type
- number
- Description
Status code of the response
- Name
status
- Type
- string
- Description
Status of the response
- Name
errors
- Type
- array
- Description
List of errors in the response
- Name
success
- Type
- boolean
- Description
Success status of the response
- Name
message
- Type
- string
- Description
Message of the response
- Name
messageCode
- Type
- string
- Description
Message code of the response
- Name
result
- Type
- array
- Description
Result of the response
- Name
id
- Type
- string
- Description
id to identify the user
- Name
title
- Type
- string
- Description
Title of the user e.g. Miss./Mrs./Mr.
- Name
firstName
- Type
- string
- Description
First name of the user
- Name
lastName
- Type
- string
- Description
Last name of the user
- Name
address1
- Type
- string
- Description
Address Line 1 provided by the user
- Name
address2
- Type
- string
- Description
Address Line 2 provided by the user
- Name
address3
- Type
- string
- Description
Address Line 3 provided by the user
- Name
city
- Type
- string
- Description
City name provided by the user
- Name
state
- Type
- string
- Description
State name provided by the user
- Name
country
- Type
- string
- Description
Country name provided by the user
- Name
countryCode
- Type
- string
- Description
Country code provided by the user
- Name
postCode
- Type
- string
- Description
Post code provided by the user
- Name
phoneNo
- Type
- string
- Description
Phone number of the user
- Name
mobileNo
- Type
- string
- Description
Mobile number of the user
- Name
customerId
- Type
- string
- Description
Customer Id to identify the user
- Name
isDefault
- Type
- boolean
- Description
Flag to check if the address is default address
- Name
isDefaultDelivery
- Type
- boolean
- Description
Flag to check if the addresss is default delivery address
- Name
isDefaultForSubscription
- Type
- boolean
- Description
Flag to check if the address is default
- Name
companyName
- Type
- string
- Description
Name of the company provided by the user
- Name
isDefaultBilling
- Type
- boolean
- Description
Flag to check if the address is default billing address
- Name
purchaseOrderNo
- Type
- string
- Description
Order number of the purchase made
- Name
quoteName
- Type
- string
- Description
Name of the quotation
- Name
companyId
- Type
- string
- Description
Company Id to identify the company
- Name
shippingAddress
- Type
- object
- Description
Shipping address of the company
- Name
billingAddress
- Type
- object
- Description
Billing address of the company
- Name
quoteId
- Type
- string
- Description
Quote Id of the Quote
- Name
contactId
- Type
- string
- Description
Contact id of the company
- Name
validUntil
- Type
- time
- Description
Deadline for Validity of the quote
- Name
validDays
- Type
- number
- Description
Number days of validity of the quote
- Name
status
- Type
- number
- Description
Status of the Quote
- Name
customQuoteNo
- Type
- string
- Description
Custom Quote number for the Quotation e.g 'JAN2022'
- Name
shippingMethodCode
- Type
- string
- Description
Shipping method code for shipping e.g. 'STD'
- Name
shippingMethodName
- Type
- String
- Description
Shipping method name for shipping e.g. 'Standard'
- Name
shippingCost
- Type
- number
- Description
Cost of shipping
- Name
addressType
- Type
- number
- Description
Type of address
- Name
companyWebsite
- Type
- string
- Description
Company website url
- Name
tradingCurrency
- Type
- string
- Description
Trading currency for the region
- Name
fax
- Type
- string
- Description
Fax number of the company
- Name
recordId
- Type
- string
- Description
Record Id to identify the record
- Name
localTextKey
- Type
- string
- Description
local text key for the region
- Name
created
- Type
- string
- Description
Time when the quote was created
- Name
lastUpdated
- Type
- string
- Description
The date and time when the quote was last updated
- Name
createdBy
- Type
- string
- Description
Name of the user who created of the quote
- Name
lastUpdatedBy
- Type
- string
- Description
Name of the user who last updated the quote
- Name
ipAddress
- Type
- string
- Description
Ip address used to create the quote
- Name
orgId
- Type
- string
- Description
Organization Id of the quote
- Name
branchId
- Type
- string
- Description
Branch Id of the company that created the quote
- Name
domainId
- Type
- string
- Description
Domain Id of the company that created the quote
- Name
totalRecord
- Type
- number
- Description
Total number of records
- Name
currentPage
- Type
- number
- Description
Current page number
- Name
pageSize
- Type
- number
- Description
Size of the page
- Name
externalStatus
- Type
- string
- Description
External status of the quote
- Name
userName
- Type
- string
- Description
Username of the user
- Name
createdByAdmin
- Type
- boolean
- Description
Flag to check if the quote is created by the admin
- Name
orderNo
- Type
- number
- Description
Order Number of the order
- Name
orderId
- Type
- string
- Description
Order Id of the order
- Name
orderStatus
- Type
- number
- Description
Order Status of the order
- Name
isQuoteExpired
- Type
- boolean
- Description
Flag to check if the Quote has expired
Request
curl --location --globoff 'https://api20.bettercommerce.io/api/v2/commerce/b2b/{{b2b_user_id}}/quotes'
Response
{
"statusCode": 200,
"status": "OK",
"errors": [],
"success": true,
"message": null,
"messageCode": null,
"result": [
{
"id": "00000000-0000-0000-0000-000000000000",
"quoteId": "00000000-0000-0000-0000-000000000000",
"companyId": "00000000-0000-0000-0000-000000000000",
"companyName": "Company Name",
"quoteName": "My Quote",
"contactId": "00000000-0000-0000-0000-000000000000",
"purchaseOrderNo": "PO00001",
"validUntil": "0001-01-01T00:00:00",
"validDays": 3,
"status": 1,
"customQuoteNo": "JAN2022",
"shippingMethodCode": "STD",
"shippingMethodName": "Standerd",
"shippingCost": 10.99,
"email": "myemail@example.com",
"customerId": "f55eab3d-2cc1-48c3-bc93-30ae95bf522f",
"shippingAddress": {
"addressType": 0,
"companyWebsite": null,
"tradingCurrency": null,
"userId": "00000000-0000-0000-0000-000000000000",
"title": "Mr.",
"firstName": "David",
"lastName": "Smith",
"address1": "Address Line 1",
"address2": "Address Line 2",
"address3": "Address Line 3",
"city": "London",
"state": "London",
"country": "United Kingdom",
"countryCode": "UK",
"postCode": "XX55YY",
"phoneNo": "9999999999",
"isDefaultDelivery": false,
"isDefaultBilling": false,
"isDefault": false,
"isDefaultForSubscription": false,
"companyName": "My Company",
"companyId": null,
"fax": null,
"email": null,
"id": 0,
"recordId": "00000000-0000-0000-0000-000000000000",
"localTextKey": null,
"created": null,
"lastUpdated": null,
"createdBy": null,
"lastUpdatedBy": null,
"ipAddress": null,
"orgId": "00000000-0000-0000-0000-000000000000",
"branchId": "00000000-0000-0000-0000-000000000000",
"domainId": "00000000-0000-0000-0000-000000000000",
"totalRecord": 0,
"currentPage": 1,
"pageSize": 0,
"externalStatus": null
},
"billingAddress": {
"addressType": 0,
"companyWebsite": null,
"tradingCurrency": null,
"userId": "00000000-0000-0000-0000-000000000000",
"title": "Mr.",
"firstName": "David",
"lastName": "Smith",
"address1": "Address Line 1",
"address2": "Address Line 2",
"address3": "Address Line 3",
"city": "London",
"state": "London",
"country": "United Kingdom",
"countryCode": "UK",
"postCode": "XX55YY",
"phoneNo": "9999999999",
"isDefaultDelivery": false,
"isDefaultBilling": false,
"isDefault": false,
"isDefaultForSubscription": false,
"companyName": "My Company",
"companyId": null,
"fax": null,
"email": null,
"id": 0,
"recordId": "00000000-0000-0000-0000-000000000000",
"localTextKey": null,
"created": null,
"lastUpdated": null,
"createdBy": null,
"lastUpdatedBy": null,
"ipAddress": null,
"orgId": "00000000-0000-0000-0000-000000000000",
"branchId": "00000000-0000-0000-0000-000000000000",
"domainId": "00000000-0000-0000-0000-000000000000",
"totalRecord": 0,
"currentPage": 1,
"pageSize": 0,
"externalStatus": null
},
"userName": "myemail@example.com",
"createdByAdmin": false,
"orderNo": 100001,
"orderId": "00000000-0000-0000-0000-000000000000",
"orderStatus": 1,
"isQuoteExpired": false
}
]
}
Get the company details by UserId.
This endpoint allows you to get a list of Quotes.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Getting Company details | /api/v2/commerce/b2b/:userId/company | Get the company details by UserId. |
Required attributes
- Name
userId
- Type
- string
- Description
User Id used to identify the user
Response Properties
- Name
statusCode
- Type
- number
- Description
Status code of the response
- Name
status
- Type
- string
- Description
Status of the response
- Name
errors
- Type
- array
- Description
List of errors in the response
- Name
success
- Type
- boolean
- Description
Success status of the response
- Name
message
- Type
- string
- Description
Message of the response
- Name
messageCode
- Type
- string
- Description
Message code of the response
- Name
result
- Type
- array
- Description
Result of the response
- Name
id
- Type
- string
- Description
id to identify the user
- Name
title
- Type
- string
- Description
Title of the user e.g. Miss./Mrs./Mr.
- Name
firstName
- Type
- string
- Description
First name of the user
- Name
lastName
- Type
- string
- Description
Last name of the user
- Name
address1
- Type
- string
- Description
Address Line 1 provided by the user
- Name
address2
- Type
- string
- Description
Address Line 2 provided by the user
- Name
address3
- Type
- string
- Description
Address Line 3 provided by the user
- Name
city
- Type
- string
- Description
City name provided by the user
- Name
state
- Type
- string
- Description
State name provided by the user
- Name
country
- Type
- string
- Description
Country name provided by the user
- Name
countryCode
- Type
- string
- Description
Country code provided by the user
- Name
postCode
- Type
- string
- Description
Post code provided by the user
- Name
phoneNo
- Type
- string
- Description
Phone number of the user
- Name
mobileNo
- Type
- string
- Description
Mobile number of the user
- Name
customerId
- Type
- string
- Description
Customer Id to identify the user
- Name
isDefault
- Type
- boolean
- Description
Flag to check if the address is default address
- Name
isDefaultDelivery
- Type
- boolean
- Description
Flag to check if the addresss is default delivery address
- Name
isDefaultForSubscription
- Type
- boolean
- Description
Flag to check if the address is default
- Name
companyName
- Type
- string
- Description
Name of the company provided by the user
- Name
isDefaultBilling
- Type
- boolean
- Description
Flag to check if the address is default billing address
- Name
companyId
- Type
- string
- Description
Company Id to identify the company
- Name
status
- Type
- number
- Description
Status of the Quote
- Name
tradingCurrency
- Type
- string
- Description
Trading currency for the region
- Name
customerGroup
- Type
- string
- Description
Name og the customer group
- Name
erpCompanyCode
- Type
- string
- Description
ERP company code of the company
- Name
companyCode
- Type
- string
- Description
Company code of the company
- Name
companyRegNo
- Type
- string
- Description
Registration number of the company
- Name
taxRegNo
- Type
- string
- Description
Tax registration number of the company
- Name
creditLimit
- Type
- object
- Description
Credit limit of the company
- Name
minPrice
- Type
- number
- Description
Minimum price for the company
- Name
minPriceWithoutTax
- Type
- number
- Description
Minimum price for the company without tax
- Name
maxPrice
- Type
- number
- Description
Maximum price for the company
- Name
maxPriceWithoutTax
- Type
- number
- Description
Maximum price for the company wihtout tax
- Name
currencyDecimalSeparator
- Type
- string
- Description
Currency decimal separator for the region
- Name
currencyDigitsAfterDecimal
- Type
- number
- Description
Digits after decimal for the currency
- Name
currencySymbol
- Type
- string
- Description
Symbol for the currency of the region
- Name
notifyByEmail
- Type
- boolean
- Description
Flag to check if user wants to be notified by email
- Name
notifyBySMS
- Type
- boolean
- Description
Flag to check if user wants to be notified by SMS
- Name
notifyByPost
- Type
- boolean
- Description
Flag to check if user wants to be notified by Post
- Name
cheque
- Type
- boolean
- Description
Flag to check if cheques are available
- Name
accountCredit
- Type
- boolean
- Description
Flag to check if account credit is available
- Name
priceListId
- Type
- string
- Description
Price list Id used to identify the price list
"": true,
Request
curl --location --globoff 'https://api20.bettercommerce.io/api/v2/commerce/b2b/{{b2b_user_id}}/company'
Response
{
"statusCode": 504,
"status": "sunt aute",
"errors": [
"laboris fugiat anim",
"veniam dolor sint"
],
"success": true,
"message": "ullamco",
"messageCode": "fugiat enim nisi Excepteur Ut",
"result": {
"email": "anim",
"companyId": "00000000-0000-0000-0000-000000000000",
"businessType": "et incididunt dolore ea",
"companyName": "reprehenderit pariatur in",
"telephone": "sit commodo laborum tempor",
"mobile": "Excepteur enim",
"companyAddress": {
"id": 0,
"title": "Mr.",
"firstName": "David",
"lastName": "Smith",
"address1": "Address Line 1",
"address2": "Address Line 2",
"address3": "Address Line 3",
"city": "London",
"state": "London",
"country": "United Kingdom",
"countryCode": "UK",
"postCode": "XX55YY",
"phoneNo": "9999999999",
"mobileNo": "888888888",
"customerId": "0793e2e6-fbf4-4031-86a7-7397a77d8be4",
"isDefault": false,
"isDefaultDelivery": false,
"isDefaultForSubscription": false,
"companyName": "My Company",
"isDefaultBilling": false
},
"addresses": [
{
"id": 0,
"title": "Mr.",
"firstName": "David",
"lastName": "Smith",
"address1": "Address Line 1",
"address2": "Address Line 2",
"address3": "Address Line 3",
"city": "London",
"state": "London",
"country": "United Kingdom",
"countryCode": "UK",
"postCode": "XX55YY",
"phoneNo": "9999999999",
"mobileNo": "888888888",
"customerId": "0793e2e6-fbf4-4031-86a7-7397a77d8be4",
"isDefault": false,
"isDefaultDelivery": false,
"isDefaultForSubscription": false,
"companyName": "My Company",
"isDefaultBilling": false
}
],
"customerGroup": "dolore dolor",
"erpCompanyCode": "sit eiusmod sunt dolor mollit",
"companyCode": "veniam aliqua aliqu",
"companyRegNo": "Ut cupidatat esse",
"taxRegNo": "officia magna sint aliquip",
"tradingCurrency": "aute cillum ut laboris",
"creditLimit": {
"minPrice": -57666663.87639576,
"minPriceWithoutTax": 7132301.412465394,
"maxPrice": 9453313.206519768,
"maxPriceWithoutTax": 61779026.15392864,
"currencyDecimalSeparator": "ad in",
"currencyDigitsAfterDecimal": -22949321,
"currencySymbol": "deserunt in do eu elit",
"formatted": {
"value": "<Error: Too many levels of nesting to fake this schema>"
},
"raw": {
"value": "<Error: Too many levels of nesting to fake this schema>"
}
},
"creditAvailable": {
"minPrice": -26461928.809347987,
"minPriceWithoutTax": -81993082.21030761,
"maxPrice": -75299234.90739572,
"maxPriceWithoutTax": -55422249.0122017,
"currencyDecimalSeparator": "in e",
"currencyDigitsAfterDecimal": 65688757,
"currencySymbol": "cupidatat sunt",
"formatted": {
"value": "<Error: Too many levels of nesting to fake this schema>"
},
"raw": {
"value": "<Error: Too many levels of nesting to fake this schema>"
}
},
"usedCredit": {
"minPrice": 43911630.93543008,
"minPriceWithoutTax": 53628893.73218545,
"maxPrice": 24168537.859023422,
"maxPriceWithoutTax": 72858159.324974,
"currencyDecimalSeparator": "exercitation esse aliquip officia in",
"currencyDigitsAfterDecimal": 373631,
"currencySymbol": "labore sunt culpa",
"formatted": {
"value": "<Error: Too many levels of nesting to fake this schema>"
},
"raw": {
"value": "<Error: Too many levels of nesting to fake this schema>"
}
},
"creditLimitLastRefreshed": "1999-07-29T05:58:53.668Z",
"cheque": true,
"accountCredit": true,
"priceListId": "00000000-0000-0000-0000-000000000000",
"notifyByEmail": true,
"notifyBySMS": false,
"notifyByPost": true
}
}