openapi: 3.0.1 info: title: Huuray Balance Stock API description: Huuray API for B2B customers (last updated april 2025) contact: name: Support email: tech@huuray.com version: v4 tags: - name: Stock paths: /v4/Stock: post: tags: - Stock summary: Used to check the current stock of a product description: n/a parameters: - name: X-API-NONCE in: header description: A random value that can only be used once every 60 days. (max 50 characters)
(this prevents your message from being re-transmitted, and thereby also replay attacks) required: true - name: X-API-HASH in: header description: 'The SHA512 hash of a concatenated string containing the following: ( API-SECRET + NONCE ).
(this is used to authenticate you)' required: true requestBody: content: application/json: schema: $ref: '#/components/schemas/StockRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/StockResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Response' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Response' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Response' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Response' '422': description: Unprocessable Content content: application/json: schema: $ref: '#/components/schemas/Response' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Response' security: - ApiToken: [] components: schemas: Response: type: object properties: Status: type: integer description: HttpStatus code for the response format: int32 Message: type: string description: Deprecated, use StatusMessage instead. Error message describing an error that occurred during the processing of the request nullable: true deprecated: true StatusMessage: type: string description: Status message describing an error that occurred during the processing of the request nullable: true additionalProperties: false description: The minimal possible response for any request StockResponse: title: Stock Response type: object properties: Stock: type: integer description: The full count of giftcards found format: int32 nullable: true Status: type: integer description: HttpStatus code for the response format: int32 Message: type: string description: Deprecated, use StatusMessage instead. Error message describing an error that occurred during the processing of the request nullable: true deprecated: true StatusMessage: type: string description: Status message describing an error that occurred during the processing of the request nullable: true additionalProperties: false description: The response containing stock information for a product StockRequest: title: Stock Request required: - ProductToken type: object properties: ProductToken: type: string description: The unique token for the product you want to get stock information for Value: type: integer description: The value to check availability for. Defaults to the default price for the product if value is null format: int32 nullable: true additionalProperties: false description: An object containing the required input for the stock API securitySchemes: ApiToken: type: apiKey description: The API-Token provided to you by Huuray. name: X-API-TOKEN in: header