openapi: 3.2.0 info: title: Caseys General Stores Push API version: '1.0' description: 'Operations tagged push across 2 of this provider''s published API definitions: caseys-general-stores-cas-api-openapi.json, caseys-general-stores-cas-gateway-api-openapi.json. Each path carries the servers of the definition it was published in.' servers: - url: https://esl.caseys.io/casapi - url: https://esl.caseys.io/casgatewayapi security: - apiKeyHeader: [] - apiKeyQuery: [] tags: - name: Push paths: /report: post: tags: - Push summary: POST /report description: 'Add events to a journal or add reports to a collection. These functions will allow sending report information in the request body of the message. Post a movement document. The requestBody "header" fields will contain the information necessary to identify the correct activity period. ## **Notes:** * Activity periods assigned to POS jounal entries (using /activityPeriods) should mirror those in the movement report request body. * May accept an "ACCEPT" header of application/xml in order to post XML files. * The "/report" path represents resources referred to as "Movement" in POS Backoffice Interface XML Specification V3.7.' operationId: post-reports parameters: - name: x-correlation-id in: header description: correlation identifier required: true schema: type: string - name: openretailing-organization-id in: header description: organization identifier required: true schema: type: string - name: openretailing-store-location-id in: header description: location identifier required: true schema: type: string requestBody: description: post reports content: application/json: schema: $ref: '#/components/schemas/posMovement' example: version: string release: string transmissionHeader: storeLocationId: string vendorName: string vendorModelVersion: string organizationId: string posMovementReport: posMovementReportHeader: reportSequenceNumber: 0 primaryReportPeriod: interval: 0 value: string secondaryReportPeriod: interval: 0 value: string beginDateTime: string endDateTime: string reportRange: value: 0 businessDate: string posMovementReportGroup: - {} responses: '200': description: "Requests with valid payloads (parsable and containing all of the\n mandatory fields) must use the 200 response. Note that a request can be\n successfully processed but still produce a failure response. If all the\n systems are operating correctly at a given time, all replies will use a\n response 200." content: application/json: schema: $ref: '#/components/schemas/statusReturn' example: timestamp: string result: 0 message: string '400': description: "Requests with invalid payloads or invalid URLs (paths) must use the\n response 400." content: application/json: schema: $ref: '#/components/schemas/statusReturn' example: timestamp: string result: 0 message: string '403': description: Unauthorized requests must use response 403 (forbidden). content: application/json: schema: $ref: '#/components/schemas/statusReturn' example: timestamp: string result: 0 message: string servers: - url: https://esl.caseys.io/casapi /journal: post: tags: - Push summary: POST /journal description: 'Add events to a journal or add reports to a collection. These functions will allow sending report information in the request body of the message, or may (for some resources) allow retrieving a web socket URL for cases where the report information is too large for a message request body. ## **Notes ** * The individual journal events will be processed without regard to requestBody "header" properties - these properties are there for legacy support. The individual journal events, plus the organizationID and storeLocationID headers, provide all the information necessary to classify and store the journal events. * Activity periods assigned to POS jounal entries (using /activityPeriods) should mirror those in the movement report request body. * Some implementations may accept an "ACCEPT" header of application/xml in order to post older XML POSJournal files. Support for this feature is implementation dependent. The default is Accept: application/json' operationId: post-journal parameters: - name: x-correlation-id in: header description: correlation identifier required: true schema: type: string - name: openretailing-organization-id in: header description: organization identifier required: true schema: type: string - name: openretailing-store-location-id in: header description: location identifier required: true schema: type: string responses: '200': description: "Requests with valid payloads (parsable and containing all of the\n mandatory fields) must use the 200 response. Note that a request can be\n successfully processed but still produce a failure response. If all the\n systems are operating correctly at a given time, all replies will use a\n response 200." content: application/json: schema: $ref: '#/components/schemas/statusReturn' example: timestamp: string result: 0 message: string '400': description: "Requests with invalid payloads or invalid URLs (paths) must use the\n response 400." content: application/json: schema: $ref: '#/components/schemas/statusReturn' example: timestamp: string result: 0 message: string '413': description: Use response 413 when payload is too large to return content: application/json: schema: $ref: '#/components/schemas/statusReturn' example: timestamp: string result: 0 message: string '500': description: "Requests that cause an internal server error (outside of the service\n itself), such as out of memory or corrupted file, etc. must use the\n response 500." content: application/json: schema: $ref: '#/components/schemas/statusReturn' example: timestamp: string result: 0 message: string servers: - url: https://esl.caseys.io/casapi /journal/reconciliation: post: tags: - Push summary: POST /journal/reconciliation description: Post a collection of journal events for use in journal event reconciliation. operationId: post-journalreconciliation parameters: - name: x-correlation-id in: header description: correlation identifier required: true schema: type: string - name: openretailing-organization-id in: header description: organization identifier required: true schema: type: string - name: openretailing-store-location-id in: header description: location identifier required: true schema: type: string responses: '200': description: "Requests with valid payloads (parsable and containing all of the\n mandatory fields) must use the 200 response. Note that a request can be\n successfully processed but still produce a failure response. If all the\n systems are operating correctly at a given time, all replies will use a\n response 200." content: application/json: schema: $ref: '#/components/schemas/statusReturn_2' example: timestamp: string result: 0 error: 0 message: string '400': description: "Requests with invalid payloads or invalid URLs (paths) must use the\n response 400." content: application/json: schema: $ref: '#/components/schemas/statusReturn_2' example: timestamp: string result: 0 error: 0 message: string '413': description: Use response 413 when payload is too large to return content: application/json: schema: $ref: '#/components/schemas/statusReturn_2' example: timestamp: string result: 0 error: 0 message: string '500': description: "Requests that cause an internal server error (outside of the service\n itself), such as out of memory or corrupted file, etc. must use the\n response 500." content: application/json: schema: $ref: '#/components/schemas/statusReturn_2' example: timestamp: string result: 0 error: 0 message: string servers: - url: https://esl.caseys.io/casgatewayapi components: schemas: statusReturn: type: object properties: timestamp: type: string format: date-time result: enum: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 type: integer format: int32 default: 0 message: type: string posMovementReportHeader: required: - reportSequenceNumber - primaryReportPeriod - beginDateTime - endDateTime type: object properties: reportSequenceNumber: maximum: 99999999 minimum: 0 type: integer format: int32 primaryReportPeriod: $ref: '#/components/schemas/movementReportPeriod' secondaryReportPeriod: $ref: '#/components/schemas/movementReportPeriod' beginDateTime: minLength: 1 type: string format: date-time endDateTime: minLength: 1 type: string format: date-time reportRange: $ref: '#/components/schemas/reportRange' businessDate: type: - string - 'null' format: date-time reportRange: type: object properties: value: enum: - 0 - 1 - 2 - -1 type: integer format: int32 default: 0 transmissionHeader: required: - storeLocationId - vendorName - vendorModelVersion - organizationId type: object properties: storeLocationId: minLength: 1 type: string vendorName: minLength: 1 type: string vendorModelVersion: minLength: 1 type: string organizationId: minLength: 1 type: string posMovementReport: required: - posMovementReportHeader - posMovementReportGroup type: object properties: posMovementReportHeader: $ref: '#/components/schemas/posMovementReportHeader' posMovementReportGroup: type: array items: $ref: '#/components/schemas/movementReport' movementReportPeriod: type: object properties: interval: enum: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 type: - integer - 'null' format: int32 default: 0 value: type: string posMovement: required: - transmissionHeader - posMovementReport type: object properties: version: type: string release: type: string transmissionHeader: $ref: '#/components/schemas/transmissionHeader' posMovementReport: $ref: '#/components/schemas/posMovementReport' movementReport: type: object statusReturn_2: type: object properties: timestamp: type: string format: date-time result: enum: - 0 - 1 - 2 type: integer format: int32 default: 0 error: enum: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 type: integer format: int32 default: 0 message: type: string securitySchemes: apiKeyHeader: type: apiKey name: Ocp-Apim-Subscription-Key in: header apiKeyQuery: type: apiKey name: subscription-key in: query x-refined-from: - caseys-general-stores-cas-api-openapi.json - caseys-general-stores-cas-gateway-api-openapi.json