Skip to main content
Version: 2.0.0

Shopify

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": "6dfce354-2a46-4065-b2ef-65a1b70e3545",
"name": "Shopify – Alloy UAPI",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "10048813",
"_collection_link": ""
},
"item": [
{
"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(\"[Shopify] 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(\"[Shopify] 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": "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(\"[Shopify] 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}",
"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": "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(\"[Shopify] 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(\"[Shopify] 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\"])",
"});",
"",
""
],
"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(\"[Shopify] 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": "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(\"[Shopify] 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');",
" ",
"});",
"",
"var jsonData = pm.response.json();",
"postman.setEnvironmentVariable(\"orderId\", jsonData.orders[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/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(\"[Shopify] 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": "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(\"[Shopify] 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).to.have.property('id');",
" pm.expect(jsonData.order.lineItems[0].quantity).to.equal(2);",
" pm.expect(jsonData.order.totalPrice).to.equal(\"2.00\");",
" pm.expect(jsonData.order.lineItems[0].quantity).to.equal(2);",
" pm.expect(jsonData.order.billingAddress.address1).to.equal(\"6146 Honey Bluff Parkway\");",
" pm.expect(jsonData.order.billingAddress.region).to.equal(\"Cebu\");",
"});",
"",
""
],
"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 \"productId\": \"Chocolate\"\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}",
"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": "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(\"[Shopify] 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');",
"});",
"",
""
],
"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(\"[Shopify] 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');",
"});",
"",
""
],
"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(\"[Shopify] 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(\"[Shopify] 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('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');",
"",
" pm.expect(jsonData.product.variants[0].title).to.equal(\"my-variant\");",
" pm.expect(jsonData.product.variants[0].price).to.equal(\"10.00\");",
" pm.expect(jsonData.product.variants[0].sku).to.equal(\"my-variant\");",
" pm.expect(jsonData.product.variants[0]).to.have.property('weight');",
"",
" const expectedWeights = [",
" {",
" \"unit\": \"kg\",",
" \"value\": 1",
" },",
" {",
" \"unit\": \"g\",",
" \"value\": 1000",
" },",
" {",
" \"unit\": \"oz\",",
" \"value\": 35.274",
" },",
" {",
" \"unit\": \"lb\",",
" \"value\": 2.20462",
" }",
" ];",
"",
" const jsonDataWeights = jsonData.product.variants[0].weight;",
"",
" for (let i = 0; i < expectedWeights.length; i++) {",
" pm.expect(jsonDataWeights[i]).to.eql(expectedWeights[i]);",
" } ",
"});",
"",
"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\",\n \"weight\": {\n \"value\": 1,\n \"unit\": \"kg\"\n },\n \"optionValues\": [{\n \"name\": \"test\",\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": "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(\"[Shopify] order 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(\"[Shopify] order 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": "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(\"[Shopify] order was 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');",
"});",
"",
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"productId\", jsonData.products[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?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": ["{{API_VERSION}}", "one", "commerce", "products"],
"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(\"[Shopify] order 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.tags).to.include('Sample')",
" pm.expect(jsonData.product.productName).to.equal('Hani Shampoo')",
" pm.expect(jsonData.product.productStatus).to.equal('INACTIVE')",
"});",
""
],
"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\",\n \"description\": \"Hanis Shampoo\",\n \"productStatus\": \"INACTIVE\",\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": "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(\"[Shopify] 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": []
},
{
"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(\"[Shopify] order was 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('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(\"[Shopify] order 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": "Create Product for use in 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(\"[Shopify] order 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('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\",\n \"weight\": {\n \"value\": 1,\n \"unit\": \"kg\"\n },\n \"optionValues\": [{\n \"name\": \"test\",\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": "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(\"[Shopify] create 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('createdTimestamp');",
" pm.expect(jsonData.variant).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.variant).to.have.property('productId');",
" pm.expect(jsonData.variant).to.have.property('title');",
" pm.expect(jsonData.variant).to.have.property('price');",
" pm.expect(jsonData.variant).to.have.property('sku');",
" pm.expect(jsonData.variant).to.have.property('optionValues');",
" pm.expect(jsonData.variant).to.have.property('inventory');",
" pm.expect(jsonData.variant).to.have.property('weight');",
"",
" pm.expect(jsonData.variant.price).to.equal('100.00');",
" pm.expect(jsonData.variant.sku).to.equal('POT-0421');",
" pm.expect(jsonData.variant.title).to.equal('Default Title');",
"",
"});",
"",
"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-0421\",\n \"price\": \"100.00\",\n \"weight\": {\n \"value\": 100\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": "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(\"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');",
"});",
""
],
"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(\"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('createdTimestamp');",
" pm.expect(jsonData.variant).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.variant).to.have.property('productId');",
" pm.expect(jsonData.variant).to.have.property('title');",
" pm.expect(jsonData.variant).to.have.property('price');",
" pm.expect(jsonData.variant).to.have.property('sku');",
" pm.expect(jsonData.variant).to.have.property('optionValues');",
" pm.expect(jsonData.variant).to.have.property('inventory');",
" pm.expect(jsonData.variant).to.have.property('weight');",
"",
" const expectedWeights = [",
" {",
" \"unit\": \"kg\",",
" \"value\": 226.79645471781987",
" },",
" {",
" \"unit\": \"g\",",
" \"value\": 226796.45471781987",
" },",
" {",
" \"unit\": \"oz\",",
" \"value\": 8000.018143716378",
" },",
" {",
" \"unit\": \"lb\",",
" \"value\": 500",
" }",
" ];",
"",
" const jsonDataWeights = jsonData.variant.weight;",
"",
" for (let i = 0; i < expectedWeights.length; i++) {",
" pm.expect(jsonDataWeights[i]).to.eql(expectedWeights[i]);",
" }",
"",
"});",
""
],
"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(\"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 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(\"[Shopify] 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(\"fulfillments was returned correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('fulfillments');",
" pm.expect(jsonData.fulfillments[0]).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.fulfillments[0]).to.have.property('orderId');",
" pm.expect(jsonData.fulfillments[0]).to.have.property('trackingNumbers');",
" pm.expect(jsonData.fulfillments[0]).to.have.property('trackingUrls');",
" pm.expect(jsonData.fulfillments[0]).to.have.property('lineItems');",
" pm.expect(jsonData.fulfillments[0]).to.have.property('id');",
"});",
"",
"",
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"fulfillmentId\", jsonData.fulfillments[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/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 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(\"[Shopify] 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(\"[Shopify] fulfillment 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/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 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(\"[Shopify] fulfillment was returned correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('fulfillment');",
" pm.expect(jsonData.fulfillment).to.have.property('updatedTimestamp');",
" pm.expect(jsonData.fulfillment).to.have.property('orderId');",
" pm.expect(jsonData.fulfillment).to.have.property('trackingNumbers');",
" pm.expect(jsonData.fulfillment).to.have.property('trackingUrls');",
" pm.expect(jsonData.fulfillment).to.have.property('lineItems');",
" pm.expect(jsonData.fulfillment).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/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": "Create Subscription",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"subscriptionId\", jsonData.subscription.subscriptionId);",
"",
""
],
"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 \"address\": \"http://localhost:4040/hello\",\n \"topic\": [\"commerce/customers\"]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/webhooks?connectionId={{connectionId}}",
"protocol": "http",
"host": ["localhost"],
"port": "1234",
"path": ["{{API_VERSION}}", "one", "webhooks"],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "List Subscriptions",
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
},
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/webhooks?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": ["{{API_VERSION}}", "one", "webhooks"],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Get Subscription",
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
},
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{apiKey}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/webhooks/{{subscriptionId}}?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": ["{{API_VERSION}}", "one", "webhooks", "{{subscriptionId}}"],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
},
{
"name": "Delete Subscription",
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "DELETE",
"header": [
{
"key": "Authorization",
"value": "Bearer ",
"type": "text"
},
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/one/webhooks/{{subscriptionId}}?connectionId={{connectionId}}",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": ["{{API_VERSION}}", "one", "webhooks", "{{subscriptionId}}"],
"query": [
{
"key": "connectionId",
"value": "{{connectionId}}"
}
]
}
},
"response": []
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "",
"type": "string"
}
]
},
"variable": [
{
"key": "URL",
"value": "https://embedded.runalloy.com"
},
{
"key": "connectionId",
"value": "651b97e8099c23ce6e7dd429"
}
]
}