Overview
Use the Product Odata to filter, sort, retrieve and update a product across an Aimbase instance. This is an OData endpoint and it will support the OData query language. More information about this can be found at odata.org.
Related APIs:
- To create a product with an Aimbase use the Product API.
- To filter, sort, retrieve and update a brand use the Brand Odata.
Possible Response Codes
- 204 (No Content). This request was successful. Product(s) information was retrieved.
- 404 (Not Found). The dealer was not able to be found.
-
500 (Internal Server Error). The request was malformed, the product given in the request did not exist, or some other unspecified error occurred when attempting to retrieve dealer information.
Authentication
The Product API requires authentication. The HTTP POST will require a valid Authenticate message header with an API token. See the Aimbase Authentication Web Service Specification for more details on how to retrieve a valid API token.
Authenticate message header example:
Authenticate: Avala-Api {username}:{token}
Query Information
This OData API allows GET, CREATE and PATCH.
Endpoint for GET
GET https://{baseurl}/odata/V2/Products
Endpoint for CREATE
POST https://{baseurl}/odata/V2/Products
Endpoint for PATCH
PATCH https://{baseurl}/odata/V2/Products
Product OData Schema
Field Name |
Editable | Values |
Description |
Id |
|
The Aimbase Id of the product. |
|
Name |
|
Product Name. |
|
ManufacturerPlantId |
The Id of the plant manufacturer. | ||
ProductTypeId |
Unique product type Id. | ||
SkuId |
The sku id. | ||
Model |
The product model name. | ||
ModelYear | The product model year. | ||
Code | The unique product code. | ||
CodeOverride | |||
DisplayOrder | The order in which the product will display on a form. | ||
IsActive | The product is active or not. | ||
LegacyProductKey | |||
ApplicationContextId | Id that Indicates if the product applicable for the sales or marketing module. | ||
CreatedDate | The date the product is created. | ||
UpdateDate | The date the product was last updated. | ||
CreateAccountId | The account that created the product. | ||
UpdateAccountId |
The account that last updated the product. |
||
LegacyProductId | |||
ProductCategoryId |
The Id used for a unique product category. |
||
BrandId | The brand's unique identifier. | ||
ProductCategoryCode | The code used for a unique product category. | ||
ProductTypeCode | The code used for a unique product type. | ||
ProductBrandCode | The code used for a unique product brand. | ||
ManufacturerPlantCode | The code for the manufacturer plant. | ||
SkuCode | |||
ApplicationContextCode | The code that Indicates if the product applicable for the sales or marketing module. | ||
Customs |
Examples:
Get all Products
GET http://{baseurl}/odata/V2/Products
Get Product by Id
GET http://{baseurl}/odata/V2/Products(id)
Get Product with Id and Expand by Product Category
GET http://{baseurl}/odata/V2/Products(id)?$expand=ProductCategory
Create a Product
POST https://{baseurl}/odata/V2/Products Content-Type: application/json Authenticate: Avala-Api {username}:{token} { "Name": "Falcon", "Model": "FL12", "ModelYear": "2021", "Code": "FL12" "CodeOverride": null, "DisplayOrder": 15, "IsActive":true, "LegacyProductKey": null, "ProductCategoryId": 672, "ProductTypeId": 14, "BrandId": 1, "ApplicationContextId":1, "Customs": { "Division": "test3" } }
Update a Product
PATCH https://{baseurl}/odata/V2/Products(2) Content-Type: application/json Authenticate: Avala-Api {username}:{token} { "Name": "Falcon", "Model": "FL12", "ProductCategoryId": 672, "Customs": { "Division": "test3" } }