{"openapi":"3.1.0","info":{"title":"kevel-management-jobs-service","version":"1.0"},"servers":[{"url":"https://api.kevel.co/v1/job"}],"components":{"securitySchemes":{"sec0":{"type":"apiKey","in":"header","name":"X-Kevel-ApiKey"}}},"security":[{"sec0":[]}],"paths":{"/":{"post":{"summary":"Submit Job","description":"Create Ads from Products via API","operationId":"submit-jobs","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"TaskId":{"type":"string","description":"The type of task you are submitting. Currently only `create-ads-from-products` and `create-ads-from-product-query` are supported.","enum":["create-ads-from-products","create-ads-from-product-query","create-native-product-ad"]},"TaskArgs":{"type":"object","description":"Arguments specific to your TaskId","properties":{"ProductUris":{"type":"array","description":"Array of ItemDB product URIs. Example URI: `itemdb://12345/100/01936422964`. Structure is `itemdb://{network_id}/{catalog_id}/{item_id}`","items":{"type":"string"}},"FlightId":{"type":"integer","description":"ID of the Flight that Ads should be associated with","format":"int32"},"AdTemplateUri":{"type":"string","description":"The ItemDB URI of the Ad Template to be used for creating Ads from product data. Example URI: `itemdb://12345/101/0e9321b3-1446-47ec-b1d7-705bfb7b3fb5`. Structure: `itemdb://{network_id}/{ad_templates_table_id}/{template_uuid}`"},"Overrides":{"type":"object","description":"Note that Overrides is a mapping of ItemDB URIs to arrays of objects. Each ItemDB URI specified must be present in ProductUris","properties":{"<ItemDB URI 1>":{"type":"array","items":{"properties":{"source":{"type":"string","description":"Either the source field from the product or a scalar value (for `constant` Ops)"},"target":{"type":"array","description":"Array of strings representing the path into the `ad` or `creative` where the source value should be saved.","default":[],"items":{"type":"string"}},"op":{"type":"string","description":"How the source should be mapped to the target.","enum":["constant","literal","stringify","stringify-array"]}},"type":"object"}},"<ItemDB URI 2>":{"type":"array","items":{"properties":{"source":{"type":"string","description":"Either the source field from the product or a scalar value (for `constant` Ops)"},"target":{"type":"array","description":"Array of strings representing the path into the `ad` or `creative` where the source value should be saved.","default":[],"items":{"type":"string"}},"op":{"type":"string","description":"How the source should be mapped to the target.","enum":["constant","literal","stringify","stringify-array"]}},"type":"object"}}}},"ProductQuery":{"type":"array"}}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n    \"CompletedTime\": null,\n    \"TaskId\": \"create-ads-from-products\",\n    \"NetworkId\": 11245,\n    \"Status\": \"available\",\n    \"TaskArgs\": {\n        \"ProductUris\": [\n            \"itemdb://11261/270/82731247\"\n        ],\n        \"AdTemplateUri\": \"itemdb://11245/101/6330ac20-a9ab-11ee-a04e-c92952d71bab\",\n        \"FlightId\": 332150093\n    },\n    \"AvailableTime\": \"2023-06-02T20:20:52.419028\",\n    \"Output\": {},\n    \"Id\": 9000,\n    \"PartitionId\": null\n}"}},"schema":{"type":"object","properties":{"CompletedTime":{},"TaskId":{"type":"string","example":"create-ads-from-products"},"NetworkId":{"type":"integer","example":11245,"default":0},"Status":{"type":"string","example":"available"},"TaskArgs":{"type":"object","properties":{"ProductUris":{"type":"array","items":{"type":"string","example":"itemdb://11261/270/82731247"}},"AdTemplateUri":{"type":"string","example":"itemdb://11245/101/6330ac20-a9ab-11ee-a04e-c92952d71bab"},"FlightId":{"type":"integer","example":332150093,"default":0}}},"AvailableTime":{"type":"string","example":"2023-06-02T20:20:52.419028"},"Output":{"type":"object","properties":{}},"Id":{"type":"integer","example":9000,"default":0},"PartitionId":{}}}}}}},"deprecated":false},"get":{"summary":"List Jobs","description":"List batch jobs for a network","operationId":"list-jobs","parameters":[{"name":"verbose","in":"query","description":"Whether to return TaskArgs and Output attributes in returned jobs.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"[\n    {\n        \"CompletedTime\": \"2023-03-02T15:03:37.268185\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-03-02T15:03:35.890676\",\n        \"Id\": 4938,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-03-17T06:56:04.021866\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-03-17T06:56:03.193623\",\n        \"Id\": 5480,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-03-17T07:29:27.765128\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-03-17T07:29:25.93964\",\n        \"Id\": 5513,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-03-23T14:24:52.666134\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-03-23T14:24:48.788077\",\n        \"Id\": 5716,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-03-17T07:34:51.872306\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-03-17T07:34:50.841284\",\n        \"Id\": 5546,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-03-29T10:39:45.071092\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-03-29T10:39:44.768955\",\n        \"Id\": 6016,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-02-28T22:04:46.968222\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-02-28T22:04:45.893803\",\n        \"Id\": 4757,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-04-03T10:51:13.706202\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-04-03T10:51:12.596659\",\n        \"Id\": 6330,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-04-06T06:44:53.872438\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-04-06T06:44:52.000963\",\n        \"Id\": 6529,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-04-06T09:23:12.81443\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-04-06T09:23:11.87926\",\n        \"Id\": 6530,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-03-08T18:28:11.191461\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-03-08T18:28:04.281022\",\n        \"Id\": 5076,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-03-08T18:31:25.407789\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-03-08T18:31:23.456679\",\n        \"Id\": 5077,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-03-29T11:27:50.010495\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-03-29T11:27:48.255095\",\n        \"Id\": 6018,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-04-13T10:51:19.469423\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-04-13T10:51:18.606683\",\n        \"Id\": 6664,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-04-13T11:53:20.473025\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-04-13T11:53:18.504638\",\n        \"Id\": 6669,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-04-17T07:59:17.107326\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-04-17T07:59:16.569958\",\n        \"Id\": 6937,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-04-15T01:06:49.465421\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-04-15T01:06:44.800227\",\n        \"Id\": 6871,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-04-15T01:09:55.869415\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-04-15T01:09:54.004725\",\n        \"Id\": 6904,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-04-18T11:58:55.585019\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-04-18T11:58:54.465378\",\n        \"Id\": 7004,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-04-18T11:58:59.112349\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-04-18T11:58:56.117994\",\n        \"Id\": 7005,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-04-18T11:59:12.434499\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-04-18T11:59:07.948589\",\n        \"Id\": 7007,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-04-20T13:27:03.147823\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-04-20T13:26:59.358493\",\n        \"Id\": 7074,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-04-18T11:58:59.417442\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-04-18T11:58:56.57084\",\n        \"Id\": 7006,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-04-20T13:27:57.000075\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-04-20T13:27:55.575829\",\n        \"Id\": 7075,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-04-24T16:29:41.016358\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-04-24T16:29:36.831235\",\n        \"Id\": 7177,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-04-27T12:48:48.658579\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-04-27T12:48:45.083953\",\n        \"Id\": 7349,\n        \"PartitionId\": null\n    },\n    {\n        \"CompletedTime\": \"2023-05-08T11:08:49.885872\",\n        \"TaskId\": \"create-ads-from-products\",\n        \"NetworkId\": 11245,\n        \"Status\": \"completed\",\n        \"AvailableTime\": \"2023-05-08T11:08:46.933484\",\n        \"Id\": 7798,\n        \"PartitionId\": null\n    }\n]"}},"schema":{"type":"array","items":{"type":"object","properties":{"CompletedTime":{"type":"string","example":"2023-03-02T15:03:37.268185"},"TaskId":{"type":"string","example":"create-ads-from-products"},"NetworkId":{"type":"integer","example":11245,"default":0},"Status":{"type":"string","example":"completed"},"AvailableTime":{"type":"string","example":"2023-03-02T15:03:35.890676"},"Id":{"type":"integer","example":4938,"default":0},"PartitionId":{}}}}}}}},"deprecated":false}},"/{job_id}":{"get":{"summary":"Get Job","description":"Get information about a batch job","operationId":"get-job","parameters":[{"name":"job_id","in":"path","description":"The ID of the job to return information about","schema":{"type":"integer","format":"int32"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"completed":{"value":"{\n    \"CompletedTime\": \"2023-02-28T22:04:46.968222\",\n    \"TaskId\": \"create-ads-from-products\",\n    \"NetworkId\": 11245,\n    \"Status\": \"completed\",\n    \"TaskArgs\": {\n        \"ProductUris\": [\n            \"itemdb://11245/100/0193642296013-skechers-13054-n-kengat-valk-40-0193642296013\"\n        ],\n        \"AdTemplateUri\": \"itemdb://11245/101/0e9321b3-1446-47ec-b1d7-705bfb7b3fb5\",\n        \"FlightId\": 332150093\n    },\n    \"AvailableTime\": \"2023-02-28T22:04:45.893803\",\n    \"Output\": {\n        \"AdIds\": [\n            342014259\n        ]\n    },\n    \"Id\": 4757,\n    \"PartitionId\": null\n}"},"failed":{"value":"{\n  \"CompletedTime\": null,\n  \"TaskId\": \"create-ads-from-products\",\n  \"NetworkId\": 11261,\n  \"Status\": \"failed\",\n  \"TaskArgs\": {\n    \"ProductUris\": [\n      \"itemdb://10649/100/10597495\"\n    ],\n    \"AdTemplateUri\": \"itemdb://11261/104/F54977E3-61A0-4B36-B1F6-F691BAD5BD7D\",\n    \"FlightId\": 364699967\n  },\n  \"AvailableTime\": \"2023-06-12T18:18:45.860623\",\n  \"Output\": {\n    \"errors\": [\n      {\n        \"message\": \"At least one of the submitted Products has an invalid NetworkId\"\n      }\n    ]\n  },\n  \"Id\": 9428,\n  \"PartitionId\": null\n}"},"product not found":{"value":"{\n    \"CompletedTime\": \"2023-02-28T22:04:46.968222\",\n    \"TaskId\": \"create-ads-from-products\",\n    \"NetworkId\": 11245,\n    \"Status\": \"completed\",\n    \"TaskArgs\": {\n        \"ProductUris\": [\n            \"itemdb://11245/100/0193642296013-skechers-13054-n-kengat-valk-40-0193642296013\",\n            \"itemdb://11245/100/0193642234098-nonexistent-18923-mistake-11-423412342314\",\n        ],\n        \"AdTemplateUri\": \"itemdb://11245/101/0e9321b3-1446-47ec-b1d7-705bfb7b3fb5\",\n        \"FlightId\": 332150093\n    },\n    \"AvailableTime\": \"2023-02-28T22:04:45.893803\",\n    \"Output\": {\n        \"Warnings\": [\n            {\n                \"ProductsNotFound\": [\n                    \"0193642234098-nonexistent-18923-mistake-11-423412342314\"\n                ],\n                \"Message\": \"1 provided product(s) were not found.\"\n            }\n        ],\n        \"AdIds\": [\n            342014259\n        ]\n    },\n    \"Id\": 4757,\n    \"PartitionId\": null\n}"},"Result":{"value":"{\n    \"CompletedTime\": \"2025-08-15T15:31:12.377164\",\n    \"TaskId\": \"update-ads-from-products\",\n    \"NetworkId\": 456,\n    \"Status\": \"completed\",\n    \"TaskArgs\": {\n        \"ProductTableId\": 100,\n        \"PreviousLsn\": \"3A6/42D633B1\"\n    },\n    \"AvailableTime\": \"2025-08-15T13:32:27.6905\",\n    \"Output\": {\n        \"AdIds\": [\n            48990475,\n            48990476,\n            48990477,\n            48990478,\n            ...],\n        \"Metrics\": {\n            \"DeleteProductCount\": 0,\n            \"CreateAdCount\": 83739,\n            \"DeleteAdCount\": 96903,\n            \"UpdateAdCount\": 3089955,\n            \"UpsertProductCount\": 1057898\n        }\n    },\n    \"Id\": 123456,\n    \"PartitionId\": null\n}"}},"schema":{"oneOf":[{"title":"completed","type":"object","properties":{"CompletedTime":{"type":"string","example":"2023-02-28T22:04:46.968222"},"TaskId":{"type":"string","example":"create-ads-from-products"},"NetworkId":{"type":"integer","example":11245,"default":0},"Status":{"type":"string","example":"completed"},"TaskArgs":{"type":"object","properties":{"ProductUris":{"type":"array","items":{"type":"string","example":"itemdb://11245/100/0193642296013-skechers-13054-n-kengat-valk-40-0193642296013"}},"AdTemplateUri":{"type":"string","example":"itemdb://11245/101/0e9321b3-1446-47ec-b1d7-705bfb7b3fb5"},"FlightId":{"type":"integer","example":332150093,"default":0}}},"AvailableTime":{"type":"string","example":"2023-02-28T22:04:45.893803"},"Output":{"type":"object","properties":{"AdIds":{"type":"array","items":{"type":"integer","example":342014259,"default":0}}}},"Id":{"type":"integer","example":4757,"default":0},"PartitionId":{}}},{"title":"failed","type":"object","properties":{"CompletedTime":{},"TaskId":{"type":"string","example":"create-ads-from-products"},"NetworkId":{"type":"integer","example":11261,"default":0},"Status":{"type":"string","example":"failed"},"TaskArgs":{"type":"object","properties":{"ProductUris":{"type":"array","items":{"type":"string","example":"itemdb://10649/100/10597495"}},"AdTemplateUri":{"type":"string","example":"itemdb://11261/104/F54977E3-61A0-4B36-B1F6-F691BAD5BD7D"},"FlightId":{"type":"integer","example":364699967,"default":0}}},"AvailableTime":{"type":"string","example":"2023-06-12T18:18:45.860623"},"Output":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string","example":"At least one of the submitted Products has an invalid NetworkId"}}}}}},"Id":{"type":"integer","example":9428,"default":0},"PartitionId":{}}}]}}}}},"deprecated":false}}},"x-readme":{"headers":[],"explorer-enabled":true,"proxy-enabled":true},"x-readme-fauxas":true}