{"openapi":"3.1.0","info":{"title":"AbaNinja Warehouse API","version":"3.0.0","x-domain-id":"warehouse"},"servers":[{"url":"https://api.abaninja.ch","description":"The AbaNinja API server"}],"tags":[{"name":"exports","description":"Manage exports","x-displayName":"Exports"},{"name":"warehouse","description":"Manage warehouse","x-displayName":"Warehouse"},{"name":"warehouse-exports","description":"Get exports from warehouse","x-displayName":"Warehouse Exports"},{"name":"warehouse-products","description":"Manage warehouse products","x-displayName":"Warehouse Products"},{"name":"warehouse-transactions","description":"Manage warehouse transactions","x-displayName":"Warehouse Transactions"},{"name":"warehouse-transaction-types","description":"Get warehouse transaction types","x-displayName":"Warehouse Transaction Types"}],"security":[{"ApiToken":[]}],"paths":{"/accounts/{accountUuid}/warehouse/v2/warehouse-transactions":{"get":{"tags":["warehouse-transactions"],"summary":"Get transactions","description":"Get transactions of the warehouse products","operationId":"warehouse_list_warehouse_transactions","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","schema":{"type":["integer","null"],"default":1,"minimum":1}},{"name":"perPage","in":"query","schema":{"type":["integer","null"],"minimum":1}},{"name":"limit","in":"query","description":"use perPage instead","required":false,"deprecated":true,"schema":{"type":["integer","null"],"minimum":1}},{"name":"productUuids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"minimum":0}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"array","items":{"title":"Warehouse Transaction Resource","properties":{"uuid":{"type":"string","format":"uuid"},"productUuid":{"type":"string","format":"uuid"},"userUuid":{"type":"string","format":"uuid"},"userFullName":{"type":"string"},"type":{"type":"string","enum":["INCOMING","OUTGOING","STOCKTAKING"]},"typeLabel":{"type":"string"},"subtype":{"type":"string","enum":["CORRECTION","DEFAULT","DEFECT","DELIVERY_NOTE","INITIAL_STOCKTAKING","RETURN","STOCK","STOCKTAKING"]},"subtypeLabel":{"type":"string"},"dateTime":{"type":"string","format":"date-time"},"unitUuid":{"type":"string","format":"uuid"},"unitLabel":{"type":["string","null"]},"amount":{"type":"number","format":"float"},"singleItemPrice":{"type":["number","null"],"format":"float"},"currency":{"type":["string","null"]},"invoiceType":{"type":["string","null"],"enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"invoiceUuid":{"type":["string","null"],"format":"uuid"},"invoiceNumber":{"type":["string","null"]},"comment":{"type":["string","null"]}},"type":"object"}},"status":{"example":200},"meta":{"properties":{"pagination":{"properties":{"currentPage":{"type":"integer","minimum":1},"firstPageUrl":{"type":["string","null"],"format":"uri"},"from":{"type":["integer","null"],"example":1},"lastPage":{"type":"integer"},"lastPageUrl":{"type":"string","format":"uri"},"nextPageUrl":{"type":["string","null"],"format":"uri"},"perPage":{"type":"integer","example":50},"previousPageUrl":{"type":["string","null"],"format":"uri"},"to":{"type":["integer","null"],"example":50},"totalItems":{"type":"integer"}},"type":"object"}},"type":"object"}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/warehouse"]}],"x-legacy-operation-id":"cfad5c161544a0ae7e7fa7e781d256fb","x-required-scopes":["warehouse"]},"post":{"tags":["warehouse-transactions"],"summary":"Create transaction","description":"Create transaction for a warehouse product","operationId":"warehouse_create_warehouse_transactions","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Create transaction","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/warehouse-transaction.schema.json","description":"A schema for creating transactions in the warehouse in AbaNinja over the API","type":"object","properties":{"productUuid":{"type":"string","format":"uuid"},"type":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/warehouse-transaction-type.schema.json","description":"A Schema for the possible values of warehouse transaction types","type":"string","enum":["INCOMING","OUTGOING","STOCKTAKING"]},"subtype":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/warehouse-transaction-subtype.schema.json","description":"A Schema for the possible values of warehouse transaction subtypes","type":"string","enum":["CORRECTION","DEFAULT","DEFECT","DELIVERY_NOTE","INITIAL_STOCKTAKING","RETURN","STOCK","STOCKTAKING"]},"dateTime":{"type":"string","format":"date-time"},"amount":{"type":"number","exclusiveMinimum":0},"singleItemPrice":{"type":["number","null"],"minimum":0},"comment":{"type":["string","null"],"maxLength":1000}},"required":["productUuid","type","subtype","dateTime","amount"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Warehouse Transaction Resource","properties":{"uuid":{"type":"string","format":"uuid"},"productUuid":{"type":"string","format":"uuid"},"userUuid":{"type":"string","format":"uuid"},"userFullName":{"type":"string"},"type":{"type":"string","enum":["INCOMING","OUTGOING","STOCKTAKING"]},"typeLabel":{"type":"string"},"subtype":{"type":"string","enum":["CORRECTION","DEFAULT","DEFECT","DELIVERY_NOTE","INITIAL_STOCKTAKING","RETURN","STOCK","STOCKTAKING"]},"subtypeLabel":{"type":"string"},"dateTime":{"type":"string","format":"date-time"},"unitUuid":{"type":"string","format":"uuid"},"unitLabel":{"type":["string","null"]},"amount":{"type":"number","format":"float"},"singleItemPrice":{"type":["number","null"],"format":"float"},"currency":{"type":["string","null"]},"invoiceType":{"type":["string","null"],"enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"invoiceUuid":{"type":["string","null"],"format":"uuid"},"invoiceNumber":{"type":["string","null"]},"comment":{"type":["string","null"]}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/warehouse"]}],"x-legacy-operation-id":"4d4a0f260674312f49ed2bea131d41ac","x-required-scopes":["warehouse"]}},"/accounts/{accountUuid}/warehouse/v2/warehouse-products/{productUuid}":{"get":{"tags":["warehouse-products"],"summary":"Get warehouse product","description":"Get the warehouse product","operationId":"warehouse_get_warehouse_products","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"productUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Warehouse Product Resource","properties":{"active":{"type":"boolean"},"calculationStartDate":{"type":["string","null"],"format":"date"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/warehouse"]}],"x-legacy-operation-id":"567e7db3be3cd87cc4fdc98da7ce2565","x-required-scopes":["warehouse"]},"patch":{"tags":["warehouse-products"],"summary":"Update warehouse product","description":"Update the warehouse product","operationId":"warehouse_update_warehouse_products","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"productUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Update warehouse product","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/warehouse-product.schema.json","description":"A schema for modifying warehouse products in the warehouse in AbaNinja over the API","type":"object","properties":{"calculationStartDate":{"type":["string","null"],"format":"date"}},"required":["calculationStartDate"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Warehouse Product Resource","properties":{"active":{"type":"boolean"},"calculationStartDate":{"type":["string","null"],"format":"date"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/warehouse"]}],"x-legacy-operation-id":"eb906e75c554d2c6c4b537d720f28425","x-required-scopes":["warehouse"]}},"/accounts/{accountUuid}/warehouse/v2/warehouse-transaction-types/available-subtypes":{"get":{"tags":["warehouse-transaction-types"],"summary":"Get available subtypes","description":"Get available transaction subtypes","operationId":"warehouse_list_available_subtypes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"type","in":"query","schema":{"type":"string","enum":["INCOMING","OUTGOING","STOCKTAKING"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"array","items":{"title":"Warehouse Transaction Available Subtype Resource","properties":{"key":{"type":"string","enum":["CORRECTION","DEFAULT","DEFECT","DELIVERY_NOTE","INITIAL_STOCKTAKING","RETURN","STOCK","STOCKTAKING"]},"label":{"type":"string"}},"type":"object"}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/warehouse"]}],"x-legacy-operation-id":"39a651ac796d94fdbc35fe207c77f04f","x-required-scopes":["warehouse"]}},"/accounts/{accountUuid}/warehouse/v2/warehouse-transaction-types/available-types":{"get":{"tags":["warehouse-transaction-types"],"summary":"Get available types","description":"Get available transaction types","operationId":"warehouse_list_available_types","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"array","items":{"title":"Warehouse Transaction Available Type Resource","properties":{"key":{"type":"string","enum":["INCOMING","OUTGOING","STOCKTAKING"]},"label":{"type":"string"}},"type":"object"}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/warehouse"]}],"x-legacy-operation-id":"4e1079472d38cf57df8da18b768d1076","x-required-scopes":["warehouse"]}},"/accounts/{accountUuid}/warehouse/v2/warehouse-transactions/{warehouseTransactionUuid}":{"get":{"tags":["warehouse-transactions"],"summary":"Get transaction","description":"Get transaction of the warehouse product","operationId":"warehouse_get_warehouse_transactions","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"warehouseTransactionUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Warehouse Transaction Resource","properties":{"uuid":{"type":"string","format":"uuid"},"productUuid":{"type":"string","format":"uuid"},"userUuid":{"type":"string","format":"uuid"},"userFullName":{"type":"string"},"type":{"type":"string","enum":["INCOMING","OUTGOING","STOCKTAKING"]},"typeLabel":{"type":"string"},"subtype":{"type":"string","enum":["CORRECTION","DEFAULT","DEFECT","DELIVERY_NOTE","INITIAL_STOCKTAKING","RETURN","STOCK","STOCKTAKING"]},"subtypeLabel":{"type":"string"},"dateTime":{"type":"string","format":"date-time"},"unitUuid":{"type":"string","format":"uuid"},"unitLabel":{"type":["string","null"]},"amount":{"type":"number","format":"float"},"singleItemPrice":{"type":["number","null"],"format":"float"},"currency":{"type":["string","null"]},"invoiceType":{"type":["string","null"],"enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"invoiceUuid":{"type":["string","null"],"format":"uuid"},"invoiceNumber":{"type":["string","null"]},"comment":{"type":["string","null"]}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/warehouse"]}],"x-legacy-operation-id":"4d2c158dfe88ef3bd5adc9ceae015868","x-required-scopes":["warehouse"]}},"/accounts/{accountUuid}/warehouse/v2/warehouse/status":{"get":{"tags":["warehouse"],"summary":"Get status of warehouse","description":"Get the current status of the warehouse","operationId":"warehouse_list_status","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Warehouse Status Resource","properties":{"active":{"type":"boolean"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/warehouse"]}],"x-legacy-operation-id":"f5f42841168cbf7629668aa2b382a2a1","x-required-scopes":["warehouse"]}},"/accounts/{accountUuid}/warehouse/v2/exports/warehouse/all-stocks":{"post":{"tags":["warehouse-exports","exports"],"summary":"Export warehouse stocks","description":"Create an export of warehouse stocks","operationId":"warehouse_create_all_stocks","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Create export","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/export.create.schema.json","description":"A Schema for creating exports in AbaNinja over the API","type":"object","properties":{"format":{"enum":["XLSX"]}},"required":["format"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Export Download Resource","properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["WAREHOUSE_STOCKS_ALL","WAREHOUSE_PRODUCT_RESERVATIONS"]},"status":{"type":"string","enum":["QUEUED","RUNNING","FINISHED","FAILED"]},"name":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"startedAt":{"type":["string","null"],"format":"date-time"},"finishedAt":{"type":["string","null"],"format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"isExpired":{"type":"boolean"},"downloadUrl":{"type":["string","null"],"format":"uri"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/warehouse"]}],"x-legacy-operation-id":"d403c468d838a4d8eaf50780584412b5","x-required-scopes":["warehouse"]}},"/accounts/{accountUuid}/warehouse/v2/warehouse-products/{productUuid}/activate":{"post":{"tags":["warehouse-products"],"summary":"Activate warehouse product","description":"Activate a product for the warehouse","operationId":"warehouse_create_activate","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"productUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Activate warehouse product","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/warehouse-product-activation.schema.json","description":"A schema for activating products in the warehouse in AbaNinja over the API","type":"object","properties":{"dateTime":{"type":"string","format":"date-time"},"initialAmount":{"type":"number","minimum":0}},"required":["dateTime","initialAmount"]}}}},"responses":{"200":{"description":"Warehouse product successfully activated","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/warehouse"]}],"x-legacy-operation-id":"4576cd153c82e1882c32bce4ec713018","x-required-scopes":["warehouse"]}},"/accounts/{accountUuid}/warehouse/v2/warehouse-products/{productUuid}/current-stock":{"get":{"tags":["warehouse-products"],"summary":"Get stock of warehouse product","description":"Get the current stock of the warehouse product","operationId":"warehouse_list_current_stock","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"productUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Warehouse Product Stock Resource","properties":{"stock":{"type":"number","format":"float"},"reservations":{"type":"number","format":"float"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/warehouse"]}],"x-legacy-operation-id":"e0e8f3cc14edc4d14f248fa838b23e7a","x-required-scopes":["warehouse"]}},"/accounts/{accountUuid}/warehouse/v2/warehouse-products/{productUuid}/deactivate":{"post":{"tags":["warehouse-products"],"summary":"Deactivate warehouse product","description":"Deactivate a product for the warehouse","operationId":"warehouse_create_deactivate","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"productUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Warehouse product successfully deactivated","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/warehouse"]}],"x-legacy-operation-id":"5b72436a72d556e50b2fdfb85821419c","x-required-scopes":["warehouse"]}},"/accounts/{accountUuid}/warehouse/v2/warehouse-products/{productUuid}/status":{"get":{"tags":["warehouse-products"],"summary":"Get status of warehouse product","description":"Get the current status of the warehouse product","operationId":"warehouse_list_status_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"productUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Warehouse Product Status Resource","properties":{"active":{"type":"boolean"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/warehouse"]}],"x-legacy-operation-id":"a836e55614126e54881122e326b86282","x-required-scopes":["warehouse"]}},"/accounts/{accountUuid}/warehouse/v2/exports/warehouse-products/{productUuid}/reservations":{"post":{"tags":["warehouse-exports","exports"],"summary":"Export warehouse product reservations","description":"Create an export of warehouse product reservations","operationId":"warehouse_create_reservations","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"productUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Create export","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/export.create.schema.json","description":"A Schema for creating exports in AbaNinja over the API","type":"object","properties":{"format":{"enum":["XLSX"]}},"required":["format"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Export Download Resource","properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["WAREHOUSE_STOCKS_ALL","WAREHOUSE_PRODUCT_RESERVATIONS"]},"status":{"type":"string","enum":["QUEUED","RUNNING","FINISHED","FAILED"]},"name":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"startedAt":{"type":["string","null"],"format":"date-time"},"finishedAt":{"type":["string","null"],"format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"isExpired":{"type":"boolean"},"downloadUrl":{"type":["string","null"],"format":"uri"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/warehouse"]}],"x-legacy-operation-id":"b3fa0e9b9caabfa2060b6e473deb6e43","x-required-scopes":["warehouse"]}}},"components":{"securitySchemes":{"ApiToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Create tokens in Settings > API Token."}}}}