Facebook Order Data API
The Order Data API's purpose is to provide an electronic means for field partners to upload Ticket data for global dashboarding.
This article pre-supposes that the user has gone through the process in the BDS Developer Onboarding article. Documentation of the Facebook Ticket Data API is accessible online for each of the methods. This article is a supplement to it to provide details and use cases.
Endpoints
Stage - https://bdsmktg.azure-api.net/OrderData
Endpoint used for testing the API
Production - https://bdssolutions.azure-api.net/OrderData
Endpoint used for live production work.
API Methods
Authenticate [Post]
Vendors use the API Authentication Credentials emailed in the onboarding process in the authentication step.
- Username, Password
- Subscription Key
Calling this method of the API with the vendor credentials returns an authentication token. The returned GUID will need to be used in subsequent calls to the API.
Stage - https://bdsmktg.azure-api.net/OrderData/AuthenticateVendor
Prod - https://bdssolutions.azure-api.net/OrderData/AuthenticateVendor
Business Rules
- The authentication token remains active for 3 hours after initial call.
Http Request
Code samples for other formats are available on the Developer Portal
{ "username": "TeckMarketing", "password": "abcdef$" }
Return
The return is a GUID (Globally Unique Identifier). A GUID need to be used in all subsequent calls to the API. The token remains active for 3 hours after initial creation.
02535BF0-6FB8-454A-B36A-81F8B0A8EF69
Post Order [Post]
Vendors will use the Post Order API to send order data in JSON format via POST method. An order is a single part being fulfilled. Some partners use a ticket containing multiple part orders. In those cases, the API would be called once for each part order.
Order Type
- 100% Group will only transmit the order type: Part Order
Request URL
Stage - https://bdsmktg.azure-api.net/OrderData/PostOrder
Prod - https://bdssolutions.azure-api.net/OrderData/PostOrder
Business rules
- The following fields are required:
- FacebookStoreID
- FacebookStoreID is validated by VendorID. This means vendors must be authorized to use specific FacebookStoreIDs. This is managed by the BDS Hackers Guide team.
- RetailerName
- RetailerAddressLine1
- RetailerCity
- RetailerStateProvince
- RetailerCountryCode - ISO 3166-1 alpha-3 code
- Example: USA
- RetailerPostalCode
- PartnerTicketID
- Note: This can be the same as the order id
- PartnerOrderID
- OrderReason
- Valid value options
- Demo Issue
- Demo Product
- Fixture and Security
- Graphics
- LEDs
- Monitor
- Touchscreen
- Valid value options
- OrderOpenDateTime
- in date-time-offset standard format: yyyy-MM-ddTHH:mm:ss -HH:mm or yyyy-MM-ddTHH:mm:ss +HH:mm
- Format Example: "2020-07-19T08:00:00 -07:00"
- in date-time-offset standard format: yyyy-MM-ddTHH:mm:ss -HH:mm or yyyy-MM-ddTHH:mm:ss +HH:mm
- Display
- PartName
- Issue
- OrderType
- Valid value options
- Part Order
- Valid value options
- FacebookStoreID
Body Request
{ "order": {
"FacebookStoreID": "BGRFR000000F007",
"RetailerName": "Good Buy", "RetailerStoreNumber": "100", "RetailerAddressLine1": "123 Main St", "RetailerAddressLine2": "Unit 12", "RetailerCity": "Hometown", "RetailerStateProvince": "AL", "RetailerCountryCode": "USA", "RetailerPostalCode": "00385 ", "RetailerLatitude": -10.5646, "RetailerLongitude": 35.21231, "PartnerTicketID": "3903", "PartnerOrderID": "8001", "OrderReason": "Fixture and Security", "OrderOpenDateTime": "2020-07-12T08:00:00-07:00", "OrderClosedDateTime": "2020-07-12T08:00:00-07:00", "Display": "Endcap Display 2001-ASO", "PartName": "12 inch Video Monitor", "Issue": "video monitor cracked across screen", "OrderType": "Part Order" }, "token": "02535BF0-6FB8-454A-B36A-81F8B0A8EF69" }
Return
The return is the OrderID or an error message
"1000"
Update Order [Post]
Vendors will use the Update Order API to update existing order data in JSON format via POST method. An order is a single part being fulfilled. Some partners use a ticket containing multiple part orders. In those cases, the API would be called once for each part order.
Order Type
- 100% Group will only transmit the order type: Part Order
Request URL
Stage - https://bdsmktg.azure-api.net/OrderData/UpdateOrder
Prod - https://bdssolutions.azure-api.net/OrderData/UpdateOrder
Business rules
- The following fields are required:
- OrderID
- Order ID returned from previous Post Order method call
- FacebookStoreID
- FacebookStoreID is validated by VendorID. This means vendors must be authorized to use specific FacebookStoreIDs. This is managed by the BDS Hackers Guide team.
- RetailerName
- RetailerAddressLine1
- RetailerCity
- RetailerStateProvince
- RetailerCountryCode - ISO 3166-1 alpha-3 code
- Example: USA
- RetailerPostalCode
- PartnerTicketID
- Note: This can be the same as the order id
- PartnerOrderID
- OrderReason
- Valid value options
- Demo Issue
- Demo Product
- Fixture and Security
- Graphics
- LEDs
- Monitor
- Touchscreen
- Valid value options
- OrderOpenDateTime
- in date-time-offset standard format: yyyy-MM-ddTHH:mm:ss -HH:mm or yyyy-MM-ddTHH:mm:ss +HH:mm
- Format Example: "2020-07-19T08:00:00 -07:00"
- in date-time-offset standard format: yyyy-MM-ddTHH:mm:ss -HH:mm or yyyy-MM-ddTHH:mm:ss +HH:mm
- OrderClosedDateTime
- in date-time-offset standard format: yyyy-MM-ddTHH:mm:ss -HH:mm or yyyy-MM-ddTHH:mm:ss +HH:mm
- Format Example: "2020-07-19T08:00:00 -07:00"
- in date-time-offset standard format: yyyy-MM-ddTHH:mm:ss -HH:mm or yyyy-MM-ddTHH:mm:ss +HH:mm
- Display
- PartName
- Issue
- OrderType
- Valid value options
- Part Order
- Vendor Visit
- Valid value options
- OrderID
Body Request
{ "order": { "OrderID": 103,
"FacebookStoreID": "BGRFR000000F007", "RetailerName": "Good Buy", "RetailerStoreNumber": "100", "RetailerAddressLine1": "123 Main St", "RetailerAddressLine2": "Unit 12", "RetailerCity": "Hometown", "RetailerStateProvince": "AL", "RetailerCountryCode": "USA", "RetailerPostalCode": "00385 ", "RetailerLatitude": -10.5646, "RetailerLongitude": 35.21231, "PartnerTicketID": "3903", "PartnerOrderID": "8001", "OrderReason": "Fixture and Security", "OrderOpenDateTime": "2020-07-12T08:00:00-07:00", "OrderClosedDateTime": "2020-07-12T08:00:00-07:00", "Display": "Endcap Display 2001-ASO", "PartName": "12 inch Video Monitor", "Issue": "video monitor cracked across screen", "OrderType": "Part Order" }, "token": "02535BF0-6FB8-454A-B36A-81F8B0A8EF69" }
Return
The return is the OrderID or an error message
"1000"
Delete Order [Get]
Vendors will use the Delete Order API to send order data in JSON format via GET method.
Request URL
Stage - https://bdsmktg.azure-api.net/OrderData/DeleteOrder/{token}/{OrderID}
Prod - https://bdssolutions.azure-api.net/OrderData/DeleteOrder/{token}/{OrderID}
Parameters
- Token
- OrderID
Return
The return is Success or an error message
"Success"
Get Order
When a vendor company wants to view a previously posted order the Get Order method is used.
Request URL
Stage - https://bdsmktg.azure-api.net/OrderData/GetOrder/{token}/{OrderID}
Prod - https://bdssolutions.azure-api.net/OrderData/GetOrder/{token}/{OrderID}
Parameters
- Authentication Token
- OrderID
- This is the previously returned OrderID from Posting an Order
Return
{ "Message": null, "Orders": [ { "Display": "Endcap Display 2001-ASO",
"FacebookStoreID": "BGRFR000000F007", "Issue": "video monitor cracked across screen", "OrderClosedDateTime": "", "OrderID": 18, "OrderOpenDateTime": "2020-09-21 15:00:00Z", "OrderReason": "Fixture and Security", "OrderType": "Part Order", "PartName": "12 inch Video Monitor", "PartnerOrderID": "10002", "PartnerTicketID": "3914", "RetailerAddressLine1": "123 Main St", "RetailerAddressLine2": "Unit 12", "RetailerCity": "Hometown", "RetailerCountryCode": "USA", "RetailerLatitude": -10.56460000, "RetailerLongitude": 35.21231000, "RetailerName": "Good Buy", "RetailerPostalCode": "00385 ", "RetailerStateProvince": "AL", "RetailerStoreNumber": "100" } ] }
GetOrderByPartnerOrderID
Retrieve Order info by PartnerOrderID
Request URL
Stage - https://bdsmktg.azure-api.net/OrderData/GetOrderByPartnerOrderID/{token}/{PartnerOrderID}
Prod - https://bdssolutions.azure-api.net/OrderData/GetOrderByPartnerOrderID/{token}/{PartnerOrderID}
Parameters
- Authentication Token
- PartnerOrderID
- This is the Order ID from the Partners System
Return
{ "Message": null, "Orders": [ { "Display": "Endcap Display 2001-ASO",
"FacebookStoreID": "BGRFR000000F007", "Issue": "video monitor cracked across screen", "OrderClosedDateTime": "", "OrderID": 18, "OrderOpenDateTime": "2020-09-21 15:00:00Z", "OrderReason": "Fixture and Security", "OrderType": "Part Order", "PartName": "12 inch Video Monitor", "PartnerOrderID": "10002", "PartnerTicketID": "3914", "RetailerAddressLine1": "123 Main St", "RetailerAddressLine2": "Unit 12", "RetailerCity": "Hometown", "RetailerCountryCode": "USA", "RetailerLatitude": -10.56460000, "RetailerLongitude": 35.21231000, "RetailerName": "Good Buy", "RetailerPostalCode": "00385 ", "RetailerStateProvince": "AL", "RetailerStoreNumber": "100" } ] }
GetOrdersByDateRange
Retrieves Order info for all orders opened between the supplied start date and end date
Request URL
Stage - https://bdsmktg.azure-api.net/OrderData/GetOrdersByDateRange/{token}/{startdate}/{enddate}
Prod - https://bdssolutions.azure-api.net/OrderData/GetOrdersByDateRange/{token}/{startdate}/{enddate}
Parameters
- Authentication Token
- startdate
-
- in date-time-offset standard format: yyyy-MM-ddTHH:mm:ss -HH:mm or yyyy-MM-ddTHH:mm:ss +HH:mm
- Format Example: "2020-07-19T08:00:00 -07:00"
- in date-time-offset standard format: yyyy-MM-ddTHH:mm:ss -HH:mm or yyyy-MM-ddTHH:mm:ss +HH:mm
-
- enddate
-
- in date-time-offset standard format: yyyy-MM-ddTHH:mm:ss -HH:mm or yyyy-MM-ddTHH:mm:ss +HH:mm
- Format Example: "2020-07-19T08:00:00 -07:00"
- in date-time-offset standard format: yyyy-MM-ddTHH:mm:ss -HH:mm or yyyy-MM-ddTHH:mm:ss +HH:mm
-
Return
{ "Message": null, "Orders": [ { "Display": "Endcap Display 2001-ASO",
"FacebookStoreID": "BGRFR000000F007", "Issue": "video monitor cracked across screen", "OrderClosedDateTime": "", "OrderID": 18, "OrderOpenDateTime": "2020-09-21 15:00:00Z", "OrderReason": "Fixture and Security", "OrderType": "Part Order", "PartName": "12 inch Video Monitor", "PartnerOrderID": "10002", "PartnerTicketID": "3914", "RetailerAddressLine1": "123 Main St", "RetailerAddressLine2": "Unit 12", "RetailerCity": "Hometown", "RetailerCountryCode": "USA", "RetailerLatitude": -10.56460000, "RetailerLongitude": 35.21231000, "RetailerName": "Good Buy", "RetailerPostalCode": "00385 ", "RetailerStateProvince": "AL", "RetailerStoreNumber": "100" } ] }
Comments
0 comments
Please sign in to leave a comment.