Pricing API V3
Contents
1. Introduction
2. Client Credentials
3. Requesting Access Token using Client Credentials
3.1. Endpoint and Protocol
3.2. Headers
3.3. Input Parameters
3.4. Output Parameters
3.5. Sample Request
3.6. Sample Response
4. Get Configured Suppliers Names
4.1. Endpoint and Protocol
4.2. Header
4.3. Output Parameters
4.4. Status Codes and Messages
4.5. Sample Request and Response
5. Initiate Pricing API
5.1. Endpoint and Protocol
5.2. Header
5.3. Input Parameters
5.4. Output Parameters
5.5. Status Codes and Messages
5.6. Sample Request and Response
6. Get Saved Pricing API
6.1. Endpoint and Protocol
6.2. Header
6.3. Input Parameters
6.4. Output Parameters
6.5. Status Codes and Messages
6.6. Sample Request and Response
1. Introduction
Get pricing and availability information using Component Search API.
2. Client Credentials
Key: Value
ClientTypeName: Pricing API
ClientID
ClientName
ClientUri
ClientSecret
PostmanLink
3. Requesting Access Token using Client Credentials
3.1. Endpoint and Protocol
Environment: Production
Protocol: HTTPS
Http Method: POST
3.2. Headers
Sr No: 1
Field Name: Content-Type
Possible Value: application/x-www-form-urlencoded
Description: The specs supports only this Content Type
3.3. Input Parameters
The following section provides information about parameters to be passed.
SR Field Name Data Type Possible Values Description
1 grant_type String client_credentials Since we are
using Client
Credentials
Flow
2 Scope String CQPricing API Name of the
Scope for
which client
wants Access
Token
3 client_id String Will be
provided by
CQ Support
4 client_secret String Will be
provided by
CQ Support
3.4. Output Parameters
The following section provides information about parameters in the response.
SR Field Name Data Type Possible Values Description
1 acces_token String Token Value
2 expires_in Integer 3600 Token
expiration
time in
seconds
3 token_type String Bearer
3.5. Sample Request
Body: grant_type=client_credentials&scope=CQPricingAPI&client_id=XyzfDlKbCQc7f40YGml1VPki1fmw08Pi&client_secret=Rt9bXsYj6KTdBBJLxFdznF7GsPGOitWpOXtDjiSf3bP1XzPMai35DGPNc
3.6. Sample Response
The following section shows a sample response.
Http Status: 200
Body:
{
"access_token":
"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6ImEzck1VZ01Gdjl0UGNsTGE2eUYzekFrZnF1RSIsImtpZCI6ImEzck1VZ01Gdjl0UGNsTGE2eUYzekFrZnF1RSJ9.eyJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo0NDMwMC9pZGVudGl0eSIsImF1ZCI6Imh0dHBzOi8vbG9jYWxob3N0OjQ0MzAwL2lkZW50aXR5L3Jlc291cmNlcyIsImV4cCI6MTUxNDk4MTMzNiwibmJmIjoxNTE0OTc3NzM2LCJjbGllbnRfaWQiOiJlckQ1SEhGbHJnV0NMNkVTVTkyaUl6ZXRxeFFrbE5UYiIsInNjb3BlIjoiQ1FQcmljaW5nQVBJIn0.b_bOULk4tqJiOJchgynm_0pyGjy8DVXlqnoGE0TtSKbSNCLsyM0xA_U7rF6iqnkBfdt5YEaC-nMFN0T9bnZviZcQUeZ5ybFT0s2Q-kbEvcynxY-2916Llih_2Nd3d_X9sm3oN3pCx22xTJU_7jFSCy0LHMzDiPaYW-MDCYPmFwfMlxbeMTib7mITe9VCqP1JbtR0F79TtLoDuSMOYjcW_O8DMK_xiDUjPsm_j_RXVR4dqCVdPjkKz6yHqL6AzM8iNJhyEYPihXZqVyJHylutanx6baTFzHjCQpA03W509nRdUmijuHT8O5RztOlfoEJQWZ33Wks3dbZEsXPUZGBSIQ",
"expires_in": 3600,
"token_type": "Bearer"
}
4. Get Configured Suppliers Name
4.1. Endpoint and Protocol
Environment: Prod
Protocol: HTTPS
HTTP Method: GET
4.2. Header
SR Field Name Data Possible Parameter Required/ Descrptn
Type Values Type Optional
1 Authorization String Bearer Header Required Bearer
ABC3SpgR OAuth
mQsS5XQb4 Token
dy91zG-ZE
5VHd8Lv4Q
2 Content-Type String application Header Required
/json
3 ClientCode String cvERkjk78 Header Required OAuth
jlKUtdUkd ClientId
4.3. Output Parameters
This section provides information about the possible parameters that can be present in the response.
SR Field Name Data Type Possible Values Description
1 Suppliers String Array "Suupliers":[. List of
{ configured
"SourceOfPrice": vendor APIs
"Mouser", for given
"APIName": "Mouser" client.
}]
4.4. Status Codes and Messages
Status Code: 200
Status Message: The requested resource returned.
4.5. Sample Request and Response
Request Body
Response:
{
"status": 200,
"message": "Success",
"data": {
"Suppliers": [
{
"SourceOfPrice": "Mouser",
"APIName": "Mouser"
},
{
"SourceOfPrice": "Newark",
"APIName": "Newark"
},
{
"SourceOfPrice": "Arrow",
"APIName": "Arrow"
},
{
"SourceOfPrice": "DigiKey",
"APIName": "DigiKey"
}
]
},
"messageType": "Success"
}
5. Initiate Pricing API
This API is used to initiate CQ Pricing Service on CQ cloud to get pricing data.
5.1. Endpoint and Protocol
Environment: Prod
Protocol: HTTPS
HTTP Method: POST
5.2. Header
SR Field Name Data Possible Parameter Required/ Descrptn
Type Values Type Optional
1 Authorization String Bearer Header Required OAuth
ABC3SpgR Bearer
mQsS5XQb4 Token
dy91zG-ZE
5VHd8Lv4Q
2 Content-Type String application Header Required
/json
3 ClientCode String cvERkjk78 Header Required OAuth
jlKUtdUkd ClientId
5.3. Input Parameters
This section provides information about the parameters that need to be sent while invoking this API.
SR Field Name Data Possible Parameter Required/ Descrptn
Type Values Type Optional
1 ClientCode String BetaClient Request Required Client Name
Body provided by
CQ
2 ReferenceData String Request Optional Any
Body Reference
Data which
will return
in response
back
3 Suppliers String [{ Request Optional If any
Array "Sourceof Body supplier
Price": names
"StringValue", passed then
"APIName": only that
"StringValue" supplier
}] API will be
executed.
If left
null then
all
configured
supplier
APIs will
be executed
4 MpnDetails Mpn Mpn(string, Request Required Multiple
Array Required), Body MPN details
Qty(number, to get
optional), pricing
LineitemId for up to
(integer, 100 MPN's
optional), Per
request.
ReferenceData
(string,optional)
5 IncludeRaw bool true Request Optional Include RAW
Response Body response.
5.4. Output Parameters
This section provides information about the possible parameters that can be present in the response.
SR Field Name Data Type Possible Values Description
1 Requested String "RequestId": This request
"e57a9c7a-040b- id can be
464b-9c40-ce6c7 used to get
1182839" pricing
data using
next
subsequent
API.
5.5. Status Codes and Messages
Status Code Status Message
200 The request was completed successfully.
400 Bad request. Incorrect value provided.
5.6. Sample Request and Response
Request Body:
{
"ClientCode": "CQDemo",
"ReferenceData": "Ref 1",
"Suppliers": [
{
"SourceOfPrice": "DigiKey",
"APIName": "DigiKey"
}
],
"MpnDetails": [
{
"Mpn": "03434",
"Qty": 110,
"LineitemId": 1,
"ReferenceData": "Ref 2",
},
“IncludeRawResponse”:true
]
}
Response:
{
"status": 200,
"message": "Request queued",
"data": {
"RequestId": "4bec9f43-43c1-4c53-900f-d651528512e6"
},
"messageType": "Success"
}
6. Get Saved Pricing API
This API is used to get saved pricing from CQ cloud.
6.1. Endpoint and Protocol
Environment: Prod
Protocol: HTTPS
HTTP Method: POST
6.2. Header
SR Field Name Data Possible Parameter Required/ Descrptn
Type Values Type Optional
1 Authorization String Bearer Header Required OAuth
ABC3SpgR Bearer
mQsS5XQb4 Token
dy91zG-ZE
5VHd8Lv4Q
2 Content-Type String application Header Required
/json
3 ClientCode String Ert45Ykdl Header Required OAuth
IINDN67LkT ClientId
6.3. Input Parameters
This section provides information about the parameters that need to be sent while invoking this API.
SR Field Name Data Possible Parameter Required/ Descrptn
Type Values Type Optional
1 RequestId String Request Required RequestId
Body generated
from previous
API i.e.
initiate
pricing
2 PageNumber int 1 Request Optional Response will
Body be returned
pagination
wise, so it
will allow to
give page
number
Default value
is 1 if
passed as
null
3 PageSize int 1 Request Required Number of
Body pricing in
one response
6.4. Output Parameters
This section provides information about the possible parameters that can be present in the response.
SR Field Name Data Type Possible Values Description
1 Completed Double 10.23 Shows percentage
Percentage of pricing
process
2 Pricings Json obj "Pricings": [ { Array of pricing
"ManufacturerName": detail object
"Apex Tool Group Mfr.",
"ManufacturerPartNumber":
"03434",
"RequestedPartNumber":
"03434",
"RequestedQty": 110,
"SupplierName": "Allied",
"Pricings": [
{
"UnitPrice": 12.06,
"QtyBreak": 12
}
],
"PriceNotes": "",
"MinimumBuy": 12,
"Multiplier": 12,
"LeadTime": null,
"CurrentStockQty": 0,
"ProductUrl":
"https://www.alliedelec.com/m/d/
aeb8bb88d84dac66e48fcd66229e2e52.pdf",
"HomePageUrl":
"https://www.alliedelec.com/",
"DataSheetUrl": null,
"Sku": "70220006",
"SupplierQuoteNo": "",
"Packaging": "",
"Authorized_Reseller": true,
"OnOrderEta": null,
"OnOrderQuantity": null,
"DockLeadTime": null,
"StandardCost": null,
"LineItemFee": null,
"Tax": null,
"NCNR": "Unknown",
"RoHS": "No",
"Region": null,
"Reeling": "Unknown",
"ModifiedDate":
"2017-12-08T14:10:27.576Z",
"Currency": "USD",
"QuotedCurrency": "USD",
"CurrencyConversionRate": 1.0,
"Obsolete": "No",
"ImagePath":
http://media.allied.com/Photos/
Panasonic%20Photos/NHG12-SERIES.jpg",
"Category": null,
"HtsCode": "",
"CountryOfOrigin": null,
"LeadStatus": "Lead Free",
"EccnCode": "",
"Tariff": "",
"Quote": null,
"RawResponse": "{\"MyPricing\":
[],\"Obsolete\":false,\"MediaLinks\":
[{\"MediaType\":\"Datasheets ..."
}
]
3 Manufacturer String Apex Tool Group Mfr Manufacturer Name
Name of given part
4 Manufacturer String 03434 Manufacturers MPN
PartNumber
5 Requested String 03434 Ref PartNumber
PartNumber from api request
6 Requested Double 110 Ref Qty from api
Qty request
7 Supplier String Allied
Name
8 Pricings Json Array "Pricings":[ Pricing cost
{ detail for given
"UnitPrice": 12.06, given Qty break
"QtyBreak": 12
}
]
9 MinimumBuy Double 12 To get this
pricing minimum
number of Qty
to buy
10 PriceNotes String Price from
supplier
11 Multiplier Double 12 Multiplier number
12 LeadTime int 1 LeadTime in day
13 Current Double 1 Stock qty
StockQty
14 Product String Product URL
URL
15 HomePage String Home Page URL
URL
16 Datasheet String Datasheet URL
URL
17 SKU String Stock keeping unit
18 Packaging String Cut | Reel Type of package
19 Authorized_ Bool true Authorized
Reseller Reseller
indicated
whether this
supplier is
authorized by
manufacturer
20 NCNR String "Unknown" | "NO" None cancelable
nonrefundable
flag
21 RoHS String RoHS flag
22 Reeling String "Unknown" Reeling type
6.5. Status Codes and Messages
Status Code Status Message
200 The request was completed successfully.
6.6. Sample Request and Response
Request Body:
{
"RequestId": "4bec9f43-43c1-4c53-900f-d651528512e6",
"PageSize": 10
}
Response:
{
"status": 200,
"message": "",
"data": {
"CompletedPercentage": 100,
"Pricings": [
{
"ManufacturerName": "Apex Tool Group Mfr.",
"ManufacturerPartNumber": "03434",
"RequestedPartNumber": "03434",
"RequestedQty": 110,
"SupplierName": "Allied",
"Pricings": [
{
"UnitPrice": 12.06,
"QtyBreak": 12
}
],
"PriceNotes": "",
"MinimumBuy": 12,
"Multiplier": 12,
"LeadTime": null,
"CurrentStockQty": 0,
"ProductUrl": "https://www.alliedelec.com/m/d/aeb8bb88d84dac66e48fcd66229e2e52.pdf",
"HomePageUrl": "https://www.alliedelec.com/",
"DataSheetUrl": null,
"Sku": "70220006",
"SupplierQuoteNo": "",
"Packaging": "",
"Authorized_Reseller": true,
"OnOrderEta": null,
"OnOrderQuantity": null,
"DockLeadTime": null,
"StandardCost": null,
"LineItemFee": null,
"Tax": null,
"NCNR": "Unknown",
"RoHS": "No",
"Region": null,
"Reeling": "Unknown",
"ModifiedDate": "2017-12-08T14:10:27.576Z",
"Currency": "USD",
"QuotedCurrency": "USD",
"CurrencyConversionRate": 1.0,
"Obsolete": "No",
"Category": null,
"HtsCode": "",
"CountryOfOrigin": null,
"LeadStatus": "Lead Free",
"EccnCode": "",
"Tariff": "",
"Quote": null,
"RawResponse": "{\"MyPricing\":[],\"Obsolete\":false,\"MediaLinks\":[{\"MediaType\":\"Datasheets ..."
}
]
},
"messageType": "Success"
}