Get Company
This GET endpoint retrieves detailed information about a specific company identified by its unique ID.
Endpoint
- URL:
/companies/{company_id} - Method:
GET
Path Parameters
| Parameter | Type | Description |
|---|---|---|
company_id | string | The unique identifier of the company to be retrieved. |
Authentication
- Header:
accessToken - Type: Bearer Token
- Value:
<ACCESS-TOKEN>
Request Headers
| Header | Type | Description |
|---|---|---|
accessToken | string | Access token for authentication. (required) |
Sample Request
curl --location '<BASE-URL>/companies/66b9b3b166169eecd60e5ba8' \
--header 'accessToken: <ACCESS-TOKEN>'
Response
- Status Code: 200 OK
Sample Response Body
The response will include detailed information about the requested company.
{
"success": true,
"data": {
"entityId": 22,
"name": "KBR",
"email": "john@aximcommerce.com",
"phoneNumber": "67243422",
"status": "active",
"billingAddress": [
{
"firstName": "John",
"lastName": "Don",
"address1": "102 East Green Milton Road",
"address2": "Culpa reprehenderit",
"phoneNumber": "67243422",
"city": "Culpa qui molestias",
"state": {
"name": "Alabama",
"code": "AL"
},
"country": {
"name": "United States",
"code": "US"
},
"zipcode": "35043",
"isDefaultAddress": true,
"status": true,
"metaFields": [],
"createdAt": "2024-08-12T07:03:13.111Z",
"updatedAt": "2024-08-12T07:03:13.111Z",
"id": "66b9b3b166169eecd60e5ba9"
}
],
"shippingAddress": [
{
"firstName": "John",
"lastName": "Don",
"address1": "3700 Old Seward Hwy",
"address2": "",
"phoneNumber": "9075615173",
"city": "Anchorage",
"state": {
"name": "Alabama",
"code": "AL"
},
"country": {
"name": "United States",
"code": "US"
},
"zipcode": "99503",
"isDefaultAddress": true,
"status": true,
"metaFields": [],
"createdAt": "2024-08-23T13:27:13.715Z",
"updatedAt": "2024-08-23T13:27:13.715Z",
"id": "66b9b3b166169eecd60e5baa"
}
]
// additional company fields...
}
}
Success Response Body
| Field | Type | Description |
|---|---|---|
id | string | ID of the company. |
entityId | number | Unique identifier for the company within the system. |
name | string | Name of the company. |
email | string | Email address associated with the company. |
phoneNumber | string | Primary contact number for the company. |
status | string | Current status of the company (e.g., "active"). |
billingAddress | object | An array of billing address objects for the company. |
shippingAddress | array | An array of shipping address objects for the company. |
priceLists | array | Price lists associated with the company. Currently empty in the sample response. |
productGroups | object | Product group inclusion/exclusion details. |
shippingMethods | array | Shipping methods available for the company. |
paymentMethods | array | Payment methods available for the company. |
isTaxExempt | Boolean | Does company is Tax Exempt |
paymentTerms | Array | Payment Terms available for the company. |
isSubCompany | boolean | Indicates whether the company is a subsidiary. |
createdBy | object | Information about the user or account that created this company entry. |
metaFields | array | Additional meta-information about the company. Currently empty in the sample response. |
createdAt | string | Timestamp of when the company entry was created. |
updatedAt | string | Timestamp of the last update to the company entry. |
logo | string | URL of the company's logo, if available. |
notes | string | Additional notes about the company. |
companyGroup | any | The company group to which this company belongs, if applicable. |
Billing/Shipping Address Structure
Each address (billing and shipping) contains:
| Field | Type | Description |
|---|---|---|
id | string | Database identifier for the address. |
companyName | string | Company name of this contact. |
companyEmail | string | Company email of the contact. |
firstName | string | First name of the contact person at this address. |
lastName | string | Last name of the contact person at this address. |
address1 | string | Primary address line. |
address2 | string | Secondary address line. Optional. |
phoneNumber | string | Contact phone number for the address. |
city | string | City of the address. |
state | object | State object containing the name and code of the state. |
country | object | Country object containing the name and code of the country. |
zipcode | string | Postal code of the address. |
isDefaultAddress | boolean | Indicates whether this address is the default. |
status | boolean | Status of the address. Indicates active/inactive. |
metaFields | array | Meta information related to the address. Currently empty in the sample response. |
createdAt | string | Timestamp of when the address was created. |
updatedAt | string | Timestamp of the last update to the address. |
Payment Terms
| Field | Type | Description |
|---|---|---|
paymentTerm | id | Id of payment Term. |
depositRequired | boolean | Is deposit required for placing order |
depositPercentage | number | Deposit percentage need to place order |
Error Responses
| Status Code | Description |
|---|---|
| 404 | Bad Request: Invalid input data. |
| 401 | No company matches the specified company_id. |
| 500 | Internal Server Error: An error occurred on the server. |
Notes
- Ensure the
company_idin the URL is replaced with the actual ID of the company you wish to retrieve. - Confirm that the access token is valid and active to authenticate the request successfully.