{
"openapi": "3.0.0",
"info": {
"title": "Customer Service API",
"version": "1.0"
},
"servers": [
{
"url": "https://dev.sysx.co.uk/api/customerservice/rest/",
"description": "Test Server"
},
{
"url": "https://xdp.sysx.co.uk/api/customerservice/rest/",
"description": "Production server"
},
{
"url": "http://sysx.local/api/customerservice/rest/",
"description": "local server"
}
],
"paths": {
"/endpoint": {
"post": {
"tags": [
"Basic"
],
"summary": "Returns customer consignments",
"parameters": [
{
"$ref": "#/components/parameters/format"
}
],
"requestBody": {
"description": "Body to allow retrieval of consignments",
"required": true,
"content": {
"application/xml": {
"schema": {
"$ref": "#/components/schemas/CustomerServiceRequest"
},
"examples": {
"all_consignments_request": {
"summary": "All Customer Consignments",
"value": "\n\n statusupdates\n rNdIZsI8\n 9D257A\n\n"
},
"all_consignments_type_request": {
"summary": "All Customer Consignment Of A Specific Type",
"value": "\n\n statusupdates\n rNdIZsI8\n 9D257A\n PRINT\n\n"
},
"single_consignment_request": {
"summary": "Specific Consignment",
"value": "\n\n statusupdates\n rNdIZsI8\n 9D257A\n ZDBXVY017805\n\n"
},
"single_consignment_type_request": {
"summary": "Specific Consignment AND Type",
"value": "\n\n statusupdates\n rNdIZsI8\n 9D257A\n PRINT\n ZDBXVY017805\n\n"
},
"all_consignments_since_request": {
"summary": "All Updates From Since ID",
"value": "\n\n statusupdates\n rNdIZsI8\n 9D257A\n PRINT\n 1214557425\n\n"
}
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomerServiceRequest"
},
"examples": {
"all_consignments_request": {
"$ref": "#/components/examples/all_consignments_request"
},
"all_consignments_type_request": {
"$ref": "#/components/examples/all_consignments_type_request"
},
"single_consignment_request": {
"$ref": "#/components/examples/single_consignment_request"
},
"single_consignment_type_request": {
"$ref": "#/components/examples/single_consignment_type_request"
},
"all_consignments_since_request": {
"$ref": "#/components/examples/all_consignments_since_request"
}
}
}
}
},
"responses": {
"200": {
"description": "Customer Consignments Returned"
}
},
"security": [
{
"API Key": []
}
]
}
},
"/ping": {
"get": {
"tags": [
"Basic"
],
"summary": "Simple ping/pong test",
"operationId": "API\\Controller_CustomerService_Rest::get_ping",
"parameters": [
{
"$ref": "#/components/parameters/format"
}
],
"responses": {
"200": {
"description": "Returns a simple ping/pong object"
}
},
"security": [
{
"API Key": []
}
]
}
}
},
"components": {
"schemas": {
"CustomerServiceRequest": {
"title": "Customer Service Request",
"description": "Customer Service Request",
"properties": {
"type": {
"description": "Customer Service Status",
"type": "string",
"example": "statusupdates"
},
"key": {
"description": "Customer ApiKey",
"type": "string",
"example": "rNdIZsI8"
},
"accountNumber": {
"description": "Customer Account Number",
"type": "string",
"example": "9D257A"
},
"statusType": {
"description": "Status Type",
"type": "string",
"example": "PRINT"
}
},
"type": "object",
"xml": {
"name": "customerservice"
}
}
},
"parameters": {
"reference": {
"name": "reference",
"in": "path",
"description": "UUID or reference of object",
"required": true,
"schema": {
"type": "string"
},
"examples": [
{
"summary": "Example of single reference",
"value": "REF1"
},
{
"summary": "Example of multiple references",
"value": "REF1,REF2"
},
{
"summary": "Example of single UUID",
"value": "2d5540a2-284a-4665-9f55-8d14f5b6cf87"
},
{
"summary": "Example of multiple UUIDs",
"value": "2d5540a2-284a-4665-9f55-8d14f5b6cf87,878f0724-479d-4169-9b6d-47abfb113d16"
}
]
},
"format": {
"name": "format",
"in": "query",
"description": "Format of response (XML/JSON)",
"required": false,
"schema": {
"type": "string",
"enum": [
"xml",
"json"
]
}
}
},
"examples": {
"all_consignments_request": {
"summary": "All Customer Consignments",
"value": {
"type": "statusupdates",
"key": "rNdIZsI8",
"accountNumber": "9D257A"
}
},
"all_consignments_type_request": {
"summary": "All Customer Consignment Of A Specific Type",
"value": {
"type": "statusupdates",
"key": "rNdIZsI8",
"accountNumber": "9D257A",
"statusType": "PRINT"
}
},
"single_consignment_request": {
"summary": "Specific Consignment",
"value": {
"type": "statusupdates",
"key": "rNdIZsI8",
"accountNumber": "9D257A",
"consignment": "ZDBXVY017805"
}
},
"single_consignment_type_request": {
"summary": "Specific Consignment AND Type",
"value": {
"type": "statusupdates",
"key": "rNdIZsI8",
"accountNumber": "9D257A",
"statusType": "PRINT",
"consignment": "ZDBXVY017805"
}
},
"all_consignments_since_request": {
"summary": "All Updates From Since ID",
"value": {
"type": "statusupdates",
"key": "rNdIZsI8",
"accountNumber": "9D257A",
"statusType": "PRINT",
"startId": 1214557425
}
}
},
"securitySchemes": {
"API Key": {
"type": "apiKey",
"name": "key",
"in": "query"
}
}
},
"tags": [
{
"name": "Basic",
"description": "Method to test basic API functionality"
}
]
}