Skip to main content
Version: 2.0.0

BigCommerce

You'll need to provide the following variables in your postman collection:

VariableDescriptionExample
API_VERSIONRepresents the version of the Alloy Unified API you intend to make calls to. API versions are dated and new versions are released quarterly (in March, June, September, and December).2023-12
connectionIdThe Id of the connection. Call the GET List Connections endpoint to find a connectionId.
apiKeyYour API key. Never share this with anyone.


JSON
{
"info": {
"_postman_id": "050e9e0c-aedf-4520-9210-d0343982a89b",
"name": "BigCommerce – Alloy Unified API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "10048813",
"_collection_link": ""
},
"item": [
{
"name": "Create Customer",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[BigC] customers is returned correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('customer');",
" pm.expect(jsonData.customer).to.have.property('remoteId');",
" pm.expect(jsonData.customer).to.have.property('createdTimestamp');",
" pm.expect(jsonData.customer).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.customer).to.have.property('firstName');",
" pm.expect(jsonData.customer).to.have.property('lastName');",
" pm.expect(jsonData.customer).to.have.property('email');",
" pm.expect(jsonData.customer).to.have.property('phone');",
" pm.expect(jsonData.customer).to.have.property('id');",
"",
" pm.expect(jsonData.customer.firstName).to.equal('Alloy');",
" pm.expect(jsonData.customer.lastName).to.equal('Test User');",
"});",
"",
"var jsonData = pm.response.json();",
"let customerId = jsonData.customer.id;",
"postman.setEnvironmentVariable(\"customerId\", customerId);",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"firstName\": \"Alloy\",\n \"lastName\": \"Test User\",\n \"email\": \"tester+{{$guid}}@runalloy.com\",\n \"phone\": \"+639173210218\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/customers?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": ["{{API_VERSION}}", "one", "commerce", "customers"],
"query": [
{
"key": "credentialId",
"value": "{{credentialId}}",
"disabled": true
},
{
"key": "sampleData",
"value": "true",
"disabled": true
},
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "List Customers",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[BigC] customers are listed correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('customers');",
" pm.expect(jsonData.customers[0]).to.not.be.null;",
" pm.expect(jsonData.customers[0]).to.have.property('remoteId');",
" pm.expect(jsonData.customers[0]).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.customers[0]).to.have.property('lastName');",
" pm.expect(jsonData.customers[0]).to.have.property('email');",
" pm.expect(jsonData.customers[0]).to.have.property('createdTimestamp');",
" pm.expect(jsonData.customers[0]).to.have.property('createdTimestamp');",
" pm.expect(jsonData.customers[0]).to.have.property('phone');",
" pm.expect(jsonData.customers[0]).to.have.property('firstName');",
" pm.expect(jsonData.customers[0]).to.have.property('id');",
"});",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/customers?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": ["{{API_VERSION}}", "one", "commerce", "customers"],
"query": [
{
"key": "cursor",
"value": "{{page}}",
"disabled": true
},
{
"key": "pageSize",
"value": "2",
"disabled": true
},
{
"key": "firstNameContains",
"value": "Test",
"disabled": true
},
{
"key": "sampleData",
"value": "true",
"disabled": true
},
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Get Customer Count",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[BigC] customers count is returned\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('count');",
" pm.expect(jsonData.count).to.be.a(\"number\");",
"});",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/customers/count?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": ["{{API_VERSION}}", "one", "commerce", "customers", "count"],
"query": [
{
"key": "page",
"value": "eyJpdGVtSWQiOnsiUyI6IjMwNDYwOTcxMjU0MzQifSwiZGF0YUJ1Y2tldCI6eyJTIjoiNjNjMTM5OWI3NzM5NmUwMjMzMDE3OTZjL2N1c3RvbWVyIn19",
"disabled": true
},
{
"key": "pageSize",
"value": "10",
"disabled": true
},
{
"key": "firstNameContains",
"value": "Test",
"disabled": true
},
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Get Customer",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[BigC] customer was returned correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('customer');",
" pm.expect(jsonData.customer).to.have.property('remoteId');",
" pm.expect(jsonData.customer).to.have.property('createdTimestamp');",
" pm.expect(jsonData.customer).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.customer).to.have.property('firstName');",
" pm.expect(jsonData.customer).to.have.property('lastName');",
" pm.expect(jsonData.customer).to.have.property('email');",
" pm.expect(jsonData.customer).to.have.property('phone');",
" pm.expect(jsonData.customer).to.have.property('id');",
"});",
"",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/customers/{{customerId}}?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"customers",
"{{customerId}}"
],
"query": [
{
"key": "sampleData",
"value": "true",
"disabled": true
},
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Update Customer",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"customer was returned correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('customer');",
" pm.expect(jsonData.customer).to.have.property('remoteId');",
" pm.expect(jsonData.customer).to.have.property('createdTimestamp');",
" pm.expect(jsonData.customer).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.customer).to.have.property('firstName');",
" pm.expect(jsonData.customer).to.have.property('lastName');",
" pm.expect(jsonData.customer).to.have.property('email');",
" pm.expect(jsonData.customer).to.have.property('phone');",
" pm.expect(jsonData.customer).to.have.property('id');",
" pm.expect(jsonData.customer.id).to.be.equal(environment[\"customerId\"])",
"",
" pm.expect(jsonData.customer.firstName).to.equal('New');",
" pm.expect(jsonData.customer.lastName).to.equal('Name');",
"",
"});",
"",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "PUT",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"firstName\": \"New\",\n \"lastName\": \"Name\",\n \"email\": \"tester+{{$guid}}@runalloy.com\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/customers/{{customerId}}?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"customers",
"{{customerId}}"
],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Delete Customer",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[BigC] customer deleted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('message');",
" pm.expect(jsonData.message).to.be.a(\"string\")",
"});",
"",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "DELETE",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/customers/{{customerId}}?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"customers",
"{{customerId}}"
],
"query": [
{
"key": "userId",
"value": "{{userId}}",
"disabled": true
},
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Create Order",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[BigC] order is created correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('order');",
" pm.expect(jsonData.order).to.have.property('currency');",
" pm.expect(jsonData.order).to.have.property('totalPrice');",
" pm.expect(jsonData.order).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.order).to.have.property('orderStatus');",
" pm.expect(jsonData.order).to.have.property('billingAddress');",
" pm.expect(jsonData.order).to.have.property('lineItems');",
" pm.expect(jsonData.order).to.have.property('remoteId');",
" pm.expect(jsonData.order).to.have.property('orderNumber');",
" pm.expect(jsonData.order).to.have.property('paymentStatus');",
" pm.expect(jsonData.order).to.have.property('totalTax');",
" pm.expect(jsonData.order).to.have.property('createdTimestamp');",
" pm.expect(jsonData.order).to.have.property('totalDiscount');",
" pm.expect(jsonData.order).to.have.property('totalShipping');",
" pm.expect(jsonData.order).to.have.property('id');",
"",
" pm.expect(jsonData.order.billingAddress).to.have.property('firstName');",
" pm.expect(jsonData.order.billingAddress).to.have.property('lastName');",
" pm.expect(jsonData.order.billingAddress).to.have.property('address2');",
" pm.expect(jsonData.order.billingAddress).to.have.property('city');",
" pm.expect(jsonData.order.billingAddress).to.have.property('phone');",
" pm.expect(jsonData.order.billingAddress).to.have.property('address1');",
" pm.expect(jsonData.order.billingAddress).to.have.property('countryCode');",
" pm.expect(jsonData.order.billingAddress).to.have.property('postalCode');",
" pm.expect(jsonData.order.billingAddress).to.have.property('region');",
"",
" pm.expect(jsonData.order.shippingAddress).to.have.property('firstName');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('lastName');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('address2');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('city');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('phone');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('address1');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('countryCode');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('postalCode');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('region');",
"",
"});",
"",
"var jsonData = pm.response.json();",
"postman.setEnvironmentVariable(\"orderId\", jsonData.order.id);",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"lineItems\": [\n {\n \"title\": \"Chocolate\",\n \"price\": 1,\n \"quantity\": 2\n }\n ],\n \"currency\": \"USD\",\n \"billingAddress\": {\n \"address1\": \"6146 Honey Bluff Parkway\",\n \"city\": \"Los Angeles\",\n \"countryCode\": \"US\",\n \"firstName\": \"Tj\",\n \"lastName\": \"Monteclar\",\n \"phone\": \"+639105801660\",\n \"region\": \"Cebu\",\n \"postalCode\": \"90407\"\n },\n \"customer\": {\n \"email\": \"tj@runalloy.com\",\n \"firstName\": \"QA\",\n \"lastName\": \"TEST\",\n \"phone\": \"+639105801660\"\n },\n \"shippingAddress\": {\n \"firstName\": \"Gregg\",\n \"lastName\": \"Mojica\",\n \"address1\": \"332 Dan Troy Dr\",\n \"city\": \"Williamsville\",\n \"countryCode\": \"US\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/orders?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": ["{{API_VERSION}}", "one", "commerce", "orders"],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "List Orders",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[BigC] orders are listed correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('orders');",
" pm.expect(jsonData.orders[0]).to.not.be.null;",
" pm.expect(jsonData.orders[0]).to.have.property('currency');",
" pm.expect(jsonData.orders[0]).to.have.property('totalPrice');",
" pm.expect(jsonData.orders[0]).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.orders[0]).to.have.property('orderStatus');",
" pm.expect(jsonData.orders[0]).to.have.property('billingAddress');",
" pm.expect(jsonData.orders[0]).to.have.property('lineItems');",
" pm.expect(jsonData.orders[0]).to.have.property('remoteId');",
" pm.expect(jsonData.orders[0]).to.have.property('orderNumber');",
" pm.expect(jsonData.orders[0]).to.have.property('paymentStatus');",
" pm.expect(jsonData.orders[0]).to.have.property('totalTax');",
" pm.expect(jsonData.orders[0]).to.have.property('createdTimestamp');",
" pm.expect(jsonData.orders[0]).to.have.property('totalDiscount');",
" pm.expect(jsonData.orders[0]).to.have.property('totalShipping');",
" pm.expect(jsonData.orders[0]).to.have.property('id');",
" pm.expect(jsonData).to.have.property('pageInfo');",
" pm.expect(jsonData.pageInfo).to.have.property('hasNext');",
" pm.expect(jsonData.pageInfo).to.have.property('nextCursor');",
"",
" pm.expect(jsonData.orders[0].billingAddress).to.have.property('firstName');",
" pm.expect(jsonData.orders[0].billingAddress).to.have.property('lastName');",
" pm.expect(jsonData.orders[0].billingAddress).to.have.property('address2');",
" pm.expect(jsonData.orders[0].billingAddress).to.have.property('city');",
" pm.expect(jsonData.orders[0].billingAddress).to.have.property('phone');",
" pm.expect(jsonData.orders[0].billingAddress).to.have.property('address1');",
" pm.expect(jsonData.orders[0].billingAddress).to.have.property('countryCode');",
" pm.expect(jsonData.orders[0].billingAddress).to.have.property('postalCode');",
" pm.expect(jsonData.orders[0].billingAddress).to.have.property('region');",
"",
" ",
"});",
"",
"",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/orders?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": ["{{API_VERSION}}", "one", "commerce", "orders"],
"query": [
{
"key": "page",
"value": "eyJpdGVtSWQiOnsiUyI6IjQxMDQ0NjAyNzE2NzQifSwiZGF0YUJ1Y2tldCI6eyJTIjoiNjNjMTM5OWI3NzM5NmUwMjMzMDE3OTZjL29yZGVyIn19",
"disabled": true
},
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Get Order Count",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"order count is returned correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('count');",
"});",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/orders/count?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": ["{{API_VERSION}}", "one", "commerce", "orders", "count"],
"query": [
{
"key": "page",
"value": "eyJpdGVtSWQiOnsiUyI6IjQxMDQ0NjAyNzE2NzQifSwiZGF0YUJ1Y2tldCI6eyJTIjoiNjNjMTM5OWI3NzM5NmUwMjMzMDE3OTZjL29yZGVyIn19",
"disabled": true
},
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Get Order",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[bigc] order was returned correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('order');",
" pm.expect(jsonData.order).to.have.property('currency');",
" pm.expect(jsonData.order).to.have.property('totalPrice');",
" pm.expect(jsonData.order).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.order).to.have.property('orderStatus');",
" pm.expect(jsonData.order).to.have.property('billingAddress');",
" pm.expect(jsonData.order).to.have.property('lineItems');",
" pm.expect(jsonData.order).to.have.property('remoteId');",
" pm.expect(jsonData.order).to.have.property('orderNumber');",
" pm.expect(jsonData.order).to.have.property('paymentStatus');",
" pm.expect(jsonData.order).to.have.property('totalTax');",
" pm.expect(jsonData.order).to.have.property('createdTimestamp');",
" pm.expect(jsonData.order).to.have.property('totalDiscount');",
" pm.expect(jsonData.order).to.have.property('totalShipping');",
" pm.expect(jsonData.order).to.have.property('id');",
"",
" pm.expect(jsonData.order.billingAddress).to.have.property('firstName');",
" pm.expect(jsonData.order.billingAddress).to.have.property('lastName');",
" pm.expect(jsonData.order.billingAddress).to.have.property('address2');",
" pm.expect(jsonData.order.billingAddress).to.have.property('city');",
" pm.expect(jsonData.order.billingAddress).to.have.property('phone');",
" pm.expect(jsonData.order.billingAddress).to.have.property('address1');",
" pm.expect(jsonData.order.billingAddress).to.have.property('countryCode');",
" pm.expect(jsonData.order.billingAddress).to.have.property('postalCode');",
" pm.expect(jsonData.order.billingAddress).to.have.property('region');",
"",
" pm.expect(jsonData.order.shippingAddress).to.have.property('firstName');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('lastName');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('address2');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('city');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('phone');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('address1');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('countryCode');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('postalCode');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('region');",
"});",
"",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/orders/{{orderId}}?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"orders",
"{{orderId}}"
],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Update Order",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[bigc] order was updated correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('order');",
" pm.expect(jsonData.order).to.have.property('shippingAddress');",
" var shippingAddress = jsonData.order.shippingAddress;",
"",
" pm.expect(shippingAddress).to.have.property('address1', '1453 NW Elgin Ave');",
" pm.expect(shippingAddress).to.have.property('city', 'Bend');",
" pm.expect(shippingAddress).to.have.property('postalCode', '97703');",
" pm.expect(shippingAddress).to.have.property('region', 'Oregon');",
" pm.expect(shippingAddress).to.have.property('countryCode', 'US');",
" pm.expect(shippingAddress).to.have.property('firstName', 'Alex');",
" pm.expect(shippingAddress).to.have.property('lastName', 'McVarish');",
"",
"",
"",
" pm.expect(jsonData.order.billingAddress).to.have.property('firstName');",
" pm.expect(jsonData.order.billingAddress).to.have.property('lastName');",
" pm.expect(jsonData.order.billingAddress).to.have.property('address2');",
" pm.expect(jsonData.order.billingAddress).to.have.property('city');",
" pm.expect(jsonData.order.billingAddress).to.have.property('phone');",
" pm.expect(jsonData.order.billingAddress).to.have.property('address1');",
" pm.expect(jsonData.order.billingAddress).to.have.property('countryCode');",
" pm.expect(jsonData.order.billingAddress).to.have.property('postalCode');",
" pm.expect(jsonData.order.billingAddress).to.have.property('region');",
"",
" pm.expect(jsonData.order.shippingAddress).to.have.property('firstName');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('lastName');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('address2');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('city');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('phone');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('address1');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('countryCode');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('postalCode');",
" pm.expect(jsonData.order.shippingAddress).to.have.property('region');",
"});",
"",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "PUT",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"shippingAddress\": {\n \"address1\": \"1453 NW Elgin Ave\",\n \"city\": \"Bend\",\n \"postalCode\": \"97703\",\n \"region\": \"Oregon\",\n \"countryCode\": \"US\",\n \"firstName\": \"Alex\",\n \"lastName\": \"McVarish\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/orders/{{orderId}}?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"orders",
"{{orderId}}"
],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Delete Order",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[bigc] order was deleted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('message');",
"});",
"",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "DELETE",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/orders/{{orderId}}?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"orders",
"{{orderId}}"
],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Create Product",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[bigc] product was returned correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('product');",
" pm.expect(jsonData.product).to.have.property('remoteId');",
" pm.expect(jsonData.product).to.have.property('createdTimestamp');",
" pm.expect(jsonData.product).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.product).to.have.property('productType');",
" pm.expect(jsonData.product).to.have.property('productName');",
" pm.expect(jsonData.product).to.have.property('description');",
" pm.expect(jsonData.product).to.have.property('images');",
" pm.expect(jsonData.product).to.have.property('productStatus');",
" pm.expect(jsonData.product).to.have.property('tags');",
" pm.expect(jsonData.product).to.have.property('vendor');",
" pm.expect(jsonData.product).to.have.property('productUrl');",
" // pm.expect(jsonData.product).to.have.property('internalUpdatedTs');",
" pm.expect(jsonData.product).to.have.property('id');",
" pm.expect(jsonData.product).to.have.property('variants');",
" pm.expect(jsonData.product.variants[0]).to.have.property('remoteId');",
" pm.expect(jsonData.product.variants[0]).to.have.property('inventory');",
" pm.expect(jsonData.product.variants[0]).to.have.property('optionValues');",
" pm.expect(jsonData.product.variants[0]).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.product.variants[0]).to.have.property('price');",
" pm.expect(jsonData.product.variants[0]).to.have.property('createdTimestamp');",
" pm.expect(jsonData.product.variants[0]).to.have.property('sku');",
" pm.expect(jsonData.product.variants[0]).to.have.property('title');",
" pm.expect(jsonData.product.variants[0]).to.have.property('id');",
"});",
"",
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"productId\", jsonData.product.id);",
"",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"productName\": \"Product {{$guid}}\",\n \"description\": \"AP2 Desc\",\n \"productStatus\": \"ACTIVE\",\n \"variants\": [\n {\n \"price\": 10,\n \"sku\": \"my-variant-{{$guid}}\",\n \"weight\": {\n \"value\": 1,\n \"unit\": \"kg\"\n },\n \"optionValues\": [{\n \"name\": \"Color\",\n \"value\": \"my-variant\"\n }]\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/products?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": ["{{API_VERSION}}", "one", "commerce", "products"],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "List Products",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[bigc] products were returned correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('products');",
" pm.expect(jsonData.products[0]).to.have.property('remoteId');",
" pm.expect(jsonData.products[0]).to.have.property('productType');",
" pm.expect(jsonData.products[0]).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.products[0]).to.have.property('productStatus');",
" pm.expect(jsonData.products[0]).to.have.property('images');",
" pm.expect(jsonData.products[0]).to.have.property('description');",
" pm.expect(jsonData.products[0]).to.have.property('createdTimestamp');",
" pm.expect(jsonData.products[0]).to.have.property('productName');",
" pm.expect(jsonData.products[0]).to.have.property('id');",
"",
" if (jsonData.products[0].variants.length > 0) {",
" pm.expect(jsonData.products[0].variants[0]).to.have.property('remoteId');",
" pm.expect(jsonData.products[0].variants[0]).to.have.property('productId');",
" pm.expect(jsonData.products[0].variants[0]).to.have.property('createdTimestamp');",
" pm.expect(jsonData.products[0].variants[0]).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.products[0].variants[0]).to.have.property('title');",
" pm.expect(jsonData.products[0].variants[0]).to.have.property('price');",
" pm.expect(jsonData.products[0].variants[0]).to.have.property('sku');",
" }",
"});",
"",
"",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/products?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": ["{{API_VERSION}}", "one", "commerce", "products"],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Get Product Count",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[bigc] product count was returned correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('count');",
" pm.expect(jsonData.count).to.be.a('number')",
"});",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/products/count?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": ["{{API_VERSION}}", "one", "commerce", "products", "count"],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Get Product",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[bigc] produt was returned correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('product');",
" pm.expect(jsonData.product).to.have.property('remoteId');",
" pm.expect(jsonData.product).to.have.property('productType');",
" pm.expect(jsonData.product).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.product).to.have.property('productStatus');",
" pm.expect(jsonData.product).to.have.property('images');",
" pm.expect(jsonData.product).to.have.property('description');",
" pm.expect(jsonData.product).to.have.property('createdTimestamp');",
" pm.expect(jsonData.product).to.have.property('productName');",
" pm.expect(jsonData.product).to.have.property('id');",
" pm.expect(jsonData.product.id).to.equal(environment[\"productId\"])",
" pm.expect(jsonData.product.variants[0]).to.have.property('remoteId');",
" pm.expect(jsonData.product.variants[0]).to.have.property('inventory');",
" pm.expect(jsonData.product.variants[0]).to.have.property('optionValues');",
" pm.expect(jsonData.product.variants[0]).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.product.variants[0]).to.have.property('price');",
" pm.expect(jsonData.product.variants[0]).to.have.property('createdTimestamp');",
" pm.expect(jsonData.product.variants[0]).to.have.property('sku');",
" pm.expect(jsonData.product.variants[0]).to.have.property('title');",
" pm.expect(jsonData.product.variants[0]).to.have.property('id');",
"});",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/products/{{productId}}?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"products",
"{{productId}}"
],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Update Product",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[bigc] update product was returned correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('product');",
" pm.expect(jsonData.product).to.have.property('remoteId');",
" pm.expect(jsonData.product).to.have.property('productType');",
" pm.expect(jsonData.product).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.product).to.have.property('productStatus');",
" pm.expect(jsonData.product).to.have.property('images');",
" pm.expect(jsonData.product).to.have.property('description');",
" pm.expect(jsonData.product).to.have.property('createdTimestamp');",
" pm.expect(jsonData.product).to.have.property('productName');",
" pm.expect(jsonData.product).to.have.property('id');",
" pm.expect(jsonData.product.id).to.equal(environment[\"productId\"])",
"",
" pm.expect(jsonData.product.variants[0]).to.have.property('remoteId');",
" pm.expect(jsonData.product.variants[0]).to.have.property('inventory');",
" pm.expect(jsonData.product.variants[0]).to.have.property('optionValues');",
" pm.expect(jsonData.product.variants[0]).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.product.variants[0]).to.have.property('price');",
" pm.expect(jsonData.product.variants[0]).to.have.property('createdTimestamp');",
" pm.expect(jsonData.product.variants[0]).to.have.property('sku');",
" pm.expect(jsonData.product.variants[0]).to.have.property('title');",
" pm.expect(jsonData.product.variants[0]).to.have.property('id');",
"",
" pm.expect(jsonData.product.productName).to.contain('Hani Shampoo');",
" pm.expect(jsonData.product.description).to.equal('NEW DESCRIPTION');",
"",
" ",
"});",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "PUT",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"productName\": \"Hani Shampoo {{$guid}}\",\n \"description\": \"NEW DESCRIPTION\",\n \"productStatus\": \"DRAFT\",\n \"tags\": [\n \"Sample\",\n \"Shampoo\",\n \"PandG\"\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/products/{{productId}}?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"products",
"{{productId}}"
],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Create Product Variant",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[bigc] product variant was returned correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('variant');",
" pm.expect(jsonData.variant).to.have.property('remoteId');",
" pm.expect(jsonData.variant).to.have.property('inventory');",
" pm.expect(jsonData.variant).to.have.property('optionValues');",
" pm.expect(jsonData.variant).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.variant).to.have.property('price');",
" pm.expect(jsonData.variant).to.have.property('createdTimestamp');",
" pm.expect(jsonData.variant).to.have.property('createdTimestamp');",
" pm.expect(jsonData.variant).to.have.property('productId');",
" pm.expect(jsonData.variant).to.have.property('sku');",
" pm.expect(jsonData.variant).to.have.property('title');",
" pm.expect(jsonData.variant).to.have.property('weight');",
"});",
"",
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"variantId\", jsonData.variant.id);",
"",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"optionValues\": [\n {\n \"name\": \"Color\",\n \"value\": \"{{$randomNoun}}\"\n },\n {\n \"name\": \"Size\",\n \"value\": \"{{$randomNoun}}\"\n }\n ],\n \"sku\": \"POT-{{$guid}}\",\n \"price\": \"100.00\",\n \"weight\": {\n \"value\": 100,\n \"unit\": \"lb\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/products/{{productId}}/variants?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"products",
"{{productId}}",
"variants"
],
"query": [
{
"key": "productId",
"value": "4463469396026",
"disabled": true
},
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "List Product Variants",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[BigC] product variants were returned correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('variants');",
" pm.expect(jsonData.variants[0]).to.have.property('remoteId');",
" pm.expect(jsonData.variants[0]).to.have.property('inventory');",
" pm.expect(jsonData.variants[0]).to.have.property('weight');",
" pm.expect(jsonData.variants[0]).to.have.property('optionValues');",
" pm.expect(jsonData.variants[0]).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.variants[0]).to.have.property('price');",
" pm.expect(jsonData.variants[0]).to.have.property('createdTimestamp');",
" pm.expect(jsonData.variants[0]).to.have.property('sku');",
" pm.expect(jsonData.variants[0]).to.have.property('title');",
" pm.expect(jsonData.variants[0]).to.have.property('id');",
" pm.expect(jsonData).to.have.property('pageInfo');",
" pm.expect(jsonData.pageInfo).to.have.property('hasNext');",
" pm.expect(jsonData.pageInfo).to.have.property('nextCursor'); ",
"});",
"",
"",
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"variantId\", jsonData.variants[0].id);",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/products/{{productId}}/variants?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"products",
"{{productId}}",
"variants"
],
"query": [
{
"key": "page",
"value": "{{page}}",
"disabled": true
},
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Get Product Variant Count",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[bigc] products variant count was returned correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('count');",
" ",
"});",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/products/{{productId}}/variants/count?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"products",
"{{productId}}",
"variants",
"count"
],
"query": [
{
"key": "page",
"value": "{{page}}",
"disabled": true
},
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Get Product Variant",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[bigc] product variant was returned correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('variant');",
" pm.expect(jsonData.variant).to.have.property('remoteId');",
" pm.expect(jsonData.variant).to.have.property('inventory');",
" pm.expect(jsonData.variant).to.have.property('optionValues');",
" pm.expect(jsonData.variant).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.variant).to.have.property('price');",
" pm.expect(jsonData.variant).to.have.property('createdTimestamp');",
" pm.expect(jsonData.variant).to.have.property('createdTimestamp');",
" pm.expect(jsonData.variant).to.have.property('productId');",
" pm.expect(jsonData.variant).to.have.property('sku');",
" pm.expect(jsonData.variant).to.have.property('title');",
" pm.expect(jsonData.variant).to.have.property('weight');",
"});",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/products/{{productId}}/variants/{{variantId}}?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"products",
"{{productId}}",
"variants",
"{{variantId}}"
],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Update Product Variant",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[bigc] product variant was updated correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('variant');",
" pm.expect(jsonData.variant).to.have.property('remoteId');",
" pm.expect(jsonData.variant).to.have.property('inventory');",
" pm.expect(jsonData.variant).to.have.property('optionValues');",
" pm.expect(jsonData.variant).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.variant).to.have.property('price');",
" pm.expect(jsonData.variant).to.have.property('createdTimestamp');",
" pm.expect(jsonData.variant).to.have.property('createdTimestamp');",
" pm.expect(jsonData.variant).to.have.property('productId');",
" pm.expect(jsonData.variant).to.have.property('sku');",
" pm.expect(jsonData.variant).to.have.property('title');",
"",
"});",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "PUT",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"weight\": {\n \"value\": 500,\n \"unit\": \"lb\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/products/{{productId}}/variants/{{variantId}}?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"products",
"{{productId}}",
"variants",
"{{variantId}}"
],
"query": [
{
"key": "productId",
"value": "4463469396026",
"disabled": true
},
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Delete Product Variant",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"[bigc] product variant deleted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('message');",
" pm.expect(jsonData.message).to.be.a(\"string\")",
"});",
"",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "DELETE",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/products/{{productId}}/variants/{{variantId}}?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"products",
"{{productId}}",
"variants",
"{{variantId}}"
],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "List Fulfillments",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 422\"] = responseCode.code === 422;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"Status code is 422\", function () {",
" pm.response.to.have.status(422);",
"});",
"",
"pm.test(\"Body has code and message\", function () {",
" let jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('code');",
" pm.expect(jsonData).to.have.property('message');",
"});",
"",
"pm.test(\"Code is OPERATION_NOT_SUPPORTED\", function () {",
" let jsonData = pm.response.json();",
" pm.expect(jsonData.code).to.eql(\"MODEL_NOT_SUPPORTED\");",
"});"
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/orders/{{orderId}}/fulfillments?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"orders",
"{{orderId}}",
"fulfillments"
],
"query": [
{
"key": "page",
"value": "{{page}}",
"disabled": true
},
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Get Fulfillment Count",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 422\"] = responseCode.code === 422;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"Status code is 422\", function () {",
" pm.response.to.have.status(422);",
"});",
"",
"pm.test(\"Body has code and message\", function () {",
" let jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('code');",
" pm.expect(jsonData).to.have.property('message');",
"});",
"",
"pm.test(\"Code is OPERATION_NOT_SUPPORTED\", function () {",
" let jsonData = pm.response.json();",
" pm.expect(jsonData.code).to.eql(\"MODEL_NOT_SUPPORTED\");",
"});"
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/orders/{{orderId}}/fulfillments/count?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"orders",
"{{orderId}}",
"fulfillments",
"count"
],
"query": [
{
"key": "page",
"value": "eyJpdGVtSWQiOnsiUyI6IjMwNDYwOTcxMjU0MzQifSwiZGF0YUJ1Y2tldCI6eyJTIjoiNjNjMTM5OWI3NzM5NmUwMjMzMDE3OTZjL2N1c3RvbWVyIn19",
"disabled": true
},
{
"key": "pageSize",
"value": "10",
"disabled": true
},
{
"key": "firstNameContains",
"value": "Test",
"disabled": true
},
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Get Fulfillment",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 422\"] = responseCode.code === 422;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"Status code is 422\", function () {",
" pm.response.to.have.status(422);",
"});",
"",
"pm.test(\"Body has code and message\", function () {",
" let jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('code');",
" pm.expect(jsonData).to.have.property('message');",
"});",
"",
"pm.test(\"Code is OPERATION_NOT_SUPPORTED\", function () {",
" let jsonData = pm.response.json();",
" pm.expect(jsonData.code).to.eql(\"MODEL_NOT_SUPPORTED\");",
"});"
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/orders/{{orderId}}/fulfillments/{{fulfillmentId}}?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"orders",
"{{orderId}}",
"fulfillments",
"{{fulfillmentId}}"
],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Delete Product",
"event": [
{
"listen": "test",
"script": {
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"",
"var contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");",
"tests[\"Has Content-Type\"] = contentTypeHeaderExists;",
" ",
"if (contentTypeHeaderExists) {",
" tests[\"Content-Type is application/json\"] = ",
" responseHeaders[\"Content-Type\"].has(\"application/json\");",
"}",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.have.status(200);",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"product deleted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('message');",
" pm.expect(jsonData.message).to.be.a(\"string\")",
"});",
"",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "DELETE",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/commerce/products/{{productId}}?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": [
"{{API_VERSION}}",
"one",
"commerce",
"products",
"{{productId}}"
],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "hIiwVOXxpLlcV70A_r8GD",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [""]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [""]
}
}
]
}