Skip to main content
Version: 1.2.0

Metadata APIs

Metdata APIs help you to dynamically build interfaces inside your product using Unified API. Use Metadata APIs to get a list of all supported actions per integration and render which fields are required or optional.

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
apiKeyYour API key. Never share this with anyone.

Download the Collection

Download the full collection below.

JSON
{
"info": {
"_postman_id": "9fafb9d5-99c3-4257-9ac3-6b7688c21c05",
"name": "Metadata – Alloy Unified API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "10048813",
"_collection_link": ""
},
"item": [
{
"name": "List Operations",
"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(\"[metadata] list operations outputs correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('operations');",
" pm.expect(jsonData.operations.customer).to.not.be.null;",
" pm.expect(jsonData.operations.customer).to.include('listCustomers');",
" pm.expect(jsonData.operations.customer).to.include('createCustomer');",
" pm.expect(jsonData.operations.customer).to.include('updateCustomer');",
" pm.expect(jsonData.operations.customer).to.include('deleteCustomer');",
" pm.expect(jsonData.operations.customer).to.include('getCustomer');",
"});",
"",
""
],
"type": "text/javascript"
}
}
],
"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/metadata/operations?app=shopify",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": ["{{API_VERSION}}", "one", "metadata", "operations"],
"query": [
{
"key": "app",
"value": "shopify"
}
]
}
},
"response": []
},
{
"name": "Get Fields for Operation",
"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(\"[metadata] get fields for operation outputs correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.property('fields');",
" pm.expect(jsonData.fields[0]).to.not.be.null;",
" pm.expect(jsonData.fields[0]).to.have.property('name');",
" pm.expect(jsonData.fields[0]).to.have.property('type');",
" pm.expect(jsonData.fields[0]).to.have.property('description');",
" pm.expect(jsonData.fields[0]).to.have.property('required');",
" pm.expect(jsonData.fields[0].required).to.be.a('boolean');",
" pm.expect(jsonData.fields[0].description).to.be.a('string');",
"});",
"",
""
],
"type": "text/javascript"
}
}
],
"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/metadata/fields?operation=updateOrder&app=shopify",
"protocol": "https",
"host": ["embedded", "runalloy", "com"],
"path": ["{{API_VERSION}}", "one", "metadata", "fields"],
"query": [
{
"key": "operation",
"value": "updateOrder"
},
{
"key": "app",
"value": "shopify"
}
]
}
},
"response": []
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [""]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [""]
}
}
],
"variable": [
{
"key": "api_base_url",
"value": "https://embedded.runalloy.com",
"type": "string"
},
{
"key": "embedded_api_base_url",
"value": "https://embedded.runalloy.com",
"type": "string"
}
]
}