PromoBullit EStore API Guide
PromoBullit EStore API Guide
Table of Contents
Introduction..................................................................................................................................3
Orders.........................................................................................................................................4
Get orders with status of "New"..............................................................................................4
Get the details of a specific order:..........................................................................................4
Get the payment details for a specific order:..........................................................................6
Get the totals (price components) for a specific order:...........................................................6
Get the products for a specific order......................................................................................7
Get any Customer Attributes for a specific order....................................................................7
Use POST to add a shipment to an order..............................................................................8
Add a product to a shipment...................................................................................................8
Use PUT to send a notification email for an order..................................................................8
Refund a specific payment (Budget / Store Card)..................................................................9
Cancel or Capture a specific payment (Credit Card)..............................................................9
Customers...................................................................................................................................9
Create a customer account.....................................................................................................9
Get the list of customer records............................................................................................10
Get the full record on a specific customer............................................................................10
Get the list of customer groups.............................................................................................11
Get the details for a specific customer group.......................................................................12
Get enabled payment methods for a specific customer group.............................................12
Get details on a specific payment method for a Customer Group.......................................13
Get enabled shipping methods for a specific customer group.............................................13
Products....................................................................................................................................14
Get the list of product records...............................................................................................14
Get & save files.....................................................................................................................14
Get details for a specific product..........................................................................................15
Get images for a specific product.........................................................................................16
Get inventories for a specific product...................................................................................16
Get details for an inventory record.......................................................................................16
Get transactions for a specific product inventory.................................................................17
Use PUT to update inventory................................................................................................17
Get options for a specific product.........................................................................................18
Get details for a specific product option...............................................................................18
Get the elements for a specific product option.....................................................................18
Get details for an option element..........................................................................................19
Get prices for an option element (currency1/CAD)..............................................................20
Get user ratings for a specific product..................................................................................20
Get details on a product rating..............................................................................................21
Get product rating “categories”.............................................................................................21
Get prices for a specific product (currency1/CAD)...............................................................22
Get prices for a specific product (currency2/USD)...............................................................22
Get set up fees for a specific product (currency1/CAD).......................................................23
1
PromoBullit EStore Platform REST API Interface Examples
2
PromoBullit EStore Platform REST API Interface Examples
Introduction
Programming Languages
Connecting via REST is available to any programming language or tool that supports HTTP get and post
requests. These include ASP, PHP, Java, Python, Perl, Curl, etc.
Store ID
Each store in the PromoBullit System has a unique store ID. If you do not have the store ID, please contact your
Store Admin. The Store ID is displayed throughout this document as [Store-ID]. Replace with the actual
Store ID in Curl command or any source code being developed.
Access Permissions: In order to perform REST calls to platform endpoints, your store admin must create
a user account with the necessary permissions.
Updating Data
Caution: Updating data via REST is fully supported, but it is the developers responsibility to ensure data is
correct and fully tested. Do not develop on live production stores.
It is possible to update any data (Shipped quantity, Inventory level, etc.) using REST. The GET
examples below provide all of the system's record IDs needed to use the PUT method to
perform updates.
3
PromoBullit EStore Platform REST API Interface Examples
Orders
curl -i [Link]
orders?meta[pageSize]=100\&status[]=new -H "X-Auth-Credentials:[base64 encoded
username:password]"
- status[]=new (get any "new" orders). You can substitute "new" for any status you see in the dashboard, ie:
approved,declined,etc.
Curl result:
{
"records":[
{
"id":"176391",
"created":"2019-07-31 15:35:41",
"modified":null,
"customerName":"Tech Tester",
"companyName":"Testers Inc.",
"salesrepName":null,
"languageId":"1",
"status":"new",
"__class_status":"model-new",
"amount":"58.47",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/orders\/0176391"
},
...
{
"id":"159682",
"created":"2019-05-22 15:36:40",
"modified":null,
"customerName":"Tech Tester",
"companyName":"Testers Inc.",
"salesrepName":null,
"languageId":"1",
"status":"new",
"__class_status":"model-new",
"amount":"11.30",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/orders\/0159682"
}
],
"meta":{
"recordsFound":"23",
"page":"0",
"pageSize":"100"
}
}
4
PromoBullit EStore Platform REST API Interface Examples
The JSON collection of data contains the URL of the order details (highlighted in yellow above).
curl -i [Link]
[Store-ID]\/orders\/0176391 -H "X-Auth-Credentials:[base64 encoded
username:password]"
Result:
{
"id":"176391",
"storeId":"[Store-ID]",
"amount":"58.47",
"salesRepName":null,
"customerId":"207655",
"firstName":"Tech",
"lastName":"Tester",
"companyName":"Testers Inc.",
"companyTitle":"",
"languageId":"1",
"email":"techteam@[Link]",
"telephone":"9058582600",
"fax":"",
"tollFreeTelephone":"",
"tollFreeFax":"",
"flags":"",
"salespersonId":"0",
"customData":{
"G_L_Code":"611291 - Regional Signage",
"_Comment":"TEST ORDER - DO NOT PROCESS "
},
"intNotes":null,
"status":"new",
"created":"2019-07-31 15:35:41",
"modified":null,
"billingFirstName":"Tech",
"billingLastName":"Tester",
"billingCompanyName":"Testers Inc.",
"billingCompanyTitle":"",
"billingEmail":"techteam@[Link]",
"billingTelephone":"9058582600",
"billingFax":"",
"billingTollFreeTelephone":"",
"billingTollFreeFax":"",
"billingAddress1":"2600 Argentia Road",
"billingAddress2":"",
"billingCity":"Mississauga",
"billingPostalCode":"L5N 5V4",
"billingCountryTerritory":"CA\/ON",
"shippingFirstName":"Tech",
"shippingLastName":"Tester",
"shippingCompanyName":"Testers Inc.",
"shippingCompanyTitle":"",
"shippingEmail":"techteam@[Link]",
"shippingTelephone":"9058582600",
"shippingFax":"",
"shippingTollFreeTelephone":"",
"shippingTollFreeFax":"",
"shippingAddress1":"2600 Argentia Road",
"shippingAddress2":"",
"shippingCity":"Mississauga",
"shippingPostalCode":"L5N 5V4",
"shippingCountryTerritory":"CA\/ON",
"billingCountryName":"Canada",
"billingTerritoryName":"Ontario",
"shippingCountryName":"Canada",
"shippingTerritoryName":"Ontario",
"payments":"\/admin\/rest2\/1\/stores\/[Store-ID]\/orders\/0176391\/payments",
5
PromoBullit EStore Platform REST API Interface Examples
"priceComponents":"\/admin\/rest2\/1\/stores\/[Store-ID]\/orders\/0176391\/price-components",
"products":"\/admin\/rest2\/1\/stores\/[Store-ID]\/orders\/0176391\/products",
"shipments": "/admin/rest2/1/stores/854/orders/232155/shipments",
"messages": "/admin/rest2/1/stores/854/orders/0232155/messages",
"attachments": "/admin/rest2/1/stores/854/orders/0232155/attachments",
"attributes": "/admin/rest2/1/stores/854/orders/232155/attributes",
"customerAttributes": "/admin/rest2/1/stores/854/customers/195395/attributes",
"orderLogs": null,
"shipAll": null,
"shippingAddressValidation": {
"addressType": null,
"isValid": false,
"message": null
}
}
The JSON collection of the order data contains the URLs of further order details (highlighted in yellow
above).
curl -i [Link]
ID]\/orders\/0176391/payments -H "X-Auth-Credentials:[base64 encoded
username:password]"
Result:
[
{
"id":"169136",
"methodId":"CostCenter",
"amount":"58.47",
"prompt":"CC67890",
"status":"pending",
"modified":"2019-07-31 15:35:41",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/orders\/0176391\/payments\/0169136"
},
{
"id":null,
"methodId":"Payments Total",
"amount":"58.47",
"prompt":null,
"status":null,
"modified":null,
"details":null
}
]
curl i [Link]
ID]\/orders\/0176391/price-components -H "X-Auth-Credentials:[base64 encoded
username:password]"
Result:
[
{
"id":"1230857",
"type":"productsTotal",
"amount":"40.50",
"title":"Products Total",
"details":null
6
PromoBullit EStore Platform REST API Interface Examples
},
{
"id":"1230859",
"type":"[Link]",
"amount":"11.24",
"title":"Fedex Ground","details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/orders\/0176391\/price-
components\/01230859"
},
{
"id":"1230858",
"type":"shippingTotal",
"amount":"11.24",
"title":"Shipping Total",
"details":null
},
{
"id":"1230861",
"type":"[Link] 13%,TVH 13%",
"amount":"6.73",
"title":"HST 13%",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/orders\/0176391\/price-components\/01230861"
},
{
"id":"1230860",
"type":"taxesTotal",
"amount":"6.73",
"title":"Taxes Total",
"details":null
},
{
"id":"1230856",
"type":"orderTotal",
"amount":"58.47",
"title":"Order Total",
"details":null
}
]
curl -i [Link]
ID]\/orders\/0176391/products -H "X-Auth-Credentials:[base64 encoded
username:password]"
7
PromoBullit EStore Platform REST API Interface Examples
Note that the command below lists any Customer Attributes defined in the store settings along with any
data that was filled in at the time the order was placed. A "null" value means the data was not supplied by
the client.
curl -i [Link]
ID]\/customers\/207655/attributes -H "X-Auth-Credentials:[base64 encoded
username:password]"
Result:
{
"_COST_CENTER_CODES":null,
"NIU_PURCHASE_CENTER_CODES":null
}
Note that the JSON collection on orders has the customer ID (if not using guest checkout) that can be used
to get the full customer record. Example to follow.
To update the shipped quantity, you must create a shipment and then add the product quantity to this new
shipment.
Caution: Calling POST repeatedly will create multiple entries.
If the shipment was successfully added, the shipment ID will be returned in the terminal. This ID can be
used to update the shipment information.
Next we can add a product to the shipment. If you are unsure about the quantity or id to use, the following
GET request will return this information:
8
PromoBullit EStore Platform REST API Interface Examples
If the product was successfully added, the shipment product id will be returned in the terminal. This id can
be used to modify the product shipment.
The following will send a notification to the email of the customer who place the order. The values for
“subject” & “body” can be replaced with whatever you like.
In the body HTML, text between each closing paragraph (</p>) and new paragraph (<p>) tag, will start on a
new line.
Acceptable values for the “sendDate” parameter are: now, tomorrow, +1 weeks, +2 weeks
To capture a payment, replace the value for “transactionAction” (“cancel”) with “complete”.
If a refund or capture is successful, the terminal will return: "Transaction has been successful."
Customers
9
PromoBullit EStore Platform REST API Interface Examples
'{"flag":"A","login":"John@[Link]","password":"1234567890","passwordConfirmat
ion":"1234567890","firstName":"John","lastName":"Doe","billingFirstName":"John"
,"billingLastName":"Doe","billingEmail":"John@[Link]","shippingFirstName":"Jo
hn","shippingLastName":"Doe","shippingEmail":"John@[Link]"}'
[Link]
The JSON in the above request contains only the required fields. You can define any and all additional
fields available in the customer account (companyName, telephone, billingAddress1 … etc.).
The "flag" parameter sets the account status. Use "A" for active and "I" for inactive.
curl -i [Link]
customers?meta[pageSize]=100 -H "X-Auth-Credentials: [base64 encoded
username:password]"
Result:
{
"records":[
{
"id":"202659",
"lastName":"Doe",
"firstName":"John",
"companyName":"ABC Company",
"telephone":"123-456-7890",
"email":"[Link]@[Link]",
"created":"2019-07-11 16:43:00",
"flag":"A",
"__class":"",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/customers\/0202659"
},
{
"id":"202660",
"lastName":"Tessier",
"firstName":"Luc",
"companyName":"ABC Company",
"telephone":"450-123-4567",
"email":"luc@[Link]",
"created":"2019-07-11 16:43:02",
"flag":"A",
"__class":"",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/customers\/0202660"
}
],
"meta":{
"recordsFound":"2",
"page":"0",
"pageSize":"100"
}
}
The following command is used to request the customer record for “John Doe”.
Notice: The only difference between the two URLs, highlighted above, is the customer ID.
curl -i [Link]
ID]\/customers\/0202659?meta[pageSize]=100 -H "X-Auth-Credentials: [base64
encoded username:password]"
10
PromoBullit EStore Platform REST API Interface Examples
Result:
{
"id":"202659",
"password":"1",
"firstName":"John",
"lastName":"Doe",
"companyName":"ABC Company",
"companyTitle":"USA Manager",
"email":"[Link]@[Link]",
"customerNumber":"USA Customer",
"telephone":"123-456-7890",
"fax":null,
"tollFreeTelephone":null,
"tollFreeFax":null,
"billingFirstName":"John",
"billingLastName":"Doe",
"billingCompanyName":"ABC Company",
"billingCompanyTitle":null,
"billingEmail":"[Link]@[Link]",
"billingTelephone":"123-456-7890",
"billingFax":null,
"billingTollFreeTelephone":null,
"billingTollFreeFax":null,
"billingAddress1":"123 Farm Lane",
"billingAddress2":null,
"billingCity":"Beverly Hills",
"billingPostalCode":"90038",
"billingCountry":"US",
"billingTerritory":"CA",
"shippingFirstName":"John",
"shippingLastName":"Doe",
"shippingCompanyName":"ABC Company",
"shippingCompanyTitle":null,
"shippingEmail":"[Link]@[Link]",
"shippingTelephone":"123-456-7890",
"shippingFax":null,
"shippingTollFreeTelephone":null,
"shippingTollFreeFax":null,
"shippingAddress1":"123 Farm Lane",
"shippingAddress2":null,
"shippingCity":"Beverly Hills",
"shippingPostalCode":"90038",
"shippingCountry":"US",
"shippingTerritory":"CA",
"flag":"A",
"extData":null,
"attributes":null,
"customerGroupIds":[
"963"
],
"customerReportIds":[
]
}
The collection above also contains any Customer Groups the user is a member of and any reports the user
has been given access to.
curl -i [Link]
customer-groups?meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded
username:password]”
11
PromoBullit EStore Platform REST API Interface Examples
Result:
{
"records":[
{
"id":"962",
"sysname":null,
"title":"Approver For $150",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/customer-groups\/962"
},
{
"id":"963",
"sysname":null,
"title":"Employee",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/customer-groups\/963"
}
],
"meta":{
"recordsFound":"2",
"page":"0",
"pageSize":"100"
}
}
Highlighted above, are the URLs for the “details” of each customer group. If I want details on the
“Employee” customer group, I call the following:
curl -i [Link]
ID]\/customer-groups\/963?meta[pageSize]=100 -H "X-Auth-Credentials: [base64
encoded username:password]"
Note: to access the other group(s), URL is the same. You need only change the ID (highlighted)
Result:
{
"id":"963",
"sysname":null,
"isDefault":true,
"title_l1":"Employee",
"title_l2":"Employee",
"paymentMethods":"\/admin\/rest2\/1\/stores\/[Store-ID] \/customer-groups\/0963\/payment-methods",
"shippingMethods":"\/admin\/rest2\/1\/stores\/[Store-ID] \/customer-groups\/0963\/shipping-methods"
}
The above response contains the URLs for payment methods & shipping methods enabled for this group.
The system allows the restriction of payment methods on customer groups. These restrictions can be
enabled in the dashboard. To retrieve a list of all payment methods that are enabled/disabled, use the
following:
curl -i [Link]
ID]\/customer-groups\/0963\/payment-methods?meta[pageSize]=100 -H "X-Auth-
Credentials: [base64 encoded username:password]”
12
PromoBullit EStore Platform REST API Interface Examples
Result:
[
{
"id":"BillMe",
"title":"Bill Me",
"isEnabled":true,
"details":"\/admin\/rest2\/1\/stores\/[StoreID]\/customer-groups\/963\/payment-methods\/BillMe"
},
{
... (all methods will be listed. They have been removed for readability)
},
{
"id":"StoreCard",
"title":"Store Card",
"isEnabled":false,
"details":"\/admin\/rest2\/1\/stores\/[StoreID]\/customer-groups\/963\/payment-methods\/
StoreCard"
}
]
curl -i [Link]
ID]\/customer-groups\/963\/payment-methods\/BillMe?meta[pageSize]=100 -H "X-
Auth-Credentials: [base64 encoded username:password]”
Result:
{
"id":"BillMe",
"minApprovalAmount":"150.00",
"isEnabled":true,
"title":"Bill Me",
"approverGroupIds":[
"962"
]
}
The data returned by the call will contain details that show if a payment
method is enabled for a specific customer group, any approver group IDs and a
minimum order approval amount, if available.
curl -i [Link]
ID]\/customer-groups\/0963\/shipping-methods?meta[pageSize]=100 -H "X-Auth-
Credentials: [base64 encoded username:password]”
Result:
[
{
"id":"CanadaPost",
"title":"Canada Post",
"isEnabled":false,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/customer-groups\/963\/shipping-methods\/
CanadaPost"
},
13
PromoBullit EStore Platform REST API Interface Examples
{
"id":"Custom",
"title":"Custom destinations and formulas",
"isEnabled":true,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/customer-groups\/963\/shipping-methods\/Custom"
},
... (all methods will be listed. They have been removed for readability)
{
"id":"Ups",
"title":"UPS",
"isEnabled":false,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/customer-groups\/963\/shipping-methods\/Ups"
}
]
You can use the URLs above to get “details” on a specific shipping method, but it will return the same data
as the previous command. (Because “Is enabled” is currently the only setting in “Shipping Methods” >
“Details”)
Products
(For most examples in this section, we will be using the first product listed.)
curl -i [Link]
products?meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded
username:password]”
Result:
{
"records":[
{
"id":"96052",
"sku":"0550M",
"name":"Acrylic",
"status":"active",
"__class":"",
"modified":"2019-08-20 09:36:11",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052",
"imageUrl":"https:\/\/[Link]\/assets\/Stores\/
c3a172b7ae94002d763885407405730e\/Products\/Orig\/[Link]"
},
...
{
"id":"96578",
"sku":"xx",
"name":"xx",
"status":"inactive",
"__class":"model-inactive",
"modified":"2019-06-26 10:33:16",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096578",
"imageUrl":"https:\/\/[Link]\/Stores\/Common\/Products\/Orig\/-.JPG"
}
],
"meta":{
"recordsFound":"40",
"page":"0",
"pageSize":"100"
14
PromoBullit EStore Platform REST API Interface Examples
}
}
The above records contain the URLs for details on the product and the image associated with it.
Note: If saving other files, make sure to replace “.jpg” with the correct file type.
curl -i [Link]
ID]\/products\/096052?meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded
username:password]"
Result:
{
"id":"96052",
"productId":"96052",
"sku":"0550M",
"name_l1":"Acrylic",
"name_l2":"Acrylic",
"description_l1":"Acrylic",
"description_l2":"Acrylic",
"weight":"1",
"created":"2019-06-13 10:45:06",
"isActive":true,
"ext":null,
"modified":"2019-08-20 09:36:11",
"saleStart_c1":null,
"saleEnd_c1":null,
"saleStart_c2":null,
"saleEnd_c2":null,
"allowOptionsMixup":"false",
"noCart":"false",
"productTaxationPolicyId":null,
"productShippingPolicyId":null,
"sharedSetUpFeesExist":false,
"inventory":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/inventory",
"inventoryNoOptions":null,
"images":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/images",
"options":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/options",
"userRatings":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/product-ratings",
"prices_c1":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/currencies\/1\/prices",
"prices_c2":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/currencies\/2\/prices",
"fees_c1":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/currencies\/1\/fees",
"fees_c2":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/currencies\/2\/fees",
"customerGroupPrices_c1":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/currencies\/1\/
customer-group-prices",
"customerGroupPrices_c2":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/currencies\/2\/
customer-group-prices",
"groupQuantityPrograms_c1":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/currencies\/
1\/group-quantity-programs",
"groupQuantityPrograms_c2":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/currencies\/
2\/group-quantity-programs",
"attachmentsSvg":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/attachments\/svg",
"attachmentsOther":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/attachments\/other",
"attributes":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/96052\/attributes",
15
PromoBullit EStore Platform REST API Interface Examples
"productGroupIds":[
"13973",
"13991"
],
"customerGroupIds":[
],
"sharedSetUpFeeIds":[
]
}
As you can see, we are presented with the URLs we need to access any setting available in the
dashboard, for this product.
curl -i [Link]
ID]\/products\/096052\/images?meta[pageSize]=100 -H "X-Auth-Credentials:[base64
encoded username:password]”
Result:
[
{
"id":"131690",
"title_l1":"",
"title_l2":"",
"url":"https:\/\/[Link]\/assets\/Stores\/c3a172b7ae94002d763885407405730e\/
Products\/Orig\/[Link]",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/images\/0131690"
}
]
We are given the same image URL as earlier, since this is the only image for this product. Requesting
“details” on a product image will present the same data as above.
curl -i [Link]
ID]\/products\/096052\/inventory?meta[pageSize]=100 -H "X-Auth-Credentials:
[base64 encoded username:password]”
Result:
[
{
"id":"18466",
"quantity":"100",
"allowBackorder":false,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/inventory\/018466",
"optionElements":[
{
"optionName":"Size",
"optionElementName":"3x5"
},
{
"optionName":"Size",
"optionElementName":"5x5"
16
PromoBullit EStore Platform REST API Interface Examples
}
]
}
]
curl -i [Link]
ID]\/products\/096052\/inventory\/018466?meta[pageSize]=100 -H "X-Auth-
Credentials:[base64 encoded username:password]"
Result:
{
"id":"18466",
"quantity":"100",
"allowBackorder":false,
"disableProductWhenZero":true,
"lowStockQuantity":null,
"maxOrderQuantity":null,
"lowStockQuantityNotificationDate":null,
"transactions":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/inventory\/018466\/
transactions",
"optionElementIds":[
"320019",
"320020"
]
}
curl -i [Link]
ID]\/products\/096052\/inventory\/018466\/transactions?meta[pageSize]=100 -H
"X-Auth-Credentials:[base64 encoded username:password]"
Result:
{
"records":[
{
"type":"restock",
"quantity":"1.00",
"note":null,
"userName":"Dashboard User",
"created":"2020-01-22 10:53:30"
},
{
"type":"order",
"quantity":"1.00",
"note":null,
"userName":null,
"created":"2020-01-21 09:40:25"
}
],
"meta":{
"recordsFound":"3",
"page":"0",
"pageSize":"100"
}
17
PromoBullit EStore Platform REST API Interface Examples
The following can be used to make adjustments to the specified inventory. In this case it will deduct “10”
units.
curl -i [Link]
ID]\/products\/096052\/options?meta[pageSize]=100 -H "X-Auth-Credentials:
[base64 encoded username:password]"
Result:
[
{
"id":"73629",
"title":"Size",
"isEnabled":true,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/options\/073629"
}
]
curl -i [Link]
ID]\/products\/096052\/options\/073629?meta[pageSize]=100 -H "X-Auth-
Credentials:[base64 encoded username:password]"
Result:
{
"id":"73629",
"productId":"96052",
"title_l1":"Size",
"title_l2":"Size",
"type":"0",
"sysName":null,
"isEnabled":true,
"elements":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/options\/073629\/elements"
}
18
PromoBullit EStore Platform REST API Interface Examples
curl -i [Link]
ID]\/products\/096052\/options\/073629\/elements?meta[pageSize]=100 -H "X-Auth-
Credentials:[base64 encoded username:password]"
Result:
[
{
"id":"320019",
"title":"3x5",
"isEnabled":true,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/options\/073629\/elements\/
0320019"
},
{
"id":"320020",
"title":"5x5",
"isEnabled":true,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/options\/073629\/elements\/
0320020"
}
]
curl -i [Link]
ID]\/products\/096052\/options\/073629\/elements\/0320019?meta[pageSize]=100 -H
"X-Auth-Credentials:[base64 encoded username:password]"
Result:
{
"id":"320019",
"optionId":"73629",
"productId":"96052",
"title_l1":"3x5",
"title_l2":"3x5",
"description_l1":"",
"description_l2":"",
"skuText1":"",
"skuText2":"",
"saleStart_c1":null,
"saleEnd_c1":null,
"saleStart_c2":null,
"saleEnd_c2":null,
"sysName":null,
"isEnabled":true,
"sharedSetUpFeesExist":false,
"prices_c1":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/options\/073629\/elements\/
0320019\/currencies\/01\/prices",
"prices_c2":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/options\/073629\/elements\/
0320019\/currencies\/02\/prices",
"fees_c1":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/options\/073629\/elements\/
0320019\/currencies\/01\/fees",
"fees_c2":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/options\/073629\/elements\/
0320019\/currencies\/02\/fees",
"images":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/options\/073629\/elements\/
0320019\/images",
"incompatibleElementIds":[
],
"sharedSetUpFeeIds":[
19
PromoBullit EStore Platform REST API Interface Examples
]
}
curl -i [Link]
ID]\/products\/096052\/options\/073629\/elements\/0320019\/currencies\/01\/
prices?meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded
username:password]”
Result:
[
{
"id":"69353",
"header_l1":"1-2",
"header_l2":"1-2",
"minQty":"1",
"maxQty":"2",
"price":"7.99",
"salePrice":null,
"replaceUnitPrice":true,
"priceMsg_l1":null,
"priceMsg_l2":null,
"priceCode":null,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/options\/073629\/elements\/
0320019\/currencies\/01\/prices\/069353"
},
{
"id":"69354",
"header_l1":"3-10",
"header_l2":"3-10",
"minQty":"3",
"maxQty":"10",
"price":"5.00",
"salePrice":null,
"replaceUnitPrice":true,
"priceMsg_l1":null,
"priceMsg_l2":null,
"priceCode":null,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/options\/073629\/elements\/
0320019\/currencies\/01\/prices\/069354"
}
Note: Requesting “details” for a price element will yield the same data listed above.
Note: This data requires the Ratings module to be enabled and active on the store.
curl -i [Link]
ID]\/products\/096052\/product-ratings?meta[pageSize]=100 -H "X-Auth-
Credentials:[base64 encoded username:password]”
Result:
20
PromoBullit EStore Platform REST API Interface Examples
{
"records":[
{
"id":"115",
"status":"a",
"customerName":"John Doe",
"langId":"1",
"comment":"I wear it everyday!",
"avgRating":"4.7",
"edited":"2019-08-22 08:49:14",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/product-ratings\/0115"
}
],
"meta":{
"recordsFound":"1",
"page":"0",
"pageSize":"100"
}
}
curl -i [Link]
ID]\/products\/product-ratings\/0115?meta[pageSize]=100 -H "X-Auth-Credentials:
[base64 encoded username:password]”
Result:
{
"id":"115",
"productSku":"0550M",
"productName":"Acrylic",
"status":"a",
"customerName":"John Doe",
"langId":"1",
"comment":"I wear it everyday!",
"avgRating":"4.7",
"modified":null,
"created":"2019-08-22 08:49:14",
"categories":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/product-ratings\/0115\/categories"
}
Using the URL, indicated above, will retrieve the individual ratings this customer gave.
curl -i [Link]
ID]\/products\/product-ratings\/0115\/categories?meta[pageSize]=100 -H "X-Auth-
Credentials:[base64 encoded username:password]”
Result:
[
{
"id":"90",
"title":"Quality",
"rating":"5.0"
},
{
"id":"91",
"title":"Appearance",
"rating":"5.0"
},
{
21
PromoBullit EStore Platform REST API Interface Examples
"id":"92",
"title":"Value",
"rating":"4.0"
}
]
curl -i [Link]
ID]\/products\/096052\/currencies\/1\/prices?meta[pageSize]=100 -H "X-Auth-
Credentials:[base64 encoded username:password]”
Result:
[
{
"id":"217312",
"header_l1":"1+",
"header_l2":"1+",
"minQty":"1",
"maxQty":"143",
"price":"15.00",
"salePrice":"5.00",
"priceMsg_l1":null,
"priceMsg_l2":null,
"priceCode":null,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/currencies\/01\/prices\/
0217312"
},
{
"id":"217313",
"header_l1":"144 – 575 (A)",
"header_l2":"144 - 575 (A)",
"minQty":"144",
"maxQty":"575",
"price":"5.80",
"salePrice":"5.00",
"priceMsg_l1":null,
"priceMsg_l2":null,
"priceCode":null,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/currencies\/01\/prices\/
0217313"
},
{
"id":"217314",
"header_l1":"576+ (A)",
"header_l2":"576+ (A)",
"minQty":"576",
"maxQty":"5000",
"price":"5.60",
"salePrice":"5.00",
"priceMsg_l1":null,
"priceMsg_l2":null,
"priceCode":null,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/currencies\/01\/prices\/
0217314"
}
]
curl -i [Link]
ID]\/products\/096052\/currencies\/2\/prices?meta[pageSize]=100 -H "X-Auth-
Credentials:[base64 encoded username:password]”
22
PromoBullit EStore Platform REST API Interface Examples
Result:
[
{
"id":"225278",
"header_l1":"1-999",
"header_l2":"1-999",
"minQty":"1",
"maxQty":"999",
"price":"7.00",
"salePrice":null,
"priceMsg_l1":null,
"priceMsg_l2":null,
"priceCode":null,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/currencies\/02\/prices\/
0225278"
}
]
We can see there are 3 CAD price brackets and 1 USD price bracket, for this product. Requesting details
on any price record will yield the same data as the previous results.
curl -i [Link]
ID]\/products\/096052\/currencies\/1\/fees?meta[pageSize]=100 -H "X-Auth-
Credentials:[base64 encoded username:password]”
Result:
[
{
"id":"98",
"title":"Embroidery",
"formula":"price+3.00",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/currencies\/01\/fees\/098"
}
]
curl -i [Link]
ID]\/products\/096052\/currencies\/1\/customer-group-prices?meta[pageSize]=100
-H "X-Auth-Credentials:[base 64 encoded username:password]"
Result:
[
{
"id":"737",
"customerGroupId":"963",
"formula":"price-3.00",
"title":null,
"customerGroupName":"Employee",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/currencies\/01\/customer-
group-prices\/0737"
}
]
23
PromoBullit EStore Platform REST API Interface Examples
According to the response, customers in the “Employee” group get a $3.00 discount on this product.
Requesting “details” on a specific customer group price will present the same data.
curl -i [Link]
ID]\/products\/096052\/currencies\/1\/group-quantity-programs?
meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded username:password]"
Result:
[
{
"id":"119",
"requiredQuantity":"500",
"startDate":"2019-09-01",
"endDate":"2019-09-30",
"title":"Group Quantity Test",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/096052\/currencies\/01\/group-
quantity-programs\/0119",
"orderedQuantity":null
}
]
Note: The Group Quantity Program Module must be active for data to be available.
curl -i [Link]
ID]\/products\/096052\/currencies\/01\/group-quantity-programs\/0119?
meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded username:password]"
Result:
{
"id":"119",
"requiredQuantity":"500",
"startDate":"2019-09-01",
"endDate":"2019-09-30",
"title_l1":"Group Quantity Test",
"title_l2":"Group Quantity Test",
"customerGroupIds":[
"963"
],
"optionElementIds":[
"320019",
"320020"
]
}
curl -i [Link]
ID]\/products\/102177\/attachments\/svg?meta[pageSize]=100 -H "X-Auth-
Credentials:[base64 encoded username:password]”
Result:
[
{
"id":"7515",
24
PromoBullit EStore Platform REST API Interface Examples
"title":"Business Card",
"isRequired":false,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/0102177\/attachments\/svg\/07515"
}
]
curl -i [Link]
ID]\/products\/0102177\/attachments\/svg\/07515?meta[pageSize]=100 -H "X-Auth-
Credentials:[base64 encoded username:password]”
Result:
{
"id":"7515",
"title_l1":"Business Card",
"title_l2":"Business Card",
"isRequired":false,
"downloadUrl":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/102177\/attachments\/download\/7515"
}
The following command will save the above SVG to the working directory as “[Link]”
curl -o [Link]
[Link]
products\/102177\/attachments\/download\/7515 -H "X-Auth-Credentials:[base64
encoded username:password]”
curl -i [Link]
ID]\/products\/0102177\/attachments\/other?meta[pageSize]=100 -H "X-Auth-
Credentials:[base64 encoded username:password]”
Result:
[
{
"id":"7612",
"title":"Sample",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/0102177\/attachments\/other\/07612"
}
]
curl -i [Link]
ID]\/products\/0102177\/attachments\/other\/07612?meta[pageSize]=100 -H "X-
Auth-Credentials:[base64 encoded username:password]”
Result:
{
"id":"7612",
"title_l1":"Sample",
"title_l2":"Sample",
"downloadUrl":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/102177\/attachments\/download\/7612"
}
25
PromoBullit EStore Platform REST API Interface Examples
We are given a download URL which can be used to save the file. (In this case, a .pdf file titled “Sample”).
Note: Product Attributes are custom fields that a store admin can add to store various additional data that is
not part of the platform's standard fields.
curl -i [Link]
ID]\/products\/96052\/attributes?meta[pageSize]=100 -H "X-Auth-Credentials:
[base64 encoded username:password]"
Result:
{
"__1566852898":[
"Box",
"Gift Box"
]
}
curl -i [Link]
product-groups?meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded
username:password]”
Result:
[
{
"id":"13977",
"title":"USB Flash Drives",
"status":"1",
"depth":"0",
"childrenCount":"4",
"subtreeIds":"13978,13979,13981,13980,13977",
"uri_l1":null,
"uri_l2":null,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/product-groups\/013977",
"placeIntoUrl":"\/admin\/rest2\/1\/stores\/[Store-ID]\/product-groups\/013977\/place\/into",
"placeBeforeUrl":"\/admin\/rest2\/1\/stores\/[Store-ID]\/product-groups\/013977\/place\/before"
},
...
{
"id":"13976",
"title":"Chargers & Accesories",
"status":"1",
"depth":"0",
"childrenCount":"0",
"subtreeIds":"13976",
"uri_l1":null,
"uri_l2":null,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/product-groups\/013976",
"placeIntoUrl":"\/admin\/rest2\/1\/stores\/[Store-ID]\/product-groups\/013976\/place\/into",
"placeBeforeUrl":"\/admin\/rest2\/1\/stores\/[Store-ID]\/product-groups\/013976\/place\/before"
26
PromoBullit EStore Platform REST API Interface Examples
}
]
curl -i [Link]
ID]\/product-groups\/013976?meta[pageSize]=100 -H "X-Auth-Credentials:[base64
encoded username:password]”
Result:
{
"id":"13976",
"title_l1":"Chargers & Accesories",
"title_l2":"Chargers & Accesories",
"status":"1",
"uri_l1":null,
"uri_l2":null,
"extData":null,
"created":"2019-06-13 10:45:22",
"modified":"2019-08-16 09:26:27",
"products":"\/admin\/rest2\/1\/stores\/[Store-ID]\/product-groups\/013976\/products",
"customerGroupIds":[
]
}
curl -i [Link]
ID]\/product-groups\/013976\/products?meta[pageSize]=100 -H "X-Auth-
Credentials:[base64 encoded username:password]”
Result:
[
{
"id":"96086",
"sku":"IC8010",
"name":"Iphone Case"
},
...
{
"id":"96089",
"sku":"SW8010",
"name":"Smart Watch"
}
]
Note: Shared setup fees can be applied across a selection of products, not only one specific
item.
curl -i [Link]
shared-setup-fees?meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded
username:password]"
Result:
27
PromoBullit EStore Platform REST API Interface Examples
[
{
"id":"3",
"title":"Embroidery",
"formula":"cartTotal+3",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/shared-setup-fees\/03"
}
]
curl -i [Link]
products/product-ratings?meta[pageSize]=100 -H "X-Auth-Credentials:[base64
encoded username:password]"
Result:
{
"records":[
{
"id":"115",
"productSku":"0550M",
"productName":"Acrylic",
"status":"a",
"customerName":"John Doe",
"langId":"1",
"comment":"I wear it everyday!",
"avgRating":"4.7",
"edited":"2019-08-22 08:49:14",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/products\/product-ratings\/0115"
}
],
"meta":{
"recordsFound":"1",
"page":"0",
"pageSize":"100"
}
}
We are presented with the same rating we saw in the “products” section.
As indicated by the meta data; this is currently the only rating in this store.
Discounts
curl -i [Link]
discount-codes?meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded
username:password]”
Result:
{
"records":[
{
"id":"192979",
"code":"ABC123",
"currencyId":"1",
"formula":"100",
"startDate":"2018-05-23",
28
PromoBullit EStore Platform REST API Interface Examples
"endDate":"2020-05-23",
"useType":"reusable",
"comment":"100$ discount for Joe",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/discount-codes\/0192979"
},
{
"id":"192980",
"code":"Please?",
"currencyId":"1",
"formula":"productsTotal*0.10",
"startDate":"2018-06-17",
"endDate":"2020-06-17",
"useType":"one_time",
"comment":"10% off Products total",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/discount-codes\/0192980"
}
],
"meta":{
"recordsFound":"2",
"page":"0",
"pageSize":"100"
}
}
Note: Requesting “Details” for discount codes, will yield the same data listed above.
Users
curl -i [Link]
users?meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded
username:password]”
Result:
[
{
"id":"583",
"name":"Access Level Tester",
"email":"promobullit@[Link]",
"telephone":null,
"status":"A",
"__class":"",
"details":"\/admin\/rest2\/1\/stores\/854\/users\/0583"
},
...
{
"id":"657",
"name":"Will Valergakis",
"email":"[Link]@[Link]",
"telephone":null,
"status":"A",
"__class":"",
"details":"\/admin\/rest2\/1\/stores\/854\/users\/current"
}
]
29
PromoBullit EStore Platform REST API Interface Examples
The above URLs can be used to get details on a specific user. The data returned will indicate password,
and alerts that are enabled/disabled for that user.
Settings
curl -i [Link]
settings/general-info?meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded
username:password]"
Result:
{
"name":"Test Store",
"address":"1234 Elsewhere",
"city":"Montreal",
"postalCode":"J7V 8P2",
"country":"CA",
"territory":"QC",
"telephone":null,
"fax":null,
"email":"test@[Link]",
"website":null,
"domain":"[Link]",
"orderNotificationEmail":"test@[Link]",
"orderNotificationEmailCC":null,
"orderNotificationEmailBCC":null,
"created":"2019-06-13 09:41:34",
"modified":"2019-08-08 08:07:00",
"startDate":null,
"endDate":null,
"isActive":true,
"isInProduction":false,
"attributes":"\/admin\/rest2\/1\/stores\/[Store-ID]\/attributes",
"useHttps":false,
"notificationSettings":{
"sendOrderNofificationToShipToEmail":false,
"sendOrderNofificationToBillToEmail":false
}
curl -i [Link]
settings/display?meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded
username:password]”
Result:
{
"allowRegisteredCustomersOnly":true,
"currencyPrefs":null,
"defaultCurrencyPrecision":2,
"defaultCurrencySymbol":"$",
"disableCustomerInfoChange":false,
"disableGuestCheckout":false,
"disableUserUponRegistration":false,
"langPrefs":12,
"pageTemplate":"\/Template-17",
"showProductsByCustomerGroup":false,
"showProductsLinkedToCustomerGroupsOnly":false,
30
PromoBullit EStore Platform REST API Interface Examples
"showProductsToCustomersWithoutCustomerGroups":false,
"showProductsToRegisteredCustomersOnly":false
}
Get enabled shipping methods for the store (Disabled methods are not listed)
curl -i [Link]
settings/shipping/methods?meta[pageSize]=100 -H "X-Auth-Credentials:[base64
encoded username:password]”
Result:
{
"methods":[
"Custom",
"Included"
]
}
curl -i [Link]
settings/shipping/methods/Custom?meta[pageSize]=100 -H "X-Auth-Credentials:
[base64 encoded username:password]”
Result:
{
"settings":{
"config":"[CA]\r\nformula =\"15\"",
"extraCharges":null,
"fallbackMethod":null,
"failMessage_en":null,
"failMessage_fr":null
}
}
curl -i [Link]
settings/shipping/destinations?meta[pageSize]=100 -H "X-Auth-Credentials:
[base64 encoded username:password]”
Result:
{
"destinations":[
"CA\/AB",
"CA\/BC",
"CA\/MB",
"CA\/NB",
"CA\/NL",
"CA\/NS",
"CA\/NT",
"CA\/NU",
"CA\/ON",
"CA\/PE",
"CA\/QC",
"CA\/SK",
"CA\/YT"
31
PromoBullit EStore Platform REST API Interface Examples
]
}
Get enabled payment methods for the store (Disabled methods are not listed)
The following will also display whether the store allows multiple payments methods per order.
curl -i [Link]
settings/payment/methods?meta[pageSize]=100 -H "X-Auth-Credentials:[base64
encoded username:password]”
Result:
{
"methods":[
"BillMe",
"Budget",
"StoreCard"
],
"allowMultiplePayments":false
}
Note: The budgets module must be active for the following endpoint to work
curl -i [Link]
settings/payment/methods/Budget/budgets?meta[pageSize]=100 -H "X-Auth-
Credentials:[base64 encoded username:password]”
Result:
{
"meta":{
"page":"0",
"pageSize":"100",
"recordsFound":"1"
},
"records":[
{
"id":"2336",
"amount":"1000",
"description":"Budget",
"costCenter":"Test",
"dateStart":null,
"dateEnd":null,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/settings\/payment\/methods\/Budget\/
budgets\/02336"
}
]
}
curl -i [Link]
ID]\/settings\/payment\/methods\/Budget\/budgets\/02336?meta[pageSize]=100 -H
"X-Auth-Credentials:[base64 encoded username:password]”
Result:
32
PromoBullit EStore Platform REST API Interface Examples
{
"id":"2336",
"storeId":"[Store-ID]",
"amount":"1000",
"description":"Budget",
"costCenter":"Test",
"dateStart":null,
"dateEnd":null,
"created":null,
"modified":null,
"balanceTransactions":"\/admin\/rest2\/1\/stores\/[Store-ID]\/settings\/payment\/methods\/Budget\/
budgets\/2336\/transactions?transactionTypeIds[]=refill&transactionTypeIds[]=create",
"transactions":"\/admin\/rest2\/1\/stores\/[Store-ID]\/settings\/payment\/methods\/Budget\/
budgets\/2336\/transactions",
"approvers":"\/admin\/rest2\/1\/stores\/[Store-ID]\/settings\/payment\/methods\/Budget\/budgets\/
2336\/approvers",
"spenders":"\/admin\/rest2\/1\/stores\/[Store-ID]\/settings\/payment\/methods\/Budget\/budgets\/
2336\/spenders"
}
The above URLs can be used to get records of spenders, approvers, balance changes or all transactions
for this budget.
curl -i [Link]
ID]\/settings\/payment\/methods\/Budget\/budgets\/2336\/spenders?
meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded username:password]”
Result:
{
"records":[
{
"id":"33097",
"budgetId":"2336",
"customerId":"202659",
"spendingAmount":"500",
"overspendingAmount":"20",
"spenderName":"Doe, John",
"email":"[Link]@[Link]",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/settings\/payment\/methods\/Budget\/
budgets\/02336\/spenders\/033097"
}
],
"meta":{
"recordsFound":"1",
"page":"0",
"pageSize":"100"
}
}
The following will list all balance changes and sale transactions for this budget. In the case of a sale, the
log data will include Order information such as customer and payments.
curl -i [Link]
ID]\/settings\/payment\/methods\/Budget\/budgets\/2336\/transactions?
meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded username:password]"
33
PromoBullit EStore Platform REST API Interface Examples
Result:
{
"records":[
{
"type":"refund",
"amount":"11.49",
"previousBudgetAmount":"998.85",
"transactionLog":{
"type":"refund",
"note":"Test",
"internalNote":"Int Test",
"user":"Dashboard User \/ test@[Link]"
},
"created":"2020-01-06 10:38:38"
},
...
{
"type":"sale",
"amount":"-1.15",
"previousBudgetAmount":"1000.00",
"transactionLog":{
"type":"sale",
"order":{
"id":"214065",
"firstName":"John",
"lastName":"Doe",
"email":"test@[Link]",
"companyName":"",
"companyTitle":"",
"created":"2019-11-26 16:01:35"
},
"payment":{
"amount":"1.15",
"prompt":"Test \/ Budget",
"data":{
"budgetId":"2336",
"description":"Budget",
"costCenter":"Test"
}
}
},
"created":"2019-11-26 16:01:35"
},
],
"meta":{
"recordsFound":"7",
"page":"0",
"pageSize":"100"
}
}
34
PromoBullit EStore Platform REST API Interface Examples
Note: The Store Cards (Gift Cards) module must be active for the endpoint below to work.
curl -i [Link]
settings/payment/methods/StoreCard/store-cards?meta[pageSize]=100 -H "X-Auth-
Credentials:[base64 encoded username:password]”
Result:
{
"meta":{
"recordsFound":"2",
"page":"0",
"pageSize":"100"
},
"records":[
{
"id":"13370",
"currencyId":"1",
"number":"12345",
"balance":"75.00",
"status":"A",
"__class":"",
"expires":null,
"customerEmail":"[Link]@[Link]",
"created":"2019-09-08 11:20:47",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/settings\/payment\/methods\/StoreCard\/store-
cards\/013370"
},
{
"id":"4866",
"currencyId":"1",
"number":"55555",
"balance":"104.60",
"status":"A",
"__class":"",
"expires":null,
"customerEmail":"[Link]@[Link]",
"created":"2019-06-18 12:33:55",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/settings\/payment\/methods\/StoreCard\/store-
cards\/04866"
}
]
}
curl -i [Link]
ID]\/settings\/payment\/methods\/StoreCard\/store-cards\/013370?
meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded username:password]"
Result:
{
"id":"13370",
"currencyId":"1",
"number":"12345",
"balance":"75.00",
"status":"A",
"expires":null,
"customerEmail":"[Link]@[Link]",
"customerName":"John Doe",
"requireLogIn":true,
"initialAmount":"75.00",
"created":"2019-09-08 11:20:47",
35
PromoBullit EStore Platform REST API Interface Examples
"transactions":"\/admin\/rest2\/1\/stores\/[Store-ID]\/settings\/payment\/methods\/StoreCard\/store-
cards\/013370\/transactions"
}
The above URL can be used to view completed transactions on this store card.
curl -i [Link]
ID]\/settings\/payment\/methods\/StoreCard\/store-cards\/13370\/transactions?
meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded username:password]"
Result:
{
"meta":{
"recordsFound":"2",
"page":"0",
"pageSize":"100"
},
"records":[
{
"id":"2687",
"amount":"0.00",
"status":"completed",
"modified":"2019-09-06 16:42:52",
"transactionLog":"2019-09-06 16:23:29: 2.30 was authorized.\n2019-09-06 16:42:52: 2.30 was
refunded.\n",
"orderId":"187692"
},
{
"id":"2415",
"amount":"0.00",
"status":"completed",
"modified":"2019-07-22 13:16:33",
"transactionLog":"2019-07-22 13:18:14: 9.19 was authorized.\n2019-07-22 13:21:47: 9.19 was
refunded.\n",
"orderId":"173353"
}
]
}
In the above examples, we are given two transactions, that were each refunded, and the order IDs they go
with.
Customization
curl -i [Link]
settings/product-attributes?meta[pageSize]=100 -H "X-Auth-Credentials:[base64
encoded username:password]”
Result:
[
{
"id":"182",
"name":"__1566852898",
"title":"Packaging",
36
PromoBullit EStore Platform REST API Interface Examples
"dataType":"multichoice",
"isRequired":false,
"visibility":"customer",
"__class":null,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/settings\/product-attributes\/0182"
},
{
"id":"185",
"name":"_NEW",
"title":"New Attribute",
"dataType":"bool",
"isRequired":false,
"visibility":"system",
"__class":null,
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/settings\/product-attributes\/0185"
}
]
Note: Email logs contain log records of any email communication that the store has generated or any
emails sent through the Orders section.
curl -i [Link]
admin/email-logs?meta[pageSize]=100 -H "X-Auth-Credentials:[base64 encoded
username:password]"
Result:
{
"records":[
{
"id":"89848",
"recipient":"test@[Link]",
"subject":"Test Store Store Order Notification",
"created":"2019-09-06 16:26:19",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/admin\/email-logs\/089848"
},
...
{
"id":"72449",
"recipient":"test@[Link]",
"subject":"Test Store Order Confirmation",
"created":"2019-08-15 16:03:03",
"details":"\/admin\/rest2\/1\/stores\/[Store-ID]\/admin\/email-logs\/072449"
}
],
"meta":{
"recordsFound":"11",
"page":"0",
"pageSize":"100"
}
}
37