openapi: 3.0.1 info: title: StoreMessagingApi description: An API that allows services at the store to receive messages from external sources. version: '1.0' servers: - url: https://esl.caseys.io/storemessagingapi paths: /print/tickets: post: summary: This is specific to Order Fulfillment. Please use the v1/stores/{storeNumber}/messages endpoint instead. description: Sends a specific print ticket request for a store number to azure service bus to forward to store agent. operationId: StorePrintingEndpoint parameters: - name: x-correlation-id in: header description: An identifier that will be used to aggregate all logs across all systems the request passes through. required: true schema: type: string requestBody: description: Data containing print ticket request. content: application/json: schema: $ref: '#/components/schemas/printTicketsInput' example: storeNumber: 0 messageType: string eventTime: string requestedBy: string data: - string timeToLive: 300 responses: '202': description: The status of the print ticket request. 202 if successful '400': description: The details of the invalid values included in the request payload. content: application/json: schema: $ref: '#/components/schemas/validationProblemDetails' example: errors: {} type: string title: string status: 0 detail: string instance: string extensions: {} /heartbeat: get: tags: - heartbeat summary: Gets the health of the API. description: Interrogates the state of the API and its dependencies to return the API health. operationId: getHeartbeat responses: '200': description: The status of the APIs health. Healthy if all dependency health checks pass. Unhealthy if any dependency's health check fails, or if an exception occurs. content: application/json: schema: $ref: '#/components/schemas/heartbeatReport' example: status: string '500': description: An error occurred while processing the request. content: application/json: schema: $ref: '#/components/schemas/heartbeatReport' example: status: string /register: post: summary: Registers a new store agent. description: Creates backend resources required for the store agent to function. operationId: RegistrationEndpoint parameters: - name: x-correlation-id in: header description: An identifier that will be used to aggregate all logs across all systems the request passes through. required: true schema: type: string requestBody: description: Data required to register the store agent. content: application/json: schema: $ref: '#/components/schemas/registrationInput' example: storeNumber: 0 service: string responses: '200': description: Payload of RegistrationOutput content: application/json: schema: $ref: '#/components/schemas/registrationOutput' example: storeNumber: 0 storeAgentClientId: string storeAgentClientSecret: string clientName: string /v1/stores/{storeNumber}/messages: post: summary: Sends messages to a store. description: Sends messages for a store number to azure service bus to forward to a store agent. operationId: StoreMessagingEndpointV1 parameters: - name: storeNumber in: path description: Format - int32. The unique identifier of the store to get data about. required: true schema: type: integer - name: x-correlation-id in: header description: An identifier that will be used to aggregate all logs across all systems the request passes through. required: true schema: type: string requestBody: description: Data containing print ticket request. content: application/json: schema: $ref: '#/components/schemas/storeMessageInput' example: messageType: string eventTime: string requestedBy: string data: - string timeToLive: 300 responses: '202': description: The status of the message request. 202 if successful '400': description: The details of the invalid values included in the request payload. content: application/json: schema: $ref: '#/components/schemas/validationProblemDetails' example: errors: {} type: string title: string status: 0 detail: string instance: string extensions: {} /v1/register: post: summary: New enhancements have been made to the registration process. Use the v2/stores/{storeNumber}/register endpoint instead. description: Creates backend resources required for the store agent to function. operationId: RegistrationEndpointV1 parameters: - name: x-correlation-id in: header description: An identifier that will be used to aggregate all logs across all systems the request passes through. required: true schema: type: string requestBody: description: Data required to register the store agent. content: application/json: schema: $ref: '#/components/schemas/registrationInput' example: storeNumber: 0 service: string responses: '200': description: Payload of RegistrationOutput content: application/json: schema: $ref: '#/components/schemas/registrationOutput' example: storeNumber: 0 storeAgentClientId: string storeAgentClientSecret: string clientName: string /v2/stores/{storeNumber}/register: post: summary: Registers a new store agent. description: Creates backend resources required for the store agent to function. operationId: RegistrationEndpointV2 parameters: - name: storeNumber in: path description: Format - int32. The unique identifier of the store to get data about. required: true schema: type: integer - name: x-correlation-id in: header description: An identifier that will be used to aggregate all logs across all systems the request passes through. required: true schema: type: string requestBody: description: Data required to register the store agent. content: application/json: schema: $ref: '#/components/schemas/registrationInputV2' example: storeNumber: 0 service: string messagesToHandle: - string owningTeamEmail: string responses: '200': description: Payload of RegistrationOutput content: application/json: schema: $ref: '#/components/schemas/registrationOutput' example: storeNumber: 0 storeAgentClientId: string storeAgentClientSecret: string clientName: string /v2/registrations: get: summary: Get Registered Services description: Get Registered Services operationId: RegisteredServicesEndpoint responses: '200': description: Payload of ApiCollection containing RegisteredServiceModel content: application/json: schema: $ref: '#/components/schemas/apiCollection_registeredServiceModel' example: data: - storeNumber: 0 services: - service: string messagesToHandle: - string owningTeamEmail: string lastRegistrationTimestamp: string /openapi/V3.json: get: summary: Get OpenApi Specification description: Gets the OpenApi specification in V3.json format with the parameters . operationId: getOpenApiSpec responses: '200': description: '' components: schemas: apiCollection_registeredServiceModel: type: object properties: data: type: array items: $ref: '#/components/schemas/registeredServiceModel' description: The data collection. heartbeatReport: type: object properties: status: type: string description: Description of the current status of dependencies of the API. list_string: type: array items: type: string printTicketsInput: type: object properties: storeNumber: type: integer description: The Id of the store to send the message to. format: int32 messageType: type: string description: The type of message being sent to the store. This value is blindly passed-through by the API. It is up to the producer and consumer of the message to agree on this value. eventTime: type: string description: The time the event was created or sent to the API. Defaults to the current time UTC. requestedBy: type: string data: type: array items: type: string description: A list of messages payloads to send to the store. This value is sent as a single message to the store. It is up to the consumer to know how to deserialize and handle the list of messages. timeToLive: type: integer description: The amount of time, in seconds, before the request is expired and not sent to the store. This value defaults to 300 seconds, which is the maximum time allowed. format: int32 default: 300 registeredServiceModel: type: object properties: storeNumber: type: integer format: int32 services: type: array items: $ref: '#/components/schemas/serviceModel' registrationInput: type: object properties: storeNumber: type: integer format: int32 service: type: string description: 'The store agent service to register. Ex: print-service' registrationInputV2: type: object properties: storeNumber: type: integer format: int32 service: type: string description: 'The store agent service to register. Ex: print-service' messagesToHandle: type: array items: type: string description: A collection of message types to handle for the service owningTeamEmail: type: string description: Email address of the team who owns the service registrationOutput: type: object properties: storeNumber: type: integer format: int32 storeAgentClientId: type: string description: The store agent client id to use for authentication storeAgentClientSecret: type: string description: The store agent client secret to use for authentication clientName: type: string description: The display name of the app registration in Azure AD. serviceModel: type: object properties: service: type: string messagesToHandle: type: array items: type: string owningTeamEmail: type: string lastRegistrationTimestamp: type: string format: date-time nullable: true storeMessageInput: type: object properties: messageType: type: string description: The type of message being sent to the store. This value is blindly passed-through by the API. It is up to the producer and consumer of the message to agree on this value. eventTime: type: string description: The time the event was created or sent to the API. Defaults to the current time UTC. requestedBy: type: string data: type: array items: type: string description: A list of messages payloads to send to the store. This value is sent as a single message to the store. It is up to the consumer to know how to deserialize and handle the list of messages. timeToLive: type: integer description: The amount of time, in seconds, before the request is expired and not sent to the store. This value defaults to 300 seconds, which is the maximum time allowed. format: int32 default: 300 validationProblemDetails: type: object properties: errors: type: object additionalProperties: $ref: '#/components/schemas/list_string' type: type: string title: type: string status: type: integer format: int32 nullable: true detail: type: string instance: type: string extensions: type: object additionalProperties: type: object securitySchemes: apiKeyHeader: type: apiKey name: Ocp-Apim-Subscription-Key in: header apiKeyQuery: type: apiKey name: subscription-key in: query security: - apiKeyHeader: [] - apiKeyQuery: []