{"openapi":"3.1.0","info":{"title":"apicbase","version":"2"},"servers":[{"url":"https://api.apicbase.com/api/v2/"}],"security":[{"sec0":[]}],"paths":{"/accounts/users/":{"get":{"summary":"Get Users","description":"Gets a list of all users with access to the library, and their permissions.","operationId":"get-users","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set. Starts at 1","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"count":2,"next":null,"previous":null,"results":[{"url":"https://app.apicbase.com/api/v2/accounts/users/336310664030008/","id":"336310664030008","username":"john.doe@gmail.com","first_name":"John","last_name":"Doe","created_date":"2023-09-07T14:27:06Z","permissions":null,"outlet_user":false},{"url":"https://app.apicbase.com/api/v2/accounts/users/336900440610001/","id":"336900440610001","username":"darth.vader@apicbase.com","first_name":"Darth","last_name":"Vader","created_date":"2022-10-21T13:18:02Z","permissions":{"library_user_permission_set":{"apic_admin":true,"global_delete":true,"global_fcc":true},"inventory_count_event_permission_set":{"write":true,"edit":true,"open":true,"edit_finalized_event":true,"delete":true},"inventory_waste_management_event_permission_set":{"write":true,"edit_finalized_event":true,"delete":true},"stock_item_inventory_permission_set":{"write":true,"delete":true},"inventory_preparation_event_permission_set":{"write":true,"edit_finalized_event":true,"delete":true},"inventory_move_event_permission_set":{"write":true,"edit_finalized_event":true,"delete":true},"sales_permission_set":{"sales_analytics":true,"manual_sales":true,"pos_connection":true,"edit_finalized_event":true,"delete":true},"library_menu_permission_set":{"edit":true},"library_ingredient_permission_set":{"edit":true,"allergen_verification":true},"library_recipe_permission_set":{"edit":true},"production_plan_permission_set":{"write":true,"do_production_plan":true},"task_permission_set":{"write":true,"do_task":true},"traceability_permission_set":{"edit_log_items":true},"purchase_order_permission_set":{"create":true,"send":true,"draft_receive":true,"receive":true,"update_price":true,"manage_list":true,"edit_closed_orders":false},"internal_order_permission_set":{"pick":true,"ship":true,"edit_closed_orders":false},"media_permission_set":{"write":true,"image_upload":true}},"outlet_user":false}]}}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":2,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/336310664030008/"},"id":{"type":"string","example":"336310664030008"},"username":{"type":"string","example":"john.doe@gmail.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"created_date":{"type":"string","example":"2023-09-07T14:27:06Z"},"permissions":{},"outlet_user":{"type":"boolean","example":false,"default":true}}}}}}}}}},"deprecated":false}},"/accounts/users/{user_id}/":{"get":{"summary":"Get User Details","description":"Gets information about a specific user in the library.","operationId":"get-user-details","parameters":[{"name":"user_id","in":"path","description":"A user's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n    \"url\": \"https://app.apicbase.com/api/v2/accounts/users/336900440610001/\",\n    \"id\": \"336900440610001\",\n    \"username\": \"darth.vader@apicbase.com\",\n    \"first_name\": \"Darth\",\n    \"last_name\": \"Vader\",\n    \"created_date\": \"2022-10-21T13:18:02Z\",\n    \"active_outlet\": \"536010648730003\",\n\t\t\"is_beta_access_active\": false,\n    \"permissions\": {\n        \"library_user_permission_set\": {\n            \"apic_admin\": true,\n            \"global_delete\": true,\n            \"global_fcc\": true\n        },\n        \"inventory_count_event_permission_set\": {\n            \"write\": true,\n            \"edit\": true,\n            \"open\": true,\n            \"edit_finalized_event\": true,\n            \"delete\": true\n        },\n        \"inventory_waste_management_event_permission_set\": {\n            \"write\": true,\n            \"edit_finalized_event\": true,\n            \"delete\": true\n        },\n        \"inventory_set_min_and_par_permission_set\": {\n            \"write\": true\n        },\n        \"inventory_preparation_event_permission_set\": {\n            \"write\": true,\n            \"edit_finalized_event\": true,\n            \"delete\": true\n        },\n        \"inventory_move_event_permission_set\": {\n            \"write\": true,\n            \"edit_finalized_event\": true,\n            \"delete\": true\n        },\n        \"sales_permission_set\": {\n            \"sales_analytics\": true,\n            \"manual_sales\": true,\n            \"pos_connection\": true,\n            \"edit_finalized_event\": true,\n            \"delete\": true\n        },\n        \"library_menu_permission_set\": {\n            \"edit\": true\n        },\n        \"library_ingredient_permission_set\": {\n            \"edit\": true,\n            \"allergen_verification\": true\n        },\n        \"library_recipe_permission_set\": {\n            \"edit\": true\n        },\n        \"production_plan_permission_set\": {\n            \"write\": true,\n            \"do_production_plan\": true\n        },\n        \"task_permission_set\": {\n            \"write\": true,\n            \"do_task\": true\n        },\n        \"traceability_permission_set\": {\n            \"edit_log_items\": true\n        },\n        \"purchase_order_permission_set\": {\n            \"create\": true,\n            \"send\": true,\n            \"draft_receive\": true,\n            \"receive\": true,\n            \"update_price\": true,\n            \"manage_list\": true,\n            \"edit_closed_orders\": false\n        },\n        \"internal_order_permission_set\": {\n            \"pick\": true,\n            \"ship\": true,\n            \"edit_closed_orders\": false\n        },\n        \"media_permission_set\": {\n            \"write\": true,\n            \"image_upload\": true\n        }\n    },\n    \"outlet_user\": false\n}"}}}}}},"deprecated":false}},"/accounts/outlets/":{"get":{"summary":"Get Outlets","description":"Gets a list of outlets in the library, complete with information about them.","operationId":"get-outlets","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"name","in":"query","description":"An outlet name to query on.","schema":{"type":"string"}},{"in":"query","name":"custom_fields","schema":{"type":"string"},"description":"Filter on custom fields. Check reference guide for details."}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"count":3,"next":null,"previous":null,"results":[{"name":"Brussel","id":"829100725420008","url":"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/","billing_contact":null,"internal_supplier_outlet":{"id":"125040526960005","url":"https://app.apicbase.com/api/v2/suppliers/525220818060002/","first_name":"Peppa","last_name":"Pig","phone":"","email":null,"supplier_email_list":["peppa.pig@apicbase.com"],"street":"","number":null,"postal_code":"","city":"","country":null},"custom_fields":[{"name":"Multi Choice Field","value":["Choice 1","Choice 3"]},{"name":"Free Text Field","value":"I type this freely"}],"timezone":null,"description":null,"procurement_contact":{"first_name":"Luke","last_name":"Skywalker","phone":null,"email":"luke.skywalker@apicbase.com"},"contact":{"company_name":"Baby Shark","first_name":"Baby","last_name":"Shark","avatar":"https://cdn-staging.apicbase.com/apicbase/images/avatar.png","telephone":null,"mobile":null,"email":"baby.shark@apicbase.com"},"external_name":null},{"name":"Gent","id":"729100535470009","url":"https://staging.apicbase.com/api/v2/accounts/outlets/729100535470009/","billing_contact":null,"internal_supplier_outlet":null,"timezone":null,"description":null,"procurement_contact":{"first_name":"","last_name":"","phone":null,"email":null,"supplier_email_list":[]},"contact":{"company_name":"","first_name":"","last_name":"","avatar":"https://cdn-staging.apicbase.com/apicbase/images/avatar.png","telephone":null,"mobile":null,"email":null},"external_name":null},{"name":"Antwerpen","id":"229100415400002","url":"https://staging.apicbase.com/api/v2/accounts/outlets/229100415400002/","billing_contact":null,"internal_supplier_outlet":null,"timezone":null,"description":null,"procurement_contact":{"id":"725220408070004","first_name":"","last_name":"","phone":null,"email":null,"supplier_email_list":[]},"contact":{"company_name":"","first_name":"","last_name":"","avatar":"https://cdn-staging.apicbase.com/apicbase/images/avatar.png","telephone":null,"mobile":null,"email":null},"external_name":null}]}}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":3,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Brussel"},"id":{"type":"string","example":"829100725420008"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"},"billing_contact":{},"internal_supplier_outlet":{"type":"object","properties":{"id":{"type":"string","example":"125040526960005"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/suppliers/525220818060002/"},"first_name":{"type":"string","example":"Peppa"},"last_name":{"type":"string","example":"Pig"},"phone":{"type":"string","example":""},"email":{},"supplier_email_list":{"type":"array","items":{"type":"string","example":"peppa.pig@apicbase.com"}},"street":{"type":"string","example":""},"number":{},"postal_code":{"type":"string","example":""},"city":{"type":"string","example":""},"country":{}}},"timezone":{},"description":{},"procurement_contact":{"type":"object","properties":{"first_name":{"type":"string","example":"Luke"},"last_name":{"type":"string","example":"Skywalker"},"phone":{},"email":{"type":"string","example":"luke.skywalker@apicbase.com"}}},"contact":{"type":"object","properties":{"company_name":{"type":"string","example":"Baby Shark"},"first_name":{"type":"string","example":"Baby"},"last_name":{"type":"string","example":"Shark"},"avatar":{"type":"string","example":"https://cdn-staging.apicbase.com/apicbase/images/avatar.png"},"telephone":{},"mobile":{},"email":{"type":"string","example":"baby.shark@apicbase.com"}}},"external_name":{}}}}}}}}}},"deprecated":false},"post":{"summary":"Create Outlet","description":"Creates an outlet in the currently active library. Contact details go in the `contact` object, with the address nested under `address`. Custom field names must match fields already configured on the library.","operationId":"create-outlet","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"external_name":{"type":"string","description":"This name will be visible e.g. in outgoing orders."},"timezone":{"type":"string","description":"The timezone the outlet is located in. Must be a valid timezone, e.g. \"Europe/Brussels\"."},"contact":{"type":"object","description":"The outlet's Contact Details. Renamed from `supplier` (v1). Address fields must be nested under `address`; flat address keys (e.g. a top-level `street`) are ignored.","properties":{"name":{"type":"string","description":"Display/company name of the contact."},"contact_first_name":{"type":"string"},"contact_last_name":{"type":"string"},"email":{"type":"string"},"supplier_email_list":{"type":"array","items":{"type":"string"}},"internal_supplier_id":{"type":"string","nullable":true},"address":{"type":"object","properties":{"street":{"type":"string"},"number":{"type":"string"},"postal_code":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"mobile":{"type":"string"},"telephone":{"type":"string"}}}}},"procurement_contact":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"}}},"billing_contact":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"street":{"type":"string"},"number":{"type":"string"},"postal_code":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}},"internal_supplier_outlet":{"type":"object","description":"Set when the outlet also acts as an internal supplier. Renamed from `supplier_contact` (v1).","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"supplier_email_list":{"type":"array","items":{"type":"string"}},"street":{"type":"string"},"number":{"type":"string"},"postal_code":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}},"suppliers":{"type":"array","description":"A list of supplier IDs to be linked to the outlet.","items":{"type":"string"}},"ingredients":{"type":"array","description":"A list of ingredient IDs to be linked to the outlet.","items":{"type":"string"}},"recipes":{"type":"array","description":"A list of recipe IDs to be linked to the outlet.","items":{"type":"string"}},"menus":{"type":"array","description":"A list of menu IDs to be linked to the outlet.","items":{"type":"string"}},"custom_fields":{"type":"array","description":"Sets the outlet's custom fields. Each `name` must exactly match a custom field already configured on the library; entries whose `name` does not match an existing field are silently ignored and the request still succeeds. `value` is a string for free-text/single-choice fields, or an array of strings for multi-choice fields.","items":{"type":"object","properties":{"name":{"type":"string","example":"Free Text Field"},"value":{"description":"String, or an array of strings for multi-choice fields.","example":"I type this freely"}}}}}},"examples":{"Simple example":{"value":{"name":"My outlet","description":"My outlet description","external_name":"My outlet external name","timezone":"Europe/Brussels","contact":{"name":"My outlet","contact_first_name":"John","contact_last_name":"Smith","email":"email@email.com","internal_supplier_id":null,"address":{"street":"My street","number":"0000","postal_code":"0000","city":"My city","country":"My Country","mobile":"000 0000","telephone":"000 0000"}},"procurement_contact":{"first_name":"My Procurement","last_name":"Contact","phone":"000-0000","email":"email@email.com"},"billing_contact":{"first_name":"My Billing","last_name":"Contact","phone":"000-0000","email":"email@email.com","street":"my street","number":"1234","postal_code":"000-0000","city":"Brussels","country":"Belgium"},"custom_fields":[{"name":"Free Text Field","value":"I type this freely"},{"name":"Multi Choice Field","value":["Choice 1","Choice 3"]}]}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":{"id":"229000541140009","url":"https://app.apicbase.com/api/v2/accounts/outlets/229000541140009/","name":"My outlet","external_name":"My outlet external name","description":"My outlet description","timezone":"Europe/Brussels","contact":{"id":"525000395270006","url":"https://app.apicbase.com/api/v2/suppliers/525000395270006/","name":"My outlet","contact_first_name":"John","contact_last_name":"Smith","email":"email@email.com","supplier_email_list":[],"tax_number":null,"customer_number":null,"internal_supplier_id":null,"supplier_outlet_id":null,"standard_delivery_fee":null,"notes":null,"attach_csv_on_purchase_orders":null,"address":{"street":"My street","number":"0000","city":"My city","country":"My Country","postal_code":"0000","mobile":"000 0000","telephone":null}},"internal_supplier_outlet":null,"billing_contact":{"id":"325000185230002","first_name":"My Billing","last_name":"Contact","phone":"000-0000","email":"email@email.com","supplier_email_list":[],"street":"my street","number":"1234","postal_code":"000-0000","city":"Brussels","country":"Belgium"},"procurement_contact":null,"custom_fields":[{"name":"Free Text Field","value":"I type this freely"},{"name":"Multi Choice Field","value":["Choice 1","Choice 3"]}],"suppliers":[],"ingredients":[],"recipes":[],"menus":[]}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"229000541140009"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/229000541140009/"},"name":{"type":"string","example":"My outlet"},"external_name":{"type":"string","nullable":true,"example":"My outlet external name"},"description":{"type":"string","nullable":true,"example":"My outlet description"},"timezone":{"type":"string","nullable":true,"example":"Europe/Brussels"},"contact":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"525000395270006"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/suppliers/525000395270006/"},"name":{"type":"string","example":"My outlet"},"contact_first_name":{"type":"string","example":"John"},"contact_last_name":{"type":"string","example":"Smith"},"email":{"type":"string","nullable":true,"example":"email@email.com"},"supplier_email_list":{"type":"array","items":{"type":"string"}},"tax_number":{"type":"string","nullable":true},"customer_number":{"type":"string","nullable":true},"internal_supplier_id":{"type":"string","nullable":true},"supplier_outlet_id":{"type":"string","nullable":true},"standard_delivery_fee":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"attach_csv_on_purchase_orders":{"type":"boolean","nullable":true},"address":{"type":"object","properties":{"street":{"type":"string","example":"My street"},"number":{"type":"string","nullable":true,"example":"0000"},"city":{"type":"string","example":"My city"},"country":{"type":"string","example":"My Country"},"postal_code":{"type":"string","example":"0000"},"mobile":{"type":"string","example":"000 0000"},"telephone":{"type":"string","nullable":true}}}}},"internal_supplier_outlet":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"125040526960005"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/suppliers/525220818060002/"},"first_name":{"type":"string","example":"Peppa"},"last_name":{"type":"string","example":"Pig"},"phone":{"type":"string","example":""},"email":{"type":"string","nullable":true},"supplier_email_list":{"type":"array","items":{"type":"string"}},"street":{"type":"string","example":"Rue de la Loi"},"number":{"type":"string","example":"1"},"postal_code":{"type":"string","example":"1000"},"city":{"type":"string","example":"Bruxelles"},"country":{"type":"string","example":"Belgium"}}},"billing_contact":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"325000185230002"},"first_name":{"type":"string","example":"My Billing"},"last_name":{"type":"string","example":"Contact"},"phone":{"type":"string","nullable":true,"example":"000-0000"},"email":{"type":"string","nullable":true,"example":"email@email.com"},"supplier_email_list":{"type":"array","items":{"type":"string"}},"street":{"type":"string","example":"my street"},"number":{"type":"string","example":"1234"},"postal_code":{"type":"string","example":"000-0000"},"city":{"type":"string","example":"Brussels"},"country":{"type":"string","example":"Belgium"}}},"procurement_contact":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"225040036980003"},"first_name":{"type":"string","example":"Luke"},"last_name":{"type":"string","example":"Skywalker"},"phone":{"type":"string","nullable":true},"email":{"type":"string","nullable":true,"example":"luke.skywalker@apicbase.com"},"supplier_email_list":{"type":"array","items":{"type":"string"}}}},"custom_fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Free Text Field"},"value":{"example":"I type this freely"}}}},"suppliers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"825320333320003"},"name":{"type":"string","example":"Mama Pasta"}}}},"ingredients":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"764556666890005"},"name":{"type":"string","example":"Pasta Spaghetti"},"short_name":{"type":"string","example":""},"name_translations":{"type":"object"}}}},"recipes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"349980442190000"},"name":{"type":"string","example":"Spaghetti Bolognese"},"name_translations":{"type":"object"}}}},"menus":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"990400245400005"},"name":{"type":"string","example":"Second Menu"}}}}}}}}}},"deprecated":false}},"/accounts/outlets/{outlet_id}/":{"get":{"summary":"Get Outlet Details","description":"Gets information about a specific outlet in the library.","operationId":"get-outlet-details","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"name":"Brussel","id":"829100725420008","url":"https://staging.apicbase.com/api/v2/accounts/outlets/829100725420008/","billing_contact":null,"recipes":[{"id":"349980442190000","name":"Spaghetti Bolognese","name_translations":{}}],"external_name":null,"internal_supplier_outlet":{"id":"125040526960005","url":"https://app.apicbase.com/api/v2/suppliers/525220818060002/","first_name":"Peppa","last_name":"Pig","phone":"","email":null,"supplier_email_list":["peppa.pig@apicbase.com"],"street":"Rue de la Loi","number":"1","postal_code":"1000","city":"Bruxelles","country":"Belgium"},"timezone":null,"description":null,"procurement_contact":{"id":"225040036980003","first_name":"Luke","last_name":"Skywalker","phone":null,"email":"luke.skywalker@apicbase.com","supplier_email_list":[]},"contact":{"full_name":"Baby Shark","first_name":"Baby","last_name":"Shark","avatar":"https://cdn-staging.apicbase.com/apicbase/images/avatar.png","telephone":null,"mobile":null,"email":"baby.shark@apicbase.com"},"custom_fields":[{"name":"Multi Choice Field","value":["Choice 1","Choice 3"]},{"name":"Free Text Field","value":"I type this freely"}],"suppliers":[{"id":"825320333320003","name":"Mama Pasta"},{"id":"325220129010007","name":"Happy Cow Products"}],"ingredients":[{"id":"764556666890005","name":"Pasta Spaghetti","short_name":"","name_translations":{}}],"menus":[{"id":"990400245400005","name":"Second Menu"},{"id":"390400735470004","name":"Spaghetti Special Menu"}]}}},"schema":{"type":"object","properties":{"name":{"type":"string","example":"Brussel"},"id":{"type":"string","example":"829100725420008"},"url":{"type":"string","example":"https://staging.apicbase.com/api/v2/accounts/outlets/829100725420008/"},"billing_contact":{},"recipes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"349980442190000"},"name":{"type":"string","example":"Spaghetti Bolognese"},"name_translations":{"type":"object","properties":{}}}}},"external_name":{},"internal_supplier_outlet":{"type":"object","properties":{"id":{"type":"string","example":"125040526960005"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/suppliers/525220818060002/"},"first_name":{"type":"string","example":"Peppa"},"last_name":{"type":"string","example":"Pig"},"phone":{"type":"string","example":""},"email":{},"supplier_email_list":{"type":"array","items":{"type":"string","example":"peppa.pig@apicbase.com"}},"street":{"type":"string","example":"Rue de la Loi"},"number":{"type":"string","example":"1"},"postal_code":{"type":"string","example":"1000"},"city":{"type":"string","example":"Bruxelles"},"country":{"type":"string","example":"Belgium"}}},"timezone":{},"description":{},"procurement_contact":{"type":"object","properties":{"id":{"type":"string","example":"225040036980003"},"first_name":{"type":"string","example":"Luke"},"last_name":{"type":"string","example":"Skywalker"},"phone":{},"email":{"type":"string","example":"luke.skywalker@apicbase.com"},"supplier_email_list":{"type":"array"}}},"contact":{"type":"object","properties":{"full_name":{"type":"string","example":"Baby Shark"},"first_name":{"type":"string","example":"Baby"},"last_name":{"type":"string","example":"Shark"},"avatar":{"type":"string","example":"https://cdn-staging.apicbase.com/apicbase/images/avatar.png"},"telephone":{},"mobile":{},"email":{"type":"string","example":"baby.shark@apicbase.com"}}},"suppliers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"825320333320003"},"name":{"type":"string","example":"Mama Pasta"}}}},"ingredients":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"764556666890005"},"name":{"type":"string","example":"Pasta Spaghetti"},"short_name":{"type":"string","example":""},"name_translations":{"type":"object","properties":{}}}}},"menus":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"990400245400005"},"name":{"type":"string","example":"Second Menu"}}}}}}}}}},"deprecated":false},"patch":{"summary":"Edit Outlet","description":"Edits an existing outlet. Only the fields included in the payload are changed. Contact details go in the `contact` object, with the address nested under `address`. Sending `contact: null` clears the contact.","operationId":"edit-outlet","parameters":[{"name":"outlet_id","in":"path","description":"The ID of the outlet to be updated.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"external_name":{"type":"string","description":"This name will be visible e.g. in outgoing orders."},"timezone":{"type":"string","description":"The timezone the outlet is located in. Must be a valid timezone, e.g. \"Europe/Brussels\"."},"contact":{"type":"object","description":"The outlet's Contact Details. Renamed from `supplier` (v1). Address fields must be nested under `address`; flat address keys (e.g. a top-level `street`) are ignored.","properties":{"name":{"type":"string","description":"Display/company name of the contact."},"contact_first_name":{"type":"string"},"contact_last_name":{"type":"string"},"email":{"type":"string"},"supplier_email_list":{"type":"array","items":{"type":"string"}},"internal_supplier_id":{"type":"string","nullable":true},"address":{"type":"object","properties":{"street":{"type":"string"},"number":{"type":"string"},"postal_code":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"mobile":{"type":"string"},"telephone":{"type":"string"}}}}},"procurement_contact":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"}}},"billing_contact":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"street":{"type":"string"},"number":{"type":"string"},"postal_code":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}},"internal_supplier_outlet":{"type":"object","description":"Set when the outlet also acts as an internal supplier. Renamed from `supplier_contact` (v1).","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"supplier_email_list":{"type":"array","items":{"type":"string"}},"street":{"type":"string"},"number":{"type":"string"},"postal_code":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}},"suppliers":{"type":"array","description":"A list of supplier IDs to be linked to the outlet.","items":{"type":"string"}},"ingredients":{"type":"array","description":"A list of ingredient IDs to be linked to the outlet.","items":{"type":"string"}},"recipes":{"type":"array","description":"A list of recipe IDs to be linked to the outlet.","items":{"type":"string"}},"menus":{"type":"array","description":"A list of menu IDs to be linked to the outlet.","items":{"type":"string"}},"custom_fields":{"type":"array","description":"Sets the outlet's custom fields. Each `name` must exactly match a custom field already configured on the library; entries whose `name` does not match an existing field are silently ignored and the request still succeeds. `value` is a string for free-text/single-choice fields, or an array of strings for multi-choice fields.","items":{"type":"object","properties":{"name":{"type":"string","example":"Free Text Field"},"value":{"description":"String, or an array of strings for multi-choice fields.","example":"I type this freely"}}}}}},"examples":{"Simple example":{"value":{"name":"My outlet","description":"My outlet description","external_name":"My outlet external name","timezone":"Europe/Brussels","contact":{"name":"My outlet","contact_first_name":"John","contact_last_name":"Smith","email":"email@email.com","internal_supplier_id":null,"address":{"street":"My street","number":"0000","postal_code":"0000","city":"My city","country":"My Country","mobile":"000 0000","telephone":"000 0000"}},"procurement_contact":{"first_name":"My Procurement","last_name":"Contact","phone":"000-0000","email":"email@email.com"},"billing_contact":{"first_name":"My Billing","last_name":"Contact","phone":"000-0000","email":"email@email.com","street":"my street","number":"1234","postal_code":"000-0000","city":"Brussels","country":"Belgium"},"custom_fields":[{"name":"Free Text Field","value":"I type this freely"},{"name":"Multi Choice Field","value":["Choice 1","Choice 3"]}]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"id":"229000541140009","url":"https://app.apicbase.com/api/v2/accounts/outlets/229000541140009/","name":"My outlet","external_name":"My outlet external name","description":"My outlet description","timezone":"Europe/Brussels","contact":{"id":"525000395270006","url":"https://app.apicbase.com/api/v2/suppliers/525000395270006/","name":"My outlet","contact_first_name":"John","contact_last_name":"Smith","email":"email@email.com","supplier_email_list":[],"tax_number":null,"customer_number":null,"internal_supplier_id":null,"supplier_outlet_id":null,"standard_delivery_fee":null,"notes":null,"attach_csv_on_purchase_orders":null,"address":{"street":"My street","number":"0000","city":"My city","country":"My Country","postal_code":"0000","mobile":"000 0000","telephone":null}},"internal_supplier_outlet":null,"billing_contact":{"id":"325000185230002","first_name":"My Billing","last_name":"Contact","phone":"000-0000","email":"email@email.com","supplier_email_list":[],"street":"my street","number":"1234","postal_code":"000-0000","city":"Brussels","country":"Belgium"},"procurement_contact":null,"custom_fields":[{"name":"Free Text Field","value":"I type this freely"},{"name":"Multi Choice Field","value":["Choice 1","Choice 3"]}],"suppliers":[],"ingredients":[],"recipes":[],"menus":[]}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"229000541140009"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/229000541140009/"},"name":{"type":"string","example":"My outlet"},"external_name":{"type":"string","nullable":true,"example":"My outlet external name"},"description":{"type":"string","nullable":true,"example":"My outlet description"},"timezone":{"type":"string","nullable":true,"example":"Europe/Brussels"},"contact":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"525000395270006"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/suppliers/525000395270006/"},"name":{"type":"string","example":"My outlet"},"contact_first_name":{"type":"string","example":"John"},"contact_last_name":{"type":"string","example":"Smith"},"email":{"type":"string","nullable":true,"example":"email@email.com"},"supplier_email_list":{"type":"array","items":{"type":"string"}},"tax_number":{"type":"string","nullable":true},"customer_number":{"type":"string","nullable":true},"internal_supplier_id":{"type":"string","nullable":true},"supplier_outlet_id":{"type":"string","nullable":true},"standard_delivery_fee":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"attach_csv_on_purchase_orders":{"type":"boolean","nullable":true},"address":{"type":"object","properties":{"street":{"type":"string","example":"My street"},"number":{"type":"string","nullable":true,"example":"0000"},"city":{"type":"string","example":"My city"},"country":{"type":"string","example":"My Country"},"postal_code":{"type":"string","example":"0000"},"mobile":{"type":"string","example":"000 0000"},"telephone":{"type":"string","nullable":true}}}}},"internal_supplier_outlet":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"125040526960005"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/suppliers/525220818060002/"},"first_name":{"type":"string","example":"Peppa"},"last_name":{"type":"string","example":"Pig"},"phone":{"type":"string","example":""},"email":{"type":"string","nullable":true},"supplier_email_list":{"type":"array","items":{"type":"string"}},"street":{"type":"string","example":"Rue de la Loi"},"number":{"type":"string","example":"1"},"postal_code":{"type":"string","example":"1000"},"city":{"type":"string","example":"Bruxelles"},"country":{"type":"string","example":"Belgium"}}},"billing_contact":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"325000185230002"},"first_name":{"type":"string","example":"My Billing"},"last_name":{"type":"string","example":"Contact"},"phone":{"type":"string","nullable":true,"example":"000-0000"},"email":{"type":"string","nullable":true,"example":"email@email.com"},"supplier_email_list":{"type":"array","items":{"type":"string"}},"street":{"type":"string","example":"my street"},"number":{"type":"string","example":"1234"},"postal_code":{"type":"string","example":"000-0000"},"city":{"type":"string","example":"Brussels"},"country":{"type":"string","example":"Belgium"}}},"procurement_contact":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"225040036980003"},"first_name":{"type":"string","example":"Luke"},"last_name":{"type":"string","example":"Skywalker"},"phone":{"type":"string","nullable":true},"email":{"type":"string","nullable":true,"example":"luke.skywalker@apicbase.com"},"supplier_email_list":{"type":"array","items":{"type":"string"}}}},"custom_fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Free Text Field"},"value":{"example":"I type this freely"}}}},"suppliers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"825320333320003"},"name":{"type":"string","example":"Mama Pasta"}}}},"ingredients":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"764556666890005"},"name":{"type":"string","example":"Pasta Spaghetti"},"short_name":{"type":"string","example":""},"name_translations":{"type":"object"}}}},"recipes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"349980442190000"},"name":{"type":"string","example":"Spaghetti Bolognese"},"name_translations":{"type":"object"}}}},"menus":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"990400245400005"},"name":{"type":"string","example":"Second Menu"}}}}}}}}}},"deprecated":false}},"/accounts/user_connector/":{"get":{"summary":"Get User Connectors","description":"Gets a list of all user connectors in the library with their associated users, roles, outlets, and libraries. User connectors represent either outlet users or library users in the system.","operationId":"get-user-connectors","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set. Starts at 1","schema":{"type":"integer","format":"int32"}},{"name":"type","in":"query","description":"Filter by connector type. Use 'O' or 'L'","schema":{"type":"string"}},{"name":"email","in":"query","description":"Filter by email address (case-insensitive partial match)","schema":{"type":"string"}},{"name":"role_id","in":"query","description":"Filter by user role ID","schema":{"type":"string"}},{"name":"outlet_id","in":"query","description":"Filter by outlet ID","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"count":2,"next":null,"previous":null,"results":[{"id":"336310664030008","type":"L","user":{"id":"336310664030008","email":"john.doe@apicbase.com","first_name":"John","last_name":"Doe"},"role":{"id":"123456789012345","name":"Manager"},"outlet":null,"library":{"id":"987654321098765","name":"Main Library"}},{"id":"336900440610001","type":"O","user":{"id":"336900440610001","email":"jane.smith@apicbase.com","first_name":"Jane","last_name":"Smith"},"role":{"id":"123456789012346","name":"Chef"},"outlet":{"id":"829100725420008","name":"Brussels"},"library":{"id":"987654321098765","name":"Main Library"}}]}}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":2,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"336310664030008"},"type":{"type":"string","example":"L"},"user":{"type":"object","properties":{"id":{"type":"string","example":"336310664030008"},"email":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"}}},"role":{"type":"object","properties":{"id":{"type":"string","example":"123456789012345"},"name":{"type":"string","example":"Manager"}}},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"829100725420008"},"name":{"type":"string","example":"Brussels"}}},"library":{"type":"object","properties":{"id":{"type":"string","example":"987654321098765"},"name":{"type":"string","example":"Main Library"}}}}}}}}}}}},"deprecated":false},"post":{"summary":"Create User & Connector","description":"Creates a new user (if they don't exist) and a user connector to link them to the library or an outlet with a specific role. If a user with the provided email already exists, it will create a connector for that existing user. Optionally sends a verification email to the user.","operationId":"create-user-connector","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email","role"],"properties":{"email":{"type":"string","description":"The email address of the user"},"first_name":{"type":"string","description":"The first name of the user"},"last_name":{"type":"string","description":"The last name of the user"},"role":{"type":"string","description":"The ID of the user role to assign"},"outlet":{"type":"string","description":"The ID of the outlet to link the user to (optional, for outlet users)"},"send_verification_email":{"type":"boolean","description":"Whether to send a verification email to the user","default":false}}},"examples":{"Library User":{"value":{"email":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","role":"123456789012345","send_verification_email":true}},"Outlet User":{"value":{"email":"jane.smith@apicbase.com","first_name":"Jane","last_name":"Smith","role":"123456789012346","outlet":"829100725420008","send_verification_email":false}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":{"id":"336310664030008","type":"L","user":{"id":"336310664030008","email":"john.doe@apicbase.com","first_name":"John","last_name":"Doe"},"role":{"id":"123456789012345","name":"Manager"},"outlet":null,"library":{"id":"987654321098765","name":"Main Library"}}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"336310664030008"},"type":{"type":"string","example":"L"},"user":{"type":"object","properties":{"id":{"type":"string","example":"336310664030008"},"email":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"}}},"role":{"type":"object","properties":{"id":{"type":"string","example":"123456789012345"},"name":{"type":"string","example":"Manager"}}},"outlet":{},"library":{"type":"object","properties":{"id":{"type":"string","example":"987654321098765"},"name":{"type":"string","example":"Main Library"}}}}}}}}},"deprecated":false}},"/accounts/user_connector/{user_connector_id}/":{"get":{"summary":"Get User Connector Details","description":"Gets information about a specific user connector including the associated user, role, outlet, and library details.","operationId":"get-user-connector-details","parameters":[{"name":"user_connector_id","in":"path","description":"The user connector's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"id":"336310664030008","type":"L","user":{"id":"336310664030008","email":"john.doe@apicbase.com","first_name":"John","last_name":"Doe"},"role":{"id":"123456789012345","name":"Manager"},"outlet":null,"library":{"id":"987654321098765","name":"Main Library"}}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"336310664030008"},"type":{"type":"string","example":"L"},"user":{"type":"object","properties":{"id":{"type":"string","example":"336310664030008"},"email":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"}}},"role":{"type":"object","properties":{"id":{"type":"string","example":"123456789012345"},"name":{"type":"string","example":"Manager"}}},"outlet":{},"library":{"type":"object","properties":{"id":{"type":"string","example":"987654321098765"},"name":{"type":"string","example":"Main Library"}}}}}}}}},"deprecated":false},"patch":{"summary":"Update User Connector","description":"Updates an existing user connector. You can update the user's details, role, or outlet assignment.","operationId":"update-user-connector","parameters":[{"name":"user_connector_id","in":"path","description":"The ID of the user connector to be updated.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","description":"The first name of the user"},"last_name":{"type":"string","description":"The last name of the user"},"role":{"type":"string","description":"The ID of the user role to assign"},"outlet":{"type":"string","description":"The ID of the outlet to link the user to"}}},"examples":{"Update Role":{"value":{"role":"123456789012347"}},"Update User Details":{"value":{"first_name":"John","last_name":"Smith","role":"123456789012345"}},"Change Outlet":{"value":{"outlet":"829100725420009"}}}}}},"responses":{"204":{"description":"User connector successfully updated with no content returned"}},"deprecated":false},"delete":{"summary":"Delete User Connector","description":"Deletes a user connector from the library, effectively unlinking the user from the library or outlet.","operationId":"delete-user-connector","parameters":[{"name":"user_connector_id","in":"path","description":"The user connector's ID.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":""}}}}}},"deprecated":false}},"/accounts/libraries/":{"get":{"summary":"Get Libraries","description":"Gets a list of all libraries that the current user has access to. Returns both active and blocked libraries, with their status indicated.","operationId":"get-libraries","responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":[{"id":"987654321098765","name":"Main Library","status":"active"},{"id":"987654321098766","name":"Secondary Library","status":"active"},{"id":"987654321098767","name":"Blocked Library","status":"blocked"}]}},"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"987654321098765"},"name":{"type":"string","example":"Main Library"},"status":{"type":"string","enum":["active","blocked"],"example":"active","description":"The status of the library. 'active' means the library is accessible, 'blocked' means it is blocked and cannot be switched to."}}}}}}}},"deprecated":false}},"/accounts/libraries/active/":{"get":{"summary":"Get Active Library","description":"Gets the currently active library details including library ID, name, status, and the connected user information.","operationId":"get-active-library","responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"active_library":{"id":"987654321098765","name":"Main Library","status":"active"},"active_user":{"id":"336310664030008","email":"john.doe@apicbase.com","first_name":"John","last_name":"Doe"}}}},"schema":{"type":"object","properties":{"active_library":{"type":"object","properties":{"id":{"type":"string","example":"987654321098765"},"name":{"type":"string","example":"Main Library"},"status":{"type":"string","enum":["active","blocked"],"example":"active"}}},"active_user":{"type":"object","properties":{"id":{"type":"string","example":"336310664030008"},"email":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"}}}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":{"detail":"No active library found."}}}}}}},"deprecated":false},"post":{"summary":"Switch Active Library","description":"Switches the user's currently active library to the specified library. The user must have access to the library and it must not be blocked. Outlet users cannot switch libraries. If the library is already active, returns the current active library information without making changes.","operationId":"switch-active-library","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["library_id"],"properties":{"library_id":{"type":"string","description":"The ID of the library to switch to"}}},"examples":{"Switch Library":{"value":{"library_id":"987654321098766"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"active_library":{"id":"987654321098766","name":"Secondary Library","status":"active"},"active_user":{"id":"336310664030008","email":"john.doe@apicbase.com","first_name":"John","last_name":"Doe"}}}},"schema":{"type":"object","properties":{"active_library":{"type":"object","properties":{"id":{"type":"string","example":"987654321098766"},"name":{"type":"string","example":"Secondary Library"},"status":{"type":"string","enum":["active","blocked"],"example":"active"}}},"active_user":{"type":"object","properties":{"id":{"type":"string","example":"336310664030008"},"email":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Library Not Found":{"value":{"library_id":["Library not found."]}},"Blocked Library":{"value":{"library_id":["Cannot switch to a blocked library."]}},"Outlet User":{"value":{"library_id":["Outlet users cannot switch libraries."]}}}}}}},"deprecated":false}},"/audit-logs/":{"get":{"summary":"Get Audit Logs","description":"Returns a paginated list of audit logs with support for filtering and ordering. Access requires admin permissions for the library and the audit logs feature must be enabled.","operationId":"get-audit-logs","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by. Valid options: created_at, -created_at, action, -action, module, -module.","schema":{"type":"string"}},{"name":"user","in":"query","description":"Filter by user id.","schema":{"type":"integer","format":"int64"}},{"name":"action","in":"query","description":"Filter by a single action. See [Actions](https://developers.apicbase.com/docs/audit-log-filter-values#actions).","schema":{"type":"string"}},{"name":"actions","in":"query","description":"Filter by multiple actions. Uses OR logic. See [Actions](https://developers.apicbase.com/docs/audit-log-filter-values#actions).","schema":{"type":"string"}},{"name":"module","in":"query","description":"Filter by a single module. See [Modules](https://developers.apicbase.com/docs/audit-log-filter-values#modules).","schema":{"type":"string"}},{"name":"modules","in":"query","description":"Filter by multiple modules. Uses OR logic. See [Modules](https://developers.apicbase.com/docs/audit-log-filter-values#modules).","schema":{"type":"string"}},{"name":"outlet","in":"query","description":"Filter by outlet apic_id.","schema":{"type":"integer","format":"int64"}},{"name":"source","in":"query","description":"Filter by source. Valid options: web, api, mobile. See [Sources](https://developers.apicbase.com/docs/audit-log-filter-values#sources).","schema":{"type":"string"}},{"name":"created_at","in":"query","description":"Filter logs on a specific date (format: YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"from_created_at","in":"query","description":"Filter logs created after this date/time (format: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ).","schema":{"type":"string","format":"date-time"}},{"name":"to_created_at","in":"query","description":"Filter logs created before this date/time (format: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ).","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"count":42,"next":"https://api.apicbase.com/api/v2/audit-logs/?page=2","previous":null,"results":[{"id":"550e8400-e29b-41d4-a716-446655440000","created_at":"2025-12-18T14:30:00.000000Z","user":{"id":536210327110005,"username":"john.doe@example.com","full_name":"John Doe"},"ip_address":{"ip_address":"192.168.1.1","hostname":"localhost","city":"Brussels","region":"Brussels","country":"BE","loc":"50.8503,4.3517","org":"Apicbase","postal":"1000","timezone":"Europe/Brussels"},"user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36","source":"web","outlet":{"id":429600574660007,"name":"Main Kitchen"},"action":"Delete Ingredient","module":"Menu Engineering","object_id":"12345","object_name":"Salt","metadata":null},{"id":"550e8400-e29b-41d4-a716-446655440001","created_at":"2025-12-18T14:25:00.000000Z","user":{"id":536210327110005,"username":"john.doe@example.com","full_name":"John Doe"},"ip_address":{"ip_address":"192.168.1.1","hostname":"localhost","city":"Brussels","region":"Brussels","country":"BE","loc":"50.8503,4.3517","org":"Apicbase","postal":"1000","timezone":"Europe/Brussels"},"user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36","source":"web","outlet":null,"action":"Bulk Delete Ingredients","module":"Menu Engineering","object_id":null,"object_name":null,"metadata":{"pks":[1,2,3],"destroy_count":3}}]}}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":42,"default":0},"next":{"type":"string","example":"https://api.apicbase.com/api/v2/audit-logs/?page=2"},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"created_at":{"type":"string","example":"2025-12-18T14:30:00.000000Z"},"user":{"type":"object","properties":{"id":{"type":"integer","example":536210327110005},"username":{"type":"string","example":"john.doe@example.com"},"full_name":{"type":"string","example":"John Doe"}}},"ip_address":{"type":"object","properties":{"ip_address":{"type":"string","example":"192.168.1.1"},"hostname":{"type":"string","example":"localhost"},"city":{"type":"string","example":"Brussels"},"region":{"type":"string","example":"Brussels"},"country":{"type":"string","example":"BE"},"loc":{"type":"string","example":"50.8503,4.3517"},"org":{"type":"string","example":"Apicbase"},"postal":{"type":"string","example":"1000"},"timezone":{"type":"string","example":"Europe/Brussels"}}},"user_agent":{"type":"string","example":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"},"source":{"type":"string","example":"web"},"outlet":{"type":"object","properties":{"id":{"type":"integer","example":429600574660007},"name":{"type":"string","example":"Main Kitchen"}}},"action":{"type":"string","example":"Delete Ingredient"},"module":{"type":"string","example":"Menu Engineering"},"object_id":{"type":"string","example":"12345"},"object_name":{"type":"string","example":"Salt"},"metadata":{}}}}}}}}}},"deprecated":false}},"/management-figures/gross-profit-report/":{"get":{"summary":"Get Gross Profit Report","description":"Returns the Management Figures gross profit totals across the outlets in the report, as a single object.","operationId":"get-gross-profit-report","parameters":[{"name":"start_datetime","in":"query","description":"Start of the reporting period, in ISO 8601 format.","schema":{"type":"string","format":"date-time","example":"2026-06-14T00:00:00Z"},"required":true},{"name":"end_datetime","in":"query","description":"End of the reporting period, in ISO 8601 format. Must not be earlier than `start_datetime`.","schema":{"type":"string","format":"date-time","example":"2026-06-16T23:59:59Z"},"required":true},{"name":"count_moment","in":"query","description":"When the outlets take their full counts, which decides the period a count day's sales belong to. `after_closing`: a full count on the start date leaves that day's sales out. `before_opening`: a full count on the end date leaves that day's sales out. See Period boundaries below.","schema":{"type":"string","enum":["after_closing","before_opening"],"default":"after_closing","example":"before_opening"}},{"name":"id","in":"query","description":"A single outlet ID to report on. Omit to report on every outlet in the library. Unlike the other two reports this takes one ID, not a comma-separated list. An ID that does not exist, or that belongs to another library, returns 404.","schema":{"type":"string","example":"829100725420008"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"inventory":{"opening_stock_value":"12500.00","opening_value_has_full_count":true,"goods_received_value":"8300.00","created_in_stock_value":"0.00","transfers_in_value":"450.00","sold_stock_value":"-6350.00","created_out_stock_value":"0.00","transfers_out_value":"-200.00","shipped_out_stock_value":"0.00","wasted_stock_value":"-310.00","closing_stock_value":"14030.00","closing_value_has_full_count":false,"positive_variance_value":"120.00","negative_variance_value":"480.00","net_variance_value":"-360.00"},"sales":{"net_sales":"28198.85","theoretical_cost":"6420.00","actual_cost":"7210.00","theoretical_cost_percentage":"22.77","actual_cost_percentage":"25.57","theoretical_gross_profit_percentage":"77.23","actual_gross_profit_percentage":"74.43","gross_profit_percentage_difference":"-2.80","cost_difference":"790.00","cost_percentage_difference":"2.80"}}}},"schema":{"type":"object","properties":{"inventory":{"type":"object","description":"Stock values and movements, summed across the outlets in the report.","properties":{"opening_stock_value":{"type":"string","example":"12500.00","description":"Stock value at the start of the period."},"opening_value_has_full_count":{"type":"boolean","example":true,"description":"True only when every outlet in the report closed a full count on the start date."},"goods_received_value":{"type":"string","example":"8300.00","description":"Value of stock received from deliveries."},"created_in_stock_value":{"type":"string","example":"0.00","description":"Value of stock created by production."},"transfers_in_value":{"type":"string","example":"450.00","description":"Value of stock transferred in from another outlet."},"sold_stock_value":{"type":"string","example":"-6350.00","description":"Value of stock sold. Negative, as stock leaves the outlet."},"created_out_stock_value":{"type":"string","example":"0.00","description":"Value of stock consumed by production. Negative, as stock leaves the outlet."},"transfers_out_value":{"type":"string","example":"-200.00","description":"Value of stock transferred out to another outlet. Negative, as stock leaves the outlet."},"shipped_out_stock_value":{"type":"string","example":"0.00","description":"Value of stock shipped out. Negative, as stock leaves the outlet."},"wasted_stock_value":{"type":"string","example":"-310.00","description":"Value of stock recorded as waste. Negative, as stock leaves the outlet."},"closing_stock_value":{"type":"string","example":"14030.00","description":"Stock value at the end of the period."},"closing_value_has_full_count":{"type":"boolean","example":false,"description":"True only when every outlet in the report closed a full count on the end date."},"positive_variance_value":{"type":"string","example":"120.00","description":"Value counted above the expected stock level. Always positive."},"negative_variance_value":{"type":"string","example":"480.00","description":"Value counted below the expected stock level. Always positive, despite representing a loss."},"net_variance_value":{"type":"string","example":"-360.00","description":"`positive_variance_value` minus `negative_variance_value`. Negative when more stock was lost than gained."}}},"sales":{"type":"object","description":"Sales figures and the costs derived from them, summed across the outlets in the report.","properties":{"net_sales":{"type":"string","example":"28198.85","description":"Revenue excluding VAT."},"theoretical_cost":{"type":"string","example":"6420.00","description":"Cost of goods sold over the same days as `net_sales`, as the Sales dashboard reports it: each item sold at the value of the stock it used, or at its recipe's food cost if it used no stock, plus the personnel cost set on its recipe. Not derived from `sold_stock_value`, so the two differ."},"actual_cost":{"type":"string","example":"7210.00","description":"`theoretical_cost` plus the waste and the negative variance: `theoretical_cost` + |`wasted_stock_value`| + `negative_variance_value`. Stock counted above the expected level (`positive_variance_value`) does not lower it."},"theoretical_cost_percentage":{"type":"string","example":"22.77","nullable":true,"description":"Theoretical cost as a percentage of net sales. Null when net sales is zero."},"actual_cost_percentage":{"type":"string","example":"25.57","nullable":true,"description":"Actual cost as a percentage of net sales. Null when net sales is zero."},"theoretical_gross_profit_percentage":{"type":"string","example":"77.23","nullable":true,"description":"Gross profit percentage based on theoretical cost. Null when net sales is zero."},"actual_gross_profit_percentage":{"type":"string","example":"74.43","nullable":true,"description":"Gross profit percentage based on actual cost. Null when net sales is zero."},"gross_profit_percentage_difference":{"type":"string","example":"-2.80","nullable":true,"description":"Actual gross profit percentage minus the theoretical one. Null when net sales is zero."},"cost_difference":{"type":"string","example":"790.00","description":"Actual cost minus theoretical cost."},"cost_percentage_difference":{"type":"string","example":"2.80","nullable":true,"description":"Actual cost percentage minus the theoretical one. Null when net sales is zero."}}}}}}}},"400":{"description":"A filter is missing or malformed."},"403":{"description":"The library has neither the Sales nor the Inventory module, or the user lacks Insights Hub access."},"404":{"description":"The `id` does not exist, or belongs to another library.","content":{"application/json":{"examples":{"Result":{"value":{"message":"Outlet not found."}}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Outlet not found."}}}}}}},"deprecated":false}},"/management-figures/inventory-movement/":{"get":{"summary":"Get Inventory Movement","description":"Returns the Management Figures inventory movement breakdown, one row per outlet.","operationId":"get-inventory-movement","parameters":[{"name":"start_datetime","in":"query","description":"Start of the reporting period, in ISO 8601 format.","schema":{"type":"string","format":"date-time","example":"2026-06-14T00:00:00Z"},"required":true},{"name":"end_datetime","in":"query","description":"End of the reporting period, in ISO 8601 format. Must not be earlier than `start_datetime`.","schema":{"type":"string","format":"date-time","example":"2026-06-16T23:59:59Z"},"required":true},{"name":"ids","in":"query","description":"Comma-separated outlet IDs to report on. Omit to report on every outlet in the library. IDs that do not exist, or that belong to another library, match nothing rather than returning an error.","schema":{"type":"string","example":"829100725420008,829100725420009"}},{"name":"name","in":"query","description":"An outlet name to query on. Matches outlets whose name contains this value.","schema":{"type":"string"}},{"name":"custom_fields","in":"query","description":"Filter on outlet custom fields. Check reference guide for details.","schema":{"type":"string"}},{"name":"opening_count_filter","in":"query","description":"Restrict to outlets by whether they closed a full count on the start date. `actual` keeps only those that did, `theoretical` only those that did not, `all` applies no restriction.","schema":{"type":"string","enum":["all","actual","theoretical"],"example":"actual"}},{"name":"closing_count_filter","in":"query","description":"Restrict to outlets by whether they closed a full count on the end date. `actual` keeps only those that did, `theoretical` only those that did not, `all` applies no restriction.","schema":{"type":"string","enum":["all","actual","theoretical"],"example":"theoretical"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"page_size","in":"query","description":"Number of outlets to return per page. Maximum 200.","schema":{"type":"integer","format":"int32","maximum":200}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"count":2,"next":null,"previous":null,"results":[{"opening_stock_value":"12500.00","opening_value_has_full_count":true,"goods_received_value":"8300.00","created_in_stock_value":"0.00","transfers_in_value":"450.00","sold_stock_value":"-6350.00","created_out_stock_value":"0.00","transfers_out_value":"-200.00","shipped_out_stock_value":"0.00","wasted_stock_value":"-310.00","closing_stock_value":"14030.00","closing_value_has_full_count":false,"positive_variance_value":"120.00","negative_variance_value":"480.00","net_variance_value":"-360.00","id":"829100725420008","name":"Brussel"},{"opening_stock_value":"8000.00","opening_value_has_full_count":false,"goods_received_value":"5200.00","created_in_stock_value":"0.00","transfers_in_value":"0.00","sold_stock_value":"-4100.00","created_out_stock_value":"0.00","transfers_out_value":"0.00","shipped_out_stock_value":"0.00","wasted_stock_value":"-150.00","closing_stock_value":"8810.00","closing_value_has_full_count":false,"positive_variance_value":"60.00","negative_variance_value":"200.00","net_variance_value":"-140.00","id":"829100725420009","name":"Antwerpen"}]}}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":2},"next":{"type":"string","nullable":true,"example":null},"previous":{"type":"string","nullable":true,"example":null},"results":{"type":"array","items":{"type":"object","properties":{"opening_stock_value":{"type":"string","example":"12500.00","description":"Stock value at the start of the period."},"opening_value_has_full_count":{"type":"boolean","example":true,"description":"True when the outlet closed a full count on the start date."},"goods_received_value":{"type":"string","example":"8300.00","description":"Value of stock received from deliveries."},"created_in_stock_value":{"type":"string","example":"0.00","description":"Value of stock created by production."},"transfers_in_value":{"type":"string","example":"450.00","description":"Value of stock transferred in from another outlet."},"sold_stock_value":{"type":"string","example":"-6350.00","description":"Value of stock sold. Negative, as stock leaves the outlet."},"created_out_stock_value":{"type":"string","example":"0.00","description":"Value of stock consumed by production. Negative, as stock leaves the outlet."},"transfers_out_value":{"type":"string","example":"-200.00","description":"Value of stock transferred out to another outlet. Negative, as stock leaves the outlet."},"shipped_out_stock_value":{"type":"string","example":"0.00","description":"Value of stock shipped out. Negative, as stock leaves the outlet."},"wasted_stock_value":{"type":"string","example":"-310.00","description":"Value of stock recorded as waste. Negative, as stock leaves the outlet."},"closing_stock_value":{"type":"string","example":"14030.00","description":"Stock value at the end of the period."},"closing_value_has_full_count":{"type":"boolean","example":false,"description":"True when the outlet closed a full count on the end date."},"positive_variance_value":{"type":"string","example":"120.00","description":"Value counted above the expected stock level. Always positive."},"negative_variance_value":{"type":"string","example":"480.00","description":"Value counted below the expected stock level. Always positive, despite representing a loss."},"net_variance_value":{"type":"string","example":"-360.00","description":"`positive_variance_value` minus `negative_variance_value`. Negative when more stock was lost than gained."},"id":{"type":"string","example":"829100725420008","description":"The ID of the outlet."},"name":{"type":"string","example":"Brussel","description":"The outlet name."}}}}}}}}},"400":{"description":"A filter is missing or malformed."},"403":{"description":"The library has neither the Sales nor the Inventory module, or the user lacks Insights Hub access."}},"deprecated":false}},"/management-figures/sales-performance/":{"get":{"summary":"Get Sales Performance","description":"Returns the Management Figures sales and performance breakdown, one row per outlet.","operationId":"get-sales-performance","parameters":[{"name":"start_datetime","in":"query","description":"Start of the reporting period, in ISO 8601 format.","schema":{"type":"string","format":"date-time","example":"2026-06-14T00:00:00Z"},"required":true},{"name":"end_datetime","in":"query","description":"End of the reporting period, in ISO 8601 format. Must not be earlier than `start_datetime`.","schema":{"type":"string","format":"date-time","example":"2026-06-16T23:59:59Z"},"required":true},{"name":"count_moment","in":"query","description":"When the outlets take their full counts, which decides the period a count day's sales belong to. `after_closing`: a full count on the start date leaves that day's sales out. `before_opening`: a full count on the end date leaves that day's sales out. See Period boundaries below.","schema":{"type":"string","enum":["after_closing","before_opening"],"default":"after_closing","example":"before_opening"}},{"name":"ids","in":"query","description":"Comma-separated outlet IDs to report on. Omit to report on every outlet in the library. IDs that do not exist, or that belong to another library, match nothing rather than returning an error.","schema":{"type":"string","example":"829100725420008,829100725420009"}},{"name":"name","in":"query","description":"An outlet name to query on. Matches outlets whose name contains this value.","schema":{"type":"string"}},{"name":"custom_fields","in":"query","description":"Filter on outlet custom fields. Check reference guide for details.","schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"page_size","in":"query","description":"Number of outlets to return per page. Maximum 200.","schema":{"type":"integer","format":"int32","maximum":200}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"count":2,"next":null,"previous":null,"results":[{"net_sales":"28198.85","theoretical_cost":"6350.00","actual_cost":"7020.00","theoretical_cost_percentage":"22.52","actual_cost_percentage":"24.89","theoretical_gross_profit_percentage":"77.48","actual_gross_profit_percentage":"75.11","gross_profit_percentage_difference":"-2.37","cost_difference":"670.00","cost_percentage_difference":"2.37","id":"829100725420008","name":"Brussel","opening_value_has_full_count":true},{"net_sales":"19500.00","theoretical_cost":"4100.00","actual_cost":"4390.00","theoretical_cost_percentage":"21.03","actual_cost_percentage":"22.51","theoretical_gross_profit_percentage":"78.97","actual_gross_profit_percentage":"77.49","gross_profit_percentage_difference":"-1.48","cost_difference":"290.00","cost_percentage_difference":"1.48","id":"829100725420009","name":"Antwerpen","opening_value_has_full_count":false}]}}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":2},"next":{"type":"string","nullable":true,"example":null},"previous":{"type":"string","nullable":true,"example":null},"results":{"type":"array","items":{"type":"object","properties":{"net_sales":{"type":"string","example":"28198.85","description":"Revenue excluding VAT."},"theoretical_cost":{"type":"string","example":"6350.00","description":"Cost of goods sold over the same days as `net_sales`, as the Sales dashboard reports it: each item sold at the value of the stock it used, or at its recipe's food cost if it used no stock, plus the personnel cost set on its recipe. Not derived from the outlet's `sold_stock_value` in Get Inventory Movement, so the two differ."},"actual_cost":{"type":"string","example":"7020.00","description":"`theoretical_cost` plus the outlet's waste and negative variance, both as in Get Inventory Movement: `theoretical_cost` + |`wasted_stock_value`| + `negative_variance_value`. Stock counted above the expected level does not lower it."},"theoretical_cost_percentage":{"type":"string","example":"22.52","nullable":true,"description":"Theoretical cost as a percentage of net sales. Null when net sales is zero."},"actual_cost_percentage":{"type":"string","example":"24.89","nullable":true,"description":"Actual cost as a percentage of net sales. Null when net sales is zero."},"theoretical_gross_profit_percentage":{"type":"string","example":"77.48","nullable":true,"description":"Gross profit percentage based on theoretical cost. Null when net sales is zero."},"actual_gross_profit_percentage":{"type":"string","example":"75.11","nullable":true,"description":"Gross profit percentage based on actual cost. Null when net sales is zero."},"gross_profit_percentage_difference":{"type":"string","example":"-2.37","nullable":true,"description":"Actual gross profit percentage minus the theoretical one. Null when net sales is zero."},"cost_difference":{"type":"string","example":"670.00","description":"Actual cost minus theoretical cost."},"cost_percentage_difference":{"type":"string","example":"2.37","nullable":true,"description":"Actual cost percentage minus the theoretical one. Null when net sales is zero."},"id":{"type":"string","example":"829100725420008","description":"The ID of the outlet."},"name":{"type":"string","example":"Brussel","description":"The outlet name."},"opening_value_has_full_count":{"type":"boolean","example":true,"description":"True when the outlet closed a full count on the start date. With `count_moment=after_closing`, that day's sales then belong to the previous period, so `net_sales` covers one day less than requested. With `before_opening` the start day is always included, and whether the end day was left out is shown by `closing_value_has_full_count` in Get Inventory Movement."}}}}}}}}},"400":{"description":"A filter is missing or malformed."},"403":{"description":"The library has neither the Sales nor the Inventory module, or the user lacks Insights Hub access."}},"deprecated":false}},"/suppliers/":{"get":{"summary":"Get Suppliers","description":"Returns a list of suppliers in the library.","operationId":"get-suppliers","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"company_or_full_name","in":"query","description":"Filter on a supplier name.","schema":{"type":"string"}},{"name":"email","in":"query","description":"Filter on the supplier's contact/ordering email(s).","schema":{"type":"string"}},{"name":"vat_number","in":"query","description":"Filter on the supplier's VAT number.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of results.","example":1},"next":{"type":"string","description":"URL of the next page.","nullable":true,"example":null},"previous":{"type":"string","description":"URL of the previous page.","nullable":true,"example":null},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the supplier.","example":"325220129010007"},"url":{"type":"string","description":"The API URL of the supplier.","example":"https://app.apicbase.com/api/v2/suppliers/325220129010007/"},"name":{"type":"string","description":"The supplier's name.","example":"Happy Cow Products"},"contact_first_name":{"type":"string","description":"First name of the contact person.","example":"Matthew"},"contact_last_name":{"type":"string","description":"Last name of the contact person.","example":"Smith"},"email":{"type":"string","description":"The contact email address.","nullable":true,"example":null},"supplier_email_list":{"type":"array","description":"The addresses orders are emailed to.","items":{"type":"string","example":"ordering@happycowproducts.com"}},"tax_number":{"type":"string","description":"Tax/VAT number.","nullable":true,"example":"44100262692"},"customer_number":{"type":"string","description":"Customer reference number.","nullable":true,"example":"40"},"internal_supplier_id":{"type":"string","description":"Internal supplier identifier.","nullable":true,"example":null},"supplier_outlet_id":{"type":"string","description":"When the supplier is one of the library's outlets acting as an internal supplier, that outlet's ID.","nullable":true,"example":null},"address":{"type":"object","description":"The supplier's address and phone numbers.","properties":{"street":{"type":"string","nullable":true},"number":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"mobile":{"type":"string","nullable":true},"telephone":{"type":"string","nullable":true}}},"standard_delivery_fee":{"type":"string","description":"Standard delivery fee, as a decimal string with two decimals.","nullable":true,"example":"15.00"},"notes":{"type":"string","description":"Additional notes about the supplier.","nullable":true,"example":null},"attach_csv_on_purchase_orders":{"type":"boolean","description":"Whether a CSV file is attached to the purchase orders emailed to this supplier.","example":false,"nullable":true},"order_approval_enabled":{"type":"boolean","description":"Whether orders to this supplier are checked against `daily_order_threshold`. Takes effect only when a threshold is set.","example":true},"daily_order_threshold":{"type":"string","description":"The daily amount to this supplier, as a decimal string with two decimals. An order that would take the day's sent total above it is parked for approval. Null when not set.","nullable":true,"example":"1500.00"},"approver_roles":{"type":"array","description":"The roles notified when an order is parked at this level. They decide who receives the email, not who may approve: any user with the Approve Orders permission can.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the role.","example":"538300710920000"},"name":{"type":"string","description":"The role's name.","example":"Purchasing manager"}}}}}}}}},"examples":{"Result":{"value":{"count":1,"next":null,"previous":null,"results":[{"id":"325220129010007","url":"https://app.apicbase.com/api/v2/suppliers/325220129010007/","name":"Happy Cow Products","contact_first_name":"Matthew","contact_last_name":"Smith","email":null,"supplier_email_list":["ordering@happycowproducts.com"],"tax_number":"44100262692","customer_number":"40","internal_supplier_id":null,"supplier_outlet_id":null,"address":{"street":"Main Street","number":"12","city":"Brussels","country":"Belgium","postal_code":"2000","mobile":"","telephone":"+321234567890"},"standard_delivery_fee":"15.00","notes":null,"attach_csv_on_purchase_orders":false,"order_approval_enabled":true,"daily_order_threshold":"1500.00","approver_roles":[{"id":"538300710920000","name":"Purchasing manager"}]}]}}}}}}},"deprecated":false},"post":{"summary":"Create Supplier","description":"Creates a new supplier in the library.","operationId":"create-supplier","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Supplier name"},"contact_first_name":{"type":"string","description":"First name of the contact person"},"contact_last_name":{"type":"string","description":"Last name of the contact person"},"supplier_email_list":{"type":"array","items":{"type":"string","format":"email"},"description":"List of supplier email addresses"},"tax_number":{"type":"string","description":"Tax/VAT number"},"customer_number":{"type":"string","description":"Customer reference number"},"internal_supplier_id":{"type":"string","description":"Internal supplier identifier"},"standard_delivery_fee":{"type":"number","format":"float","minimum":0,"description":"Standard delivery fee amount"},"notes":{"type":"string","description":"Additional notes about the supplier"},"outlets":{"type":"array","items":{"type":"string"},"description":"List of outlet IDs linked to this supplier"},"attach_csv_on_purchase_orders":{"type":"boolean","description":"Whether to attach CSV files on purchase orders"},"address":{"type":"object","description":"Supplier address information","properties":{"street":{"type":"string","description":"Street name"},"number":{"type":"string","description":"Street number"},"city":{"type":"string","description":"City"},"country":{"type":"string","description":"Country"},"postal_code":{"type":"string","description":"Postal/ZIP code"},"mobile":{"type":"string","description":"Mobile phone number"},"telephone":{"type":"string","description":"Telephone number"}}},"order_approval_enabled":{"type":"boolean","description":"Whether orders to this supplier are checked against `daily_order_threshold`. `true` needs a threshold.","example":true},"daily_order_threshold":{"type":"string","description":"A decimal amount with at most two decimals, from 0 to 9999999999.99, or `null`.","nullable":true,"example":"1500.00"},"approver_roles":{"type":"array","description":"The IDs of the roles to notify. Replaces the current selection; `[]` clears it, and leaving the key out keeps it. Each role must belong to the library, be a library or outlet role and hold the Approve Orders permission. Send the IDs, not the objects returned on read.","items":{"type":"string","example":"538300710920000"}}}},"examples":{"CreateSupplier":{"value":{"name":"Happy Cow Products","contact_first_name":"Matthew","contact_last_name":"Smith","supplier_email_list":["ordering@happycowproducts.com"],"tax_number":"44100262692","customer_number":"40","address":{"street":"Main Street","number":"12","city":"Brussels","postal_code":"2000","country":"Belgium","telephone":"+321234567890"},"order_approval_enabled":true,"daily_order_threshold":"1500.00","approver_roles":["538300710920000"]}}}}}},"responses":{"201":{"description":"The supplier was created.","content":{"application/json":{"schema":{"type":"object","properties":{"instance":{"type":"string","description":"The API URL of the new supplier.","example":"https://app.apicbase.com/api/v2/suppliers/325220129010007/"}}},"examples":{"Result":{"value":{"instance":"https://app.apicbase.com/api/v2/suppliers/325220129010007/"}}}}}},"400":{"description":"A field is not valid. For the order approval settings: enabling without a threshold (on `daily_order_threshold`), a role that is not valid (on `approver_roles`, listing the rejected IDs), or, for a library without the Order Approval module, a value that differs from the stored one (on each such field).","content":{"application/json":{"schema":{"type":"object","description":"Error messages keyed by field.","additionalProperties":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string","description":"Without the Order Approval module, a changed order approval setting is refused with a single message instead of a list."}]}},"examples":{"Missing name":{"value":{"name":["This field is required."]}},"Enabled without a threshold":{"value":{"daily_order_threshold":["A threshold is required to enable order approval."]}},"Module not enabled":{"value":{"order_approval_enabled":"The order approval module is not enabled for this library."}}}}}},"403":{"description":"Forbidden - User lacks required permissions"}},"deprecated":false,"x-readme":{"code-samples":[],"explorer-enabled":true}}},"/suppliers/{supplier_id}/":{"get":{"summary":"Get Supplier","description":"Returns information about a single supplier.","operationId":"get-supplier","parameters":[{"name":"supplier_id","in":"path","description":"A supplier ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the supplier.","example":"325220129010007"},"url":{"type":"string","description":"The API URL of the supplier.","example":"https://app.apicbase.com/api/v2/suppliers/325220129010007/"},"name":{"type":"string","description":"The supplier's name.","example":"Happy Cow Products"},"contact_first_name":{"type":"string","description":"First name of the contact person.","example":"Matthew"},"contact_last_name":{"type":"string","description":"Last name of the contact person.","example":"Smith"},"email":{"type":"string","description":"The contact email address.","nullable":true,"example":null},"supplier_email_list":{"type":"array","description":"The addresses orders are emailed to.","items":{"type":"string","example":"ordering@happycowproducts.com"}},"tax_number":{"type":"string","description":"Tax/VAT number.","nullable":true,"example":"44100262692"},"customer_number":{"type":"string","description":"Customer reference number.","nullable":true,"example":"40"},"internal_supplier_id":{"type":"string","description":"Internal supplier identifier.","nullable":true,"example":null},"supplier_outlet_id":{"type":"string","description":"When the supplier is one of the library's outlets acting as an internal supplier, that outlet's ID.","nullable":true,"example":null},"address":{"type":"object","description":"The supplier's address and phone numbers.","properties":{"street":{"type":"string","nullable":true},"number":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"mobile":{"type":"string","nullable":true},"telephone":{"type":"string","nullable":true}}},"standard_delivery_fee":{"type":"string","description":"Standard delivery fee, as a decimal string with two decimals.","nullable":true,"example":"15.00"},"notes":{"type":"string","description":"Additional notes about the supplier.","nullable":true,"example":null},"attach_csv_on_purchase_orders":{"type":"boolean","description":"Whether a CSV file is attached to the purchase orders emailed to this supplier.","example":false,"nullable":true},"order_approval_enabled":{"type":"boolean","description":"Whether orders to this supplier are checked against `daily_order_threshold`. Takes effect only when a threshold is set.","example":true},"daily_order_threshold":{"type":"string","description":"The daily amount to this supplier, as a decimal string with two decimals. An order that would take the day's sent total above it is parked for approval. Null when not set.","nullable":true,"example":"1500.00"},"approver_roles":{"type":"array","description":"The roles notified when an order is parked at this level. They decide who receives the email, not who may approve: any user with the Approve Orders permission can.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the role.","example":"538300710920000"},"name":{"type":"string","description":"The role's name.","example":"Purchasing manager"}}}},"outlets":{"type":"array","description":"The API URLs of the outlets linked to this supplier. Written as outlet IDs, not URLs.","items":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"}}}},"examples":{"Result":{"value":{"id":"325220129010007","url":"https://app.apicbase.com/api/v2/suppliers/325220129010007/","name":"Happy Cow Products","contact_first_name":"Matthew","contact_last_name":"Smith","email":null,"supplier_email_list":["ordering@happycowproducts.com"],"tax_number":"44100262692","customer_number":"40","internal_supplier_id":null,"supplier_outlet_id":null,"address":{"street":"Main Street","number":"12","city":"Brussels","country":"Belgium","postal_code":"2000","mobile":"","telephone":"+321234567890"},"standard_delivery_fee":"15.00","notes":null,"attach_csv_on_purchase_orders":false,"order_approval_enabled":true,"daily_order_threshold":"1500.00","approver_roles":[{"id":"538300710920000","name":"Purchasing manager"}],"outlets":["https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"]}}}}}}},"deprecated":false},"patch":{"summary":"Edit Supplier","description":"Only the fields sent are changed.","operationId":"edit-supplier","parameters":[{"name":"supplier_id","in":"path","description":"A supplier ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"The supplier as stored after the edit.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the supplier.","example":"325220129010007"},"url":{"type":"string","description":"The API URL of the supplier.","example":"https://app.apicbase.com/api/v2/suppliers/325220129010007/"},"name":{"type":"string","description":"The supplier's name.","example":"Happy Cow Products"},"contact_first_name":{"type":"string","description":"First name of the contact person.","example":"Matthew"},"contact_last_name":{"type":"string","description":"Last name of the contact person.","example":"Smith"},"email":{"type":"string","description":"The contact email address.","nullable":true,"example":null},"supplier_email_list":{"type":"array","description":"The addresses orders are emailed to.","items":{"type":"string","example":"ordering@happycowproducts.com"}},"tax_number":{"type":"string","description":"Tax/VAT number.","nullable":true,"example":"44100262692"},"customer_number":{"type":"string","description":"Customer reference number.","nullable":true,"example":"40"},"internal_supplier_id":{"type":"string","description":"Internal supplier identifier.","nullable":true,"example":null},"supplier_outlet_id":{"type":"string","description":"When the supplier is one of the library's outlets acting as an internal supplier, that outlet's ID.","nullable":true,"example":null},"address":{"type":"object","description":"The supplier's address and phone numbers.","properties":{"street":{"type":"string","nullable":true},"number":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"mobile":{"type":"string","nullable":true},"telephone":{"type":"string","nullable":true}}},"standard_delivery_fee":{"type":"string","description":"Standard delivery fee, as a decimal string with two decimals.","nullable":true,"example":"15.00"},"notes":{"type":"string","description":"Additional notes about the supplier.","nullable":true,"example":null},"attach_csv_on_purchase_orders":{"type":"boolean","description":"Whether a CSV file is attached to the purchase orders emailed to this supplier.","example":false,"nullable":true},"order_approval_enabled":{"type":"boolean","description":"Whether orders to this supplier are checked against `daily_order_threshold`. Takes effect only when a threshold is set.","example":true},"daily_order_threshold":{"type":"string","description":"The daily amount to this supplier, as a decimal string with two decimals. An order that would take the day's sent total above it is parked for approval. Null when not set.","nullable":true,"example":"1500.00"},"approver_roles":{"type":"array","description":"The roles notified when an order is parked at this level. They decide who receives the email, not who may approve: any user with the Approve Orders permission can.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the role.","example":"538300710920000"},"name":{"type":"string","description":"The role's name.","example":"Purchasing manager"}}}},"outlets":{"type":"array","description":"The API URLs of the outlets linked to this supplier. Written as outlet IDs, not URLs.","items":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"}}}},"examples":{"Result":{"value":{"id":"325220129010007","url":"https://app.apicbase.com/api/v2/suppliers/325220129010007/","name":"Happy Cow Products","contact_first_name":"Matthew","contact_last_name":"Smith","email":null,"supplier_email_list":["ordering@happycowproducts.com"],"tax_number":"44100262692","customer_number":"40","internal_supplier_id":null,"supplier_outlet_id":null,"address":{"street":"Main Street","number":"12","city":"Brussels","country":"Belgium","postal_code":"2000","mobile":"","telephone":"+321234567890"},"standard_delivery_fee":"15.00","notes":null,"attach_csv_on_purchase_orders":false,"order_approval_enabled":true,"daily_order_threshold":"1500.00","approver_roles":[{"id":"538300710920000","name":"Purchasing manager"}],"outlets":["https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"]}}}}}},"400":{"description":"A field is not valid. For the order approval settings: enabling without a threshold (on `daily_order_threshold`), a role that is not valid (on `approver_roles`, listing the rejected IDs), or, for a library without the Order Approval module, a value that differs from the stored one (on each such field).","content":{"application/json":{"schema":{"type":"object","description":"Error messages keyed by field.","additionalProperties":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string","description":"Without the Order Approval module, a changed order approval setting is refused with a single message instead of a list."}]}},"examples":{"Enabled without a threshold":{"value":{"daily_order_threshold":["A threshold is required to enable order approval."]}},"Module not enabled":{"value":{"order_approval_enabled":"The order approval module is not enabled for this library."}}}}}},"404":{"description":"The supplier does not exist in the library."}},"deprecated":false,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"contact_first_name":{"type":"string"},"contact_last_name":{"type":"string"},"supplier_email_list":{"type":"array","items":{"type":"string"}},"tax_number":{"type":"string"},"customer_number":{"type":"string"},"internal_supplier_id":{"type":"string"},"standard_delivery_fee":{"type":"number","format":"float"},"notes":{"type":"string"},"outlets":{"type":"array","items":{"type":"string"},"description":"The IDs of the outlets to link to this supplier; outlets left out are unlinked. Read as URLs, written as IDs."},"attach_csv_on_purchase_orders":{"type":"boolean"},"address":{"type":"object","properties":{"street":{"type":"string"},"number":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"postal_code":{"type":"string"},"mobile":{"type":"string"},"telephone":{"type":"string"}}},"order_approval_enabled":{"type":"boolean","description":"Whether orders to this supplier are checked against `daily_order_threshold`. `true` needs a threshold, sent or already stored. Either setting can be sent alone; the other keeps its stored value.","example":true},"daily_order_threshold":{"type":"string","description":"A decimal amount with at most two decimals, from 0 to 9999999999.99, or `null`.","nullable":true,"example":"1500.00"},"approver_roles":{"type":"array","description":"The IDs of the roles to notify. Replaces the current selection; `[]` clears it, and leaving the key out keeps it. Each role must belong to the library, be a library or outlet role and hold the Approve Orders permission. Send the IDs, not the objects returned on read.","items":{"type":"string","example":"538300710920000"}}}},"examples":{"Enable order approval":{"value":{"order_approval_enabled":true,"daily_order_threshold":"1500.00","approver_roles":["538300710920000"]}}}}}}}},"/suppliers/{supplier_id}/ordering-details/":{"get":{"summary":"Get Supplier Ordering Details","description":"Retrieves ordering configuration details for all outlets linked to the specified supplier. Returns information about delivery schedules, minimum order amounts, delivery fees, and customer numbers for each linked outlet.","operationId":"get-supplier-ordering-details","parameters":[{"name":"supplier_id","in":"path","description":"A supplier ID.","required":true,"schema":{"type":"integer"}},{"name":"outlet_name","in":"query","description":"Filter by outlet name (case-insensitive partial match)","schema":{"type":"string"}},{"name":"outlet_id","in":"query","description":"Filter by specific outlet ID","schema":{"type":"integer"}},{"name":"linked","in":"query","description":"Filter by linked status","schema":{"type":"boolean"}},{"name":"all_delivery_days","in":"query","description":"Filter by whether outlet accepts deliveries all days","schema":{"type":"boolean"}},{"name":"custom_fields","in":"query","description":"Filter by custom outlet fields","schema":{"type":"object"}},{"name":"ordering","in":"query","description":"Sort results. Options: outlet__name, outlet__apic_id, minimum_order_amount (prefix with - for descending)","schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","example":25},"next":{"type":"string","nullable":true,"example":"http://api.example.com/api/v2/suppliers/12345/ordering-details/?page=2"},"previous":{"type":"string","nullable":true},"results":{"type":"array","items":{"type":"object","properties":{"outlet":{"type":"object","required":["id","name","url"],"properties":{"id":{"type":"string","example":"123"},"name":{"type":"string","example":"Downtown Location"},"url":{"type":"string","example":"http://api.example.com/api/v2/accounts/outlets/123/"}}},"delivery_schedule":{"type":"array","description":"List of delivery day configurations (empty if all_delivery_days is true)","items":{"type":"object","properties":{"delivery_day":{"type":"integer","minimum":1,"maximum":7,"description":"Day of week (1=Monday, 7=Sunday)"},"active":{"type":"boolean","description":"Whether this delivery day is active"},"lockup_day":{"type":"integer","nullable":true,"minimum":1,"maximum":7,"description":"Day when orders lock for this delivery (1=Monday, 7=Sunday)"},"lockup_time":{"type":"string","nullable":true,"pattern":"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$","description":"Time when orders lock (HH:MM format)"},"send_reminder":{"type":"boolean","description":"Whether to send reminder (requires lockup_day and lockup_time)"}}}},"minimum_order_amount":{"type":"string","nullable":true,"pattern":"^[0-9]+\\.?[0-9]*$","description":"Minimum order value required"},"standard_delivery_fee":{"type":"string","nullable":true,"pattern":"^[0-9]+\\.?[0-9]*$","description":"Standard delivery fee (shows fallback from supplier if null)"},"customer_numbers":{"type":"array","items":{"type":"string"},"description":"Customer reference numbers for this outlet"},"supplier_email_addresses":{"type":"array","items":{"type":"string","format":"email"},"description":"Email addresses for order communications"},"assortment_sync_id":{"type":"string","nullable":true,"description":"Assortment synchronization ID (only for integrated suppliers with assortment support)"},"order_approval_enabled":{"type":"boolean","description":"Whether orders from this outlet to this supplier are checked against `daily_order_threshold`. Takes effect only when a threshold is set.","example":true},"daily_order_threshold":{"type":"string","description":"The daily amount from this outlet to this supplier, as a decimal string with two decimals. An order that would take the day's sent total above it is parked for approval. Null when not set.","nullable":true,"example":"1500.00"},"approver_roles":{"type":"array","description":"The roles notified when an order is parked at this level. They decide who receives the email, not who may approve: any user with the Approve Orders permission can.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the role.","example":"538300710920000"},"name":{"type":"string","description":"The role's name.","example":"Purchasing manager"}}}}}}}}},"examples":{"Result":{"value":{"count":25,"next":"http://api.example.com/api/v2/suppliers/12345/ordering-details/?page=2","previous":null,"results":[{"outlet":{"id":"123","name":"Downtown Location","url":"http://api.example.com/api/v2/accounts/outlets/123/"},"delivery_schedule":[{"delivery_day":1,"active":true,"lockup_day":7,"lockup_time":"18:00","send_reminder":true},{"delivery_day":3,"active":true,"lockup_day":2,"lockup_time":"23:59","send_reminder":false}],"minimum_order_amount":"500.00","standard_delivery_fee":"25.50","customer_numbers":["CUST-001","CUST-002"],"supplier_email_addresses":["orders@supplier.com","procurement@supplier.com"],"assortment_sync_id":"SYNC-12345","order_approval_enabled":true,"daily_order_threshold":"1500.00","approver_roles":[{"id":"538300710920000","name":"Purchasing manager"}]}]}}}}}},"400":{"description":"Bad Request - Validation errors"},"401":{"description":"The request was not authenticated with an OAuth access token. A v1 API token (`Authorization: Token ...`) is refused here."},"403":{"description":"Forbidden - User lacks manage_procurement permission"},"404":{"description":"Not Found - Supplier does not exist"}},"deprecated":false,"x-readme":{"code-samples":[],"explorer-enabled":true}},"post":{"summary":"Edit Supplier Ordering Details","description":"Bulk updates ordering configuration for multiple outlets linked to the supplier. Updates delivery schedules, minimum order amounts, delivery fees, customer numbers, and email addresses.","operationId":"edit-supplier-ordering-details","parameters":[{"name":"supplier_id","in":"path","description":"A supplier ID.","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["outlet"],"properties":{"outlet":{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"Outlet ID to update"}}},"delivery_schedule":{"type":"array","description":"Delivery day configurations. Cannot be provided if all_delivery_days is true","items":{"type":"object","required":["delivery_day"],"properties":{"delivery_day":{"type":"integer","minimum":1,"maximum":7,"description":"Day of week (1=Monday, 7=Sunday)"},"active":{"type":"boolean","description":"Whether day is active"},"lockup_day":{"type":"integer","nullable":true,"minimum":1,"maximum":7,"description":"Order lockup day (1=Monday, 7=Sunday)"},"lockup_time":{"type":"string","nullable":true,"pattern":"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$","description":"Order lockup time (HH:MM format, defaults to 23:59 if lockup_day is set)"},"send_reminder":{"type":"boolean","description":"Send reminder (requires lockup_day AND lockup_time)"}}}},"minimum_order_amount":{"type":"string","nullable":true,"pattern":"^[0-9]+\\.?[0-9]*$","description":"Minimum order amount"},"standard_delivery_fee":{"type":"string","nullable":true,"pattern":"^[0-9]+\\.?[0-9]*$","description":"Delivery fee"},"customer_numbers":{"type":"array","items":{"type":"string"},"description":"Customer reference numbers (replaces existing)"},"supplier_email_addresses":{"type":"array","items":{"type":"string","format":"email"},"description":"Email addresses for orders"},"assortment_sync_id":{"type":"string","nullable":true,"description":"Sync ID (only for integrated suppliers with assortment support, not for order-only integrated suppliers)"},"order_approval_enabled":{"type":"boolean","description":"Whether orders from this outlet to this supplier are checked against `daily_order_threshold`. Send it together with `daily_order_threshold`; `true` needs a non-null threshold in the same row. Must be sent together with `daily_order_threshold`.","example":true},"daily_order_threshold":{"type":"string","description":"A decimal amount with at most two decimals, from 0 to 9999999999.99, or `null`. Must be sent together with `order_approval_enabled`.","nullable":true,"example":"1500.00"},"approver_roles":{"type":"array","description":"The IDs of the roles to notify. Replaces the current selection; `[]` clears it, and leaving the key out keeps it. Each role must belong to the library, be a library or outlet role and hold the Approve Orders permission. Send the IDs, not the objects returned on read.","items":{"type":"string","example":"538300710920000"}}}}},"examples":{"Request":{"value":[{"outlet":{"id":"123"},"delivery_schedule":[{"delivery_day":1,"active":true,"lockup_day":7,"lockup_time":"18:00","send_reminder":true},{"delivery_day":3,"active":false,"lockup_day":null,"lockup_time":null,"send_reminder":false}],"minimum_order_amount":"500.00","standard_delivery_fee":"25.50","customer_numbers":["CUST-001","CUST-002"],"supplier_email_addresses":["orders@supplier.com"],"assortment_sync_id":"SYNC-12345","order_approval_enabled":true,"daily_order_threshold":"1500.00","approver_roles":["538300710920000"]}]}}}}},"responses":{"200":{"description":"The updated rows, one per outlet sent. Not paginated.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"outlet":{"type":"object","required":["id","name","url"],"properties":{"id":{"type":"string","example":"123"},"name":{"type":"string","example":"Downtown Location"},"url":{"type":"string","example":"http://api.example.com/api/v2/accounts/outlets/123/"}}},"delivery_schedule":{"type":"array","description":"List of delivery day configurations. Empty when the supplier delivers on every day.","items":{"type":"object","properties":{"delivery_day":{"type":"integer","minimum":1,"maximum":7,"description":"Day of week (1=Monday, 7=Sunday)"},"active":{"type":"boolean","description":"Whether this delivery day is active"},"lockup_day":{"type":"integer","nullable":true,"minimum":1,"maximum":7,"description":"Day when orders lock for this delivery (1=Monday, 7=Sunday)"},"lockup_time":{"type":"string","nullable":true,"pattern":"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$","description":"Time when orders lock (HH:MM format)"},"send_reminder":{"type":"boolean","description":"Whether to send reminder (requires lockup_day and lockup_time)"}}}},"minimum_order_amount":{"type":"string","nullable":true,"pattern":"^[0-9]+\\.?[0-9]*$","description":"Minimum order value required"},"standard_delivery_fee":{"type":"string","nullable":true,"pattern":"^[0-9]+\\.?[0-9]*$","description":"Standard delivery fee (shows fallback from supplier if null)"},"customer_numbers":{"type":"array","items":{"type":"string"},"description":"Customer reference numbers for this outlet"},"supplier_email_addresses":{"type":"array","items":{"type":"string","format":"email"},"description":"Email addresses for order communications"},"assortment_sync_id":{"type":"string","nullable":true,"description":"Assortment synchronization ID (only for integrated suppliers with assortment support)"},"order_approval_enabled":{"type":"boolean","description":"Whether orders from this outlet to this supplier are checked against `daily_order_threshold`. Takes effect only when a threshold is set.","example":true},"daily_order_threshold":{"type":"string","description":"The daily amount from this outlet to this supplier, as a decimal string with two decimals. An order that would take the day's sent total above it is parked for approval. Null when not set.","nullable":true,"example":"1500.00"},"approver_roles":{"type":"array","description":"The roles notified when an order is parked at this level. They decide who receives the email, not who may approve: any user with the Approve Orders permission can.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the role.","example":"538300710920000"},"name":{"type":"string","description":"The role's name.","example":"Purchasing manager"}}}}}}}}}},"400":{"description":"Nothing is saved. A row that fails validation makes the body an array with one object per row sent, `{}` for the rows that passed. A refusal that concerns the request as a whole, such as an outlet not linked to the supplier, is an array of messages.","content":{"application/json":{"schema":{"type":"array","items":{"oneOf":[{"type":"object","description":"Error messages keyed by field.","additionalProperties":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string","description":"Without the Order Approval module, a changed order approval setting is refused with a single message instead of a list."}]}},{"type":"string"}]}},"examples":{"A row refused":{"value":[{},{"order_approval_enabled":["Send order_approval_enabled and daily_order_threshold together."]}]},"The request refused":{"value":["One or more outlets not found in your library"]},"Duplicate weekdays in a row":{"value":[{"delivery_day":["Duplicate weekdays are not allowed"]}]},"No active delivery day":{"value":["Outlet 829100725420008: At least one active delivery day is required. Either provide an empty delivery_schedule or set at least one delivery day as active."]}}}}},"401":{"description":"The request was not authenticated with an OAuth access token. A v1 API token (`Authorization: Token ...`) is refused here."},"403":{"description":"Forbidden - User lacks manage_procurement permission"},"404":{"description":"Not Found - Supplier does not exist"}},"deprecated":false,"x-readme":{"code-samples":[],"explorer-enabled":true}}},"/library_settings/default_currency/":{"get":{"summary":"Get Currency","description":"Returns the library's default currency, used to display monetary values.","operationId":"get-default-currency","responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"code\": \"EUR\",\n  \"symbol\": \"€\",\n  \"name\": \"Euro\"\n}"}},"schema":{"type":"object","properties":{"code":{"type":"string","example":"EUR"},"symbol":{"type":"string","example":"€"},"name":{"type":"string","example":"Euro"}}}}}}},"deprecated":false}},"/library_settings/custom_fields/":{"get":{"summary":"Get Custom Field Definitions","description":"Returns a list of custom fields defined in the library","operationId":"get-custom-field-definitions","parameters":[{"name":"name","in":"query","description":"A field name to filter on.","schema":{"type":"string"}},{"name":"type","in":"query","description":"A field type to filter on.","schema":{"type":"string","enum":["choices","multi","text","long_text"]}},{"name":"model","in":"query","description":"A model to filter on.","schema":{"type":"string","enum":["Ingredient","Recipe","Menu"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"[\n    {\n        \"name\": \"Accounting Category\",\n        \"slug\": \"accounting-category\",\n        \"type\": \"choices\",\n        \"model\": \"Ingredient\",\n        \"field_values\": [\n            \"Food\",\n            \"Beverage\",\n            \"Consumable\"\n        ]\n    },\n    {\n        \"name\": \"Category\",\n        \"slug\": \"category\",\n        \"type\": \"choices\",\n        \"model\": \"Ingredient\",\n        \"field_values\": []\n    },\n    {\n        \"name\": \"Category\",\n        \"slug\": \"category\",\n        \"type\": \"choices\",\n        \"model\": \"Recipe\",\n        \"field_values\": []\n    },\n    {\n        \"name\": \"Kitchen Utensils\",\n        \"slug\": \"kitchen-utensils\",\n        \"type\": \"multi\",\n        \"model\": \"Recipe\",\n        \"field_values\": []\n    },\n    {\n        \"name\": \"Subcategory\",\n        \"slug\": \"subcategory\",\n        \"type\": \"choices\",\n        \"model\": \"Ingredient\",\n        \"field_values\": []\n    },\n    {\n        \"name\": \"Subcategory\",\n        \"slug\": \"subcategory\",\n        \"type\": \"choices\",\n        \"model\": \"Recipe\",\n        \"field_values\": []\n    },\n    {\n        \"name\": \"Filter Field Multi\",\n        \"slug\": \"filter-field-multi\",\n        \"type\": \"multi\",\n        \"model\": \"Recipe\",\n        \"field_values\": [\n            \"First\",\n            \"Second\",\n            \"Third\",\n            \"Fourth\"\n        ]\n    },\n    {\n        \"name\": \"Filter Field Single\",\n        \"slug\": \"filter-field-single\",\n        \"type\": \"choices\",\n        \"model\": \"Recipe\",\n        \"field_values\": [\n            \"Single 1\",\n            \"Single 2\"\n        ]\n    },\n    {\n        \"name\": \"Filter Field Text\",\n        \"slug\": \"filter-field-text\",\n        \"type\": \"text\",\n        \"model\": \"Recipe\",\n        \"field_values\": []\n    },\n    {\n        \"name\": \"Menu Choice Field\",\n        \"slug\": \"menu-choice-field\",\n        \"type\": \"choices\",\n        \"model\": \"Menu\",\n        \"field_values\": [\n            \"Choice 1\",\n            \"Choice 2\"\n        ]\n    },\n    {\n        \"name\": \"Multi Choice Field\",\n        \"slug\": \"multi-choice-field\",\n        \"type\": \"multi\",\n        \"model\": \"Ingredient\",\n        \"field_values\": [\n            \"Choice 1\",\n            \"Choice 2\",\n            \"Choice 3\"\n        ]\n    },\n    {\n        \"name\": \"Recipe Multi Field\",\n        \"slug\": \"recipe-multi-field\",\n        \"type\": \"multi\",\n        \"model\": \"Recipe\",\n        \"field_values\": [\n            \"Choice 1\",\n            \"Choice 2\",\n            \"Choice 3\"\n        ]\n    },\n    {\n        \"name\": \"Free Text Field\",\n        \"slug\": \"free-text-field\",\n        \"type\": \"long_text\",\n        \"model\": \"Ingredient\",\n        \"field_values\": []\n    }\n]"}},"schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Accounting Category"},"slug":{"type":"string","example":"accounting-category"},"type":{"type":"string","example":"choices"},"model":{"type":"string","example":"Ingredient"},"field_values":{"type":"array","items":{"type":"string","example":"Food"}}}}}}}}},"deprecated":false}},"/search/global/":{"get":{"summary":"Global Search","description":"Performs a global search across multiple entity types in the library using Elasticsearch. Returns search results grouped by entity type with pagination support.","operationId":"global-search","parameters":[{"name":"q","in":"query","description":"The search query string. If not provided, returns empty results.","schema":{"type":"string"}},{"name":"entity_types","in":"query","description":"Comma-separated list of entity types to search. Valid values: ingredients, recipes, images, albums, menus, recipe_albums, purchase_orders, stock_items, supplier_packages, invoices. If not provided, searches all entity types.","schema":{"type":"string","example":"ingredients,recipes"}},{"name":"page","in":"query","description":"A page number within the paginated result set. Starts at 1.","schema":{"type":"integer","format":"int32","default":1,"example":1}},{"name":"page_size","in":"query","description":"Number of results per page. Maximum value is 200.","schema":{"type":"integer","format":"int32","default":15,"maximum":200,"example":15}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"ingredients":{"items":[],"count":0},"recipes":{"items":[{"pk":123456,"recipe_type":"main","name":"Chicken Curry","detail_url":"https://app.apicbase.com/api/v2/products/recipes/123456/"}],"count":1},"images":{"items":[],"count":0},"albums":{"items":[],"count":0},"menus":{"items":[],"count":0},"recipe_albums":{"items":[],"count":0},"purchase_orders":{"items":[],"count":0},"stock_items":{"items":[],"count":0},"supplier_packages":{"items":[],"count":0},"invoices":{"items":[],"count":0},"private_search":true}}},"schema":{"type":"object","properties":{"ingredients":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"integer","example":123456},"name":{"type":"string","example":"Milk Whole"},"short_name":{"type":"string","example":"Milk"},"detail_url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/ingredients/123456/"}}}},"count":{"type":"integer","example":0,"default":0}}},"recipes":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"integer","example":123456},"recipe_type":{"type":"string","example":"main"},"name":{"type":"string","example":"Chicken Curry"},"detail_url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/recipes/123456/"}}}},"count":{"type":"integer","example":1,"default":0}}},"images":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"integer","example":123456},"thumb_image_url":{"type":"string","example":"https://cdn.apicbase.com/images/thumb.jpg"},"description":{"type":"string","example":"Image description"},"detail_url":{"type":"string","nullable":true}}}},"count":{"type":"integer","example":0,"default":0}}},"albums":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"integer","example":123456},"name":{"type":"string","example":"Album Name"},"detail_url":{"type":"string","nullable":true}}}},"count":{"type":"integer","example":0,"default":0}}},"menus":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"integer","example":123456},"name":{"type":"string","example":"Menu Name"},"detail_url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/menus/123456/"}}}},"count":{"type":"integer","example":0,"default":0}}},"recipe_albums":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"integer","example":123456},"name":{"type":"string","example":"Recipe Album Name"},"detail_url":{"type":"string","nullable":true}}}},"count":{"type":"integer","example":0,"default":0}}},"purchase_orders":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"integer","example":123456},"order_number":{"type":"string","example":"PO-12345"},"detail_url":{"type":"string","nullable":true}}}},"count":{"type":"integer","example":0,"default":0}}},"stock_items":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"integer","example":123456},"name":{"type":"string","example":"Stock Item Name"},"main_ingredient":{"type":"integer","example":789012},"gtin_list":{"type":"string","example":"1234567890123"},"detail_url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/123456/"}}}},"count":{"type":"integer","example":0,"default":0}}},"supplier_packages":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"integer","example":123456},"supplier_name":{"type":"string","example":"Supplier Name"},"supplier_article_number":{"type":"string","example":"ART-12345"},"supplier_product_name":{"type":"string","example":"Product Name"},"stock_item":{"type":"object","properties":{"pk":{"type":"integer","example":789012},"library":{"type":"object","properties":{"pk":{"type":"integer","example":111111}}},"main_ingredient":{"type":"object","properties":{"pk":{"type":"integer","example":222222}}}}},"detail_url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/supplier_packages/123456/"}}}},"count":{"type":"integer","example":0,"default":0}}},"invoices":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pk":{"type":"integer","example":123456},"detail_url":{"type":"string","nullable":true}}}},"count":{"type":"integer","example":0,"default":0}}},"private_search":{"type":"boolean","example":true,"default":true}}}}}},"400":{"description":"Bad Request - Invalid entity type provided","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Invalid entity type: invalid_type"}}}}}}},"deprecated":false}},"/products/ingredients/":{"get":{"summary":"Get Ingredients","description":"Returns a list of ingredients in the library.","operationId":"get-ingredients","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"name","in":"query","description":"A name to query on. Queries names in the Library's native language.","schema":{"type":"string"}},{"name":"short_name","in":"query","description":"A short name to query on. Queries short names in the library's native language.","schema":{"type":"string"}},{"name":"composition","in":"query","description":"Query the contents of the composition field.","schema":{"type":"string"}},{"name":"category","in":"query","description":"Query the contents of the category field.","schema":{"type":"string"}},{"name":"subcategory","in":"query","description":"Query the contents of the subcategory field.","schema":{"type":"string"}},{"name":"created_by","in":"query","description":"A user ID.","schema":{"type":"string"}},{"name":"internal_uid","in":"query","description":"An internal UID (reference number) to query on.","schema":{"type":"string"}},{"name":"external_uid","in":"query","description":"An external UID (external ID) to query on.","schema":{"type":"string"}},{"name":"allergen_verified","in":"query","description":"Query ingredients whose allergens have been/not been verified.","schema":{"type":"boolean"}},{"name":"supplier","in":"query","description":"Query ingredients that have stock items with a given supplier. Takes a supplier ID.","schema":{"type":"string"}},{"name":"supplier_email","in":"query","description":"Query ingredients that have stock items with a given supplier. Takes an email address..","schema":{"type":"string"}},{"name":"created_date","in":"query","description":"Filter on a creation date (exact).","schema":{"type":"string","format":"date"}},{"name":"created_date__gt","in":"query","description":"Filter on a creation date greater than.","schema":{"type":"string","format":"date"}},{"name":"created_date__lt","in":"query","description":"Filter on a creation date lower than.","schema":{"type":"string","format":"date"}},{"name":"modified_date","in":"query","description":"Filter on a modification date (exact).","schema":{"type":"string","format":"date"}},{"name":"modified_date__gt","in":"query","description":"Filter on a modification date greater than.","schema":{"type":"string","format":"date"}},{"name":"modified_date__lt","in":"query","description":"Filter on a modification date lower than.","schema":{"type":"string","format":"date"}},{"name":"archived_on","in":"query","description":"Filter on an archival date (exact).","schema":{"type":"string","format":"date"}},{"name":"archived_on__gt","in":"query","description":"Filter on an archival date greater than.","schema":{"type":"string","format":"date"}},{"name":"archived_on__lt","in":"query","description":"Filter on an archival date lower than.","schema":{"type":"string","format":"date"}},{"name":"conversion_ratio","in":"query","description":"Filter on the mass/volume conversion ratio (exact)","schema":{"type":"number","format":"float"}},{"name":"conversion_ratio__gt","in":"query","description":"Filter on a mass/volume conversion ratio greater than.","schema":{"type":"number","format":"float"}},{"name":"conversion_ratio__lt","in":"query","description":"Filter on a mass/volume conversion ratio lower than.","schema":{"type":"string"}},{"name":"shelf_life","in":"query","description":"Query the contents of the shelf life field.","schema":{"type":"string"}},{"name":"approved","in":"query","description":"Query ingredients that are approved/not approved.","schema":{"type":"boolean"}},{"name":"in_use","in":"query","description":"Query ingredients that are/are not in use.","schema":{"type":"boolean"}},{"name":"custom_fields","in":"query","description":"Filter on custom fields. Check reference guide for details.","schema":{"type":"string","format":"json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"count\": 2,\n  \"next\": null,\n  \"previous\": null,\n  \"results\": [\n    {\n      \"description\": \"More information about the ingredient.\",\n      \"subcategory\": \"Milk\",\n      \"id\": \"264556747770006\",\n      \"category\": \"Dairy\",\n      \"composition\": \"Some information goes here.\",\n      \"web_page\": \"https://app.apicbase.com/library/ingredient/655774/\",\n      \"archived_on\": null,\n      \"preferred_uoms\": [],\n      \"main_stock_items\": [\n        {\n          \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/521794758100007/\"\n        },\n        {\n          \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/121794868100003/\"\n        },\n        {\n          \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421794978110009/\"\n        }\n      ],\n      \"storage_instructions\": \"Don't let it stay out too long\",\n      \"modified_date\": \"2022-02-23T11:27:28Z\",\n      \"custom_fields\": [\n        {\n          \"name\": \"Multi Choice Field\",\n          \"value\": [\n            \"Choice 1\",\n            \"Choice 3\"\n          ]\n        },\n        {\n          \"name\": \"Free Text Field\",\n          \"value\": \"I type this freely\"\n        }\n      ],\n      \"approved\": true,\n      \"name_translations\": {\n        \"en\": \"Milk Whole\",\n        \"es\": \"Leche integral\",\n        \"fr\": \"Lait entier\",\n      },\n      \"name\": \"Milk Whole\",\n      \"suppliers\": [\n        {\n          \"url\": \"https://app.apicbase.com/api/v2/suppliers/325220129010007/\",\n          \"first_name\": \"Matthew\",\n          \"id\": \"325220129010007\",\n          \"company_name\": \"Happy Cow Products\",\n          \"last_name\": \"Smith\",\n          \"internal_supplier_outlet_id\": null\n        }\n      ],\n      \"url\": \"https://app.apicbase.com/api/v2/products/ingredients/264556747770006/\",\n      \"conversion_ratio\": \"1.0000\",\n      \"brand\": \"Happy Cow Products\",\n      \"supplier_article_number\": \"100020\",\n      \"external_uid\": \"123456\",\n      \"created_date\": \"2020-06-16T15:48:40Z\",\n      \"short_name\": \"Milk\",\n      \"allergen_verified\": false,\n      \"short_name_translations\": {\n        \"en\": \"Milk\",\n        \"es\": \"Leche\",\n        \"fr\": \"Lait\",\n        \"hu\": \"Milk\"\n      },\n      \"article_type\": \"\",\n      \"accounting_category\": \"Beverage\",\n      \"in_use\": false,\n      \"internal_uid\": \"444444\",\n      \"created_by\": \"john.doe@gmail.com\",\n      \"shelf_life\": \"3 months\",\n      \"carbon_footprint\": {\n    \t\t\"co2eq_farm_to_farmgate_kg\": 50.0,\n    \t\t\"ecolabels\": [\n      \t\t\"example-ecolabel\",\n      \t\t\"example-ecolabel-2\"\n    \t\t],\n    \t\t\"land_m2\": 50.0,\n    \t\t\"water_m3\": 50.0,\n        \"country_of_origin\": \"DE\"\n  \t\t} \n    },\n    {\n      \"name\": \"Egg\",\n      \"description\": \"\",\n      \"subcategory\": \"\",\n      \"id\": \"964556037770002\",\n      \"category\": \"\",\n      \"composition\": \"\",\n      \"web_page\": \"https://app.apicbase.com/library/ingredient/655773/\",\n      \"archived_on\": null,\n      \"preferred_uoms\": [],\n      \"main_stock_items\": [],\n      \"storage_instructions\": \"\",\n      \"modified_date\": \"2021-03-24T10:42:35Z\",\n      \"custom_fields\": [\n        {\n          \"name\": \"Multi Choice Field\",\n          \"value\": null\n        },\n        {\n          \"name\": \"Free Text Field\",\n          \"value\": null\n        }\n      ],\n      \"approved\": true,\n      \"name_translations\": {\n        \"en\": \"Egg\",\n        \"hu\": \"Egg\"\n      },\n      \"suppliers\": [],\n      \"url\": \"https://app.apicbase.com/api/v2-beta/products/ingredients/964556037770002/\",\n      \"conversion_ratio\": \"1.0000\",\n      \"brand\": \"Joey's Eggs\",\n      \"supplier_article_number\": null,\n      \"external_uid\": \"\",\n      \"created_date\": \"2020-06-16T15:43:50Z\",\n      \"short_name\": \"Tomato\",\n      \"allergen_verified\": false,\n      \"short_name_translations\": {\n        \"en\": \"Egg\",\n        \"fr\": \"Œuf\"\n      },\n      \"article_type\": \"\",\n      \"accounting_category\": \"Food\",\n      \"in_use\": true,\n      \"internal_uid\": \"05400141090284\",\n      \"created_by\": \"john.doe@apicbase.com\",\n      \"shelf_life\": \"2 weeks\",\n      \"carbon_footprint\": null\n    }\n  ]\n}"}}}}}},"deprecated":false},"post":{"summary":"Create Ingredient","description":"Creates a new instance of an ingredient.","operationId":"create-ingredient","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"short_name":{"type":"string"},"approved":{"type":"boolean","default":false},"allergen_verified":{"type":"boolean","default":false},"custom_fields":{"type":"string","format":"json"},"preferred_uoms":{"type":"array","items":{"type":"string"}},"conversion_ratio":{"type":"number","format":"float"},"internal_uid":{"type":"string","description":"Internal ID in the user interface. Uniqueness is enforced in this field."},"external_uid":{"type":"string","description":"External ID in the user interface."},"composition":{"type":"string"},"description":{"type":"string"},"brand":{"type":"string"},"category":{"type":"string"},"subcategory":{"type":"string"},"accounting_category":{"type":"string"},"storage_instructions":{"type":"string"},"shelf_life":{"type":"string"},"allergens":{"type":"object","properties":{"fish":{"type":"string","enum":["0","1","2","3"]},"milk_dairy":{"type":"string","enum":["0","1","2","3"]},"gluten":{"type":"string","enum":["0","1","2","3"]},"lactose":{"type":"string","enum":["0","1","2","3"]},"egg":{"type":"string","enum":["0","1","2","3"]},"peanut":{"type":"string","enum":["0","1","2","3"]},"lupine":{"type":"string","enum":["0","1","2","3"]},"poppy_seeds":{"type":"string","enum":["0","1","2","3"]},"hazelnuts":{"type":"string","enum":["0","1","2","3"]},"sulfites":{"type":"string","enum":["0","1","2","3"]},"kamut":{"type":"string","enum":["0","1","2","3"]},"mollusc":{"type":"string","enum":["0","1","2","3"]},"legume_pulse":{"type":"string","enum":["0","1","2","3"]},"wheat":{"type":"string","enum":["0","1","2","3"]},"shellfish":{"type":"string","enum":["0","1","2","3"]},"mustard":{"type":"string","enum":["0","1","2","3"]},"sesame":{"type":"string","enum":["0","1","2","3"]},"celery":{"type":"string","enum":["0","1","2","3"]},"oats":{"type":"string","enum":["0","1","2","3"]},"seeds":{"type":"string","enum":["0","1","2","3"]},"rye":{"type":"string","enum":["0","1","2","3"]},"soy":{"type":"string","enum":["0","1","2","3"]},"pistachio_nuts":{"type":"string","enum":["0","1","2","3"]},"spelt":{"type":"string","enum":["0","1","2","3"]},"barley":{"type":"string","enum":["0","1","2","3"]},"corn":{"type":"string","enum":["0","1","2","3"]},"walnuts":{"type":"string","enum":["0","1","2","3"]},"nut":{"type":"string","enum":["0","1","2","3"]},"brazil_nuts":{"type":"string","enum":["0","1","2","3"]},"pecan_nuts":{"type":"string","enum":["0","1","2","3"]},"macadamia_nuts":{"type":"string","enum":["0","1","2","3"]},"sunflower_seeds":{"type":"string","enum":["0","1","2","3"]},"almonds":{"type":"string","enum":["0","1","2","3"]},"cashews":{"type":"string","enum":["0","1","2","3"]}}},"additional_info":{"type":"object","properties":{"kosher":{"type":"boolean","default":false},"halal":{"type":"boolean","default":false},"vegetarian":{"type":"boolean","default":false},"vegan":{"type":"boolean","default":false},"genetic_modified":{"type":"boolean","default":false},"pigmeat":{"type":"boolean","description":"Pork.","default":false},"poultry_meat":{"type":"boolean","default":false},"beef":{"type":"boolean","default":false},"lamb":{"type":"boolean","default":false},"caffeine":{"type":"boolean","default":false},"alcohol":{"type":"boolean","default":false},"carrot":{"type":"boolean","default":false},"cacao":{"type":"boolean","default":false},"sulphur":{"type":"boolean","default":false},"coriander":{"type":"boolean","default":false},"sweetener":{"type":"boolean","default":false},"flavor_enhancer":{"type":"boolean","default":false},"preservative":{"type":"boolean","default":false},"antioxidant":{"type":"boolean","default":false},"coloring":{"type":"boolean","default":false},"phosphate":{"type":"boolean","default":false},"glutamate":{"type":"boolean","default":false},"blackened":{"type":"boolean","default":false},"nitrates":{"type":"boolean","default":false},"benzoates":{"type":"boolean","default":false},"taurine":{"type":"boolean","default":false},"quinine":{"type":"boolean","default":false},"sorbates":{"type":"boolean","default":false},"propionates":{"type":"boolean","default":false},"aspartame_e951":{"type":"boolean","default":false},"acesulfame_e962":{"type":"boolean","default":false}}},"nutrition_info":{"type":"object","properties":{"for_weight_qty":{"type":"number","default":100,"format":"float"},"for_weight_unit":{"type":"string","default":"g","enum":["mg","g","kg","lb","oz","ml","cl","dl","l","tbsp (US)","tbsp (UK)","tsp (US)","tsp (UK)","cup (US)","cup (UK)","fl oz (US)","fl oz (UK)","pt (US)","pt (UK)","gal (US)","gal (UK)","qt (US)","qt (UK)"]},"energy_kj":{"type":"number","format":"float"},"energy_kcal":{"type":"number","format":"float"},"fat":{"type":"number","format":"float"},"trans_fatty_acids":{"type":"number","format":"float"},"saturates":{"type":"number","format":"float"},"mono_unsaturates":{"type":"number","format":"float"},"polyunsaturates":{"type":"number","format":"float"},"carbohydrate":{"type":"number","format":"float"},"sugars":{"type":"number","format":"float"},"polyols":{"type":"number","format":"float"},"starch":{"type":"number","format":"float"},"fibre":{"type":"number","format":"float"},"protein":{"type":"number","format":"float"},"animal_protein":{"type":"number","format":"float"},"plants_protein":{"type":"number","format":"float"},"salt":{"type":"number","format":"float"},"sodium":{"type":"number","format":"float"},"vitamin_a":{"type":"number","format":"float"},"vitamin_d":{"type":"number","format":"float"},"vitamin_e":{"type":"number","format":"float"},"vitamin_k":{"type":"number","format":"float"},"vitamin_c":{"type":"number","format":"float"},"thiamin":{"type":"number","format":"float"},"riboflavin":{"type":"number","format":"float"},"niacin":{"type":"number","format":"float"},"vitamin_b6":{"type":"number","format":"float"},"folic_acid":{"type":"number","format":"float"},"vitamin_b12":{"type":"number","format":"float"},"biotin":{"type":"number","format":"float"},"pantothenic_acid":{"type":"number","format":"float"},"potassium":{"type":"number","format":"float"},"chloride":{"type":"number","format":"float"},"calcium":{"type":"number","format":"float"},"phosphorus":{"type":"number","format":"float"},"magnesium":{"type":"number","format":"float"},"iron":{"type":"number","format":"float"},"zinc":{"type":"number","format":"float"},"copper":{"type":"number","format":"float"},"manganese":{"type":"number","format":"float"},"fluoride":{"type":"number","format":"float"},"selenium":{"type":"number","format":"float"},"chromium":{"type":"number","format":"float"},"molybdenum":{"type":"number","format":"float"},"iodine":{"type":"number","format":"float"},"water":{"type":"number","format":"float"},"added_sugar":{"type":"number","format":"float"},"cholesterol":{"type":"number","format":"float"},"choline":{"type":"number","format":"float"}}},"images":{"type":"array","description":"An array of image IDs. If not picked, the main image will be the first element in this list.","items":{"type":"string"}},"main_image":{"type":"string","description":"An image's ID."},"carbon_footprint":{"type":"object","properties":{"co2eq_farm_to_farmgate_kg":{"type":"number","format":"double","description":"CO₂ equivalent (kg) from farm to farm gate only. Optional; for reporting and calculations use co2eq_cradle_to_gate_kg."},"co2eq_cradle_to_gate_kg":{"type":"number","format":"double","description":"CO₂ equivalent (kg) from cradle to gate. Use this field for the ingredient's main carbon footprint value used in emissions reporting and product carbon footprint."},"land_m2":{"type":"number","format":"double"},"water_m3":{"type":"number","format":"double"},"ecolabels":{"type":"array","description":"ecolabels are a list of eco label titles in slug case. For example: \"4C Association\" is the title in our UI, but in the API, it is called \"4c-association\".","items":{"type":"string"}},"protein_source":{"type":"string","enum":["UNKNOWN","PLANT_BASED","ANIMAL_BASED","MIXED"]},"country_of_origin":{"type":"string","description":"Abbreviation. Example: DE"}}},"stock_variants":{"type":"array","description":"An array of ingredient IDs","items":{"type":"string"}}}},"examples":{"Simple example":{"value":{"name":"Wheat flour soft","short_name":"Wheat flour","internal_uid":"W-1000","external_uid":"","composition":"Wheat","description":"Some free text description goes here","brand":"Mama Donna","category":"Flour","subcategory":"With gluten","article_type":"Food","storage_instructions":"Store in a cool, dry place","shelf_life":365,"approved":true,"allergen_verified":true,"custom_fields":[{"name":"Accounting Category","value":"Food"},{"name":"Free Text Field","value":"This is a custom field"},{"name":"Multi Choice Field","value":["Choice 1","Choice 3"]}],"allergens":{"lupine":0,"fish":0,"poppy_seeds":0,"hazelnuts":0,"sulfites":0,"kamut":0,"mollusc":0,"legume_pulse":0,"wheat":1,"shellfish":0,"mustard":0,"sesame":0,"celery":0,"oats":0,"seeds":0,"rye":0,"soy":0,"pistachio_nuts":0,"milk_dairy":0,"peanut":0,"spelt":0,"egg":0,"barley":0,"gluten":0,"lactose":0,"corn":0,"walnuts":0,"nut":0,"brazil_nuts":0,"pecan_nuts":0,"macadamia_nuts":0,"sunflower_seeds":0,"almonds":0,"cashews":0},"additional_info":{"aspartame_e951":false,"phosphate":false,"kosher":false,"genetic_modified":false,"pigmeat":false,"sulphur":false,"cacao":false,"poultry_meat":false,"vegetarian":true,"coriander":false,"flavor_enhancer":false,"glutamate":false,"beef":false,"blackened":false,"nitrates":false,"lamb":false,"benzoates":false,"vegan":true,"taurine":false,"propionates":false,"acesulfame_e962":false,"coloring":false,"quinine":false,"sorbates":false,"preservative":false,"antioxidant":false,"sweetener":false,"carrot":false,"alcohol":false,"caffeine":false,"halal":false},"nutrition_info":{"for_weight_qty":"100","for_weight_unit":"g","energy_kj":null,"energy_kcal":364,"fat":1,"trans_fatty_acids":null,"saturates":null,"mono_unsaturates":null,"polyunsaturates":null,"carbohydrate":76,"sugars":0.3,"polyols":null,"starch":null,"fibre":null,"protein":10,"animal_protein":null,"plants_protein":null,"salt":null,"sodium":2,"vitamin_a":null,"vitamin_d":null,"vitamin_e":null,"vitamin_k":null,"vitamin_c":null,"thiamin":null,"riboflavin":null,"niacin":null,"vitamin_b6":null,"folic_acid":null,"vitamin_b12":null,"biotin":null,"pantothenic_acid":null,"potassium":107,"chloride":null,"calcium":null,"phosphorus":null,"magnesium":null,"iron":null,"zinc":null,"copper":null,"manganese":null,"fluoride":null,"selenium":null,"chromium":null,"molybdenum":null,"iodine":null,"water":null},"images":["181566068410002"],"outlets":["729100119160000","629100261280001"],"preferred_uoms":["g","kg"],"carbon_footprint":{"co2eq_cradle_to_gate_kg":50,"co2eq_farm_to_farmgate_kg":30,"ecolabels":["example-ecolabel","example-ecolabel-2"],"land_m2":50,"water_m3":50,"country_of_origin":"DE"},"stock_variants":["864356518032007"]}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"instance\": \"https://app.apicbase.com/api/v1/products/ingredients/264696398000008/\"\n}"}},"schema":{"type":"object","properties":{"instance":{"type":"string","example":"https://app.apicbase.com/api/v1/products/ingredients/264696398000008/"}}}}}}},"deprecated":false}},"/products/ingredients/{ingredient_id}/":{"get":{"summary":"Get Ingredient Details","description":"Returns information about a specific ingredient.","operationId":"get-ingredient-details","parameters":[{"name":"ingredient_id","in":"path","description":"An ingredient's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"name\": \"Milk Whole\",\n  \"id\": \"264556747770006\",\n  \"description\": \"More information about the ingredient.\",\n  \"subcategory\": \"Milk\",\n  \"category\": \"Dairy\",\n  \"url\": \"https://app.apicbase.com/api/v2/products/ingredients/264556747770006/\",\n  \"brand\": \"Happy Cow Products\",\n  \"supplier_article_number\": \"100020\",\n  \"external_uid\": \"123456\",\n  \"created_date\": \"2020-06-16T15:48:40Z\",\n  \"conversion_ratio\": \"1.0000\",\n  \"images\": [],\n  \"composition\": \"Some information goes here.\",\n  \"web_page\": \"https://app.apicbase.com/library/ingredient/655774/\",\n  \"article_type\": \"\",\n  \"accounting_category\": \"Beverage\",\n  \"in_use\": false,\n  \"main_image\": null,\n  \"internal_uid\": \"444444\",\n  \"created_by\": \"john.doe@gmail.com\",\n  \"archived_on\": null,\n  \"archived\": false,\n  \"preferred_uoms\": null,\n  \"main_stock_items\": [\n    {\n      \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/521794758100007/\"\n    },\n    {\n      \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/121794868100003/\"\n    },\n    {\n      \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421794978110009/\"\n    }\n  ],\n  \"storage_instructions\": \"Don't let it stay out too long\",\n  \"modified_date\": \"2024-06-24T19:24:24Z\",\n  \"custom_fields\": [\n    {\n      \"name\": \"Multi Choice Field\",\n      \"value\": [\n        \"Choice 1\",\n        \"Choice 3\"\n      ]\n    },\n    {\n      \"name\": \"Free Text Field\",\n      \"value\": \"I type this freely\"\n    }\n  ],\n  \"approved\": true,\n  \"allergens\": {\n    \"rye\": \"DOES_NOT_CONTAIN\",\n    \"celery\": \"DOES_NOT_CONTAIN\",\n    \"almonds\": \"DOES_NOT_CONTAIN\",\n    \"fish\": \"DOES_NOT_CONTAIN\",\n    \"lactose\": \"CONTAINS\",\n    \"seeds\": \"DOES_NOT_CONTAIN\",\n    \"mollusc\": \"DOES_NOT_CONTAIN\",\n    \"poppy_seeds\": \"DOES_NOT_CONTAIN\",\n    \"mustard\": \"DOES_NOT_CONTAIN\",\n    \"lupine\": \"DOES_NOT_CONTAIN\",\n    \"oats\": \"DOES_NOT_CONTAIN\",\n    \"milk_dairy\": \"CONTAINS\",\n    \"corn\": \"DOES_NOT_CONTAIN\",\n    \"cashews\": \"DOES_NOT_CONTAIN\",\n    \"shellfish\": \"DOES_NOT_CONTAIN\",\n    \"sunflower_seeds\": \"DOES_NOT_CONTAIN\",\n    \"legume_pulse\": \"DOES_NOT_CONTAIN\",\n    \"macadamia_nuts\": \"DOES_NOT_CONTAIN\",\n    \"brazil_nuts\": \"DOES_NOT_CONTAIN\",\n    \"nut\": \"DOES_NOT_CONTAIN\",\n    \"egg\": \"DOES_NOT_CONTAIN\",\n    \"gluten\": \"DOES_NOT_CONTAIN\",\n    \"pistachio_nuts\": \"DOES_NOT_CONTAIN\",\n    \"hazelnuts\": \"DOES_NOT_CONTAIN\",\n    \"soy\": \"DOES_NOT_CONTAIN\",\n    \"sesame\": \"DOES_NOT_CONTAIN\",\n    \"kamut\": \"DOES_NOT_CONTAIN\",\n    \"walnuts\": \"DOES_NOT_CONTAIN\",\n    \"peanut\": \"DOES_NOT_CONTAIN\",\n    \"barley\": \"DOES_NOT_CONTAIN\",\n    \"sulfites\": \"DOES_NOT_CONTAIN\",\n    \"pecan_nuts\": \"DOES_NOT_CONTAIN\",\n    \"wheat\": \"DOES_NOT_CONTAIN\",\n    \"spelt\": \"DOES_NOT_CONTAIN\",\n    \"sulfites_ppm\": \"DOES_NOT_CONTAIN\"\n  },\n  \"name_translations\": {\n    \"en\": \"Milk Whole\",\n    \"es\": \"Leche integral\",\n    \"fr\": \"Lait entier\",\n    \"hu\": \"Milk Whole\"\n  },\n  \"description_translations\": {\n    \"en\": \"More information about the ingredient.\",\n    \"es\": \"Información sobre este ingrediente\",\n    \"hu\": \"More information about the ingredient.\"\n  },\n  \"storage_instructions_translations\": {\n    \"hu\": \"Don't let it stay out too long\",\n    \"en\": \"Don't let it stay out too long\",\n    \"es\": \"No dejes que se quede fuera de la nevera mucho tiempo.\"\n  },\n  \"composition_translations\": {\n    \"hu\": \"Some information goes here.\",\n    \"en\": \"Some information goes here.\"\n  },\n  \"suppliers\": [\n    {\n      \"url\": \"https://app.apicbase.com/api/v2/suppliers/325220129010007/\",\n      \"first_name\": \"Matthew\",\n      \"id\": \"325220129010007\",\n      \"company_name\": \"Happy Cow Products\",\n      \"last_name\": \"Smith\",\n      \"internal_supplier_outlet_id\": null\n    }\n  ],\n  \"shelf_life_translations\": {\n    \"en\": \"3 months\",\n    \"es\": \"3 meses\",\n    \"fr\": \"3 mois\",\n    \"hu\": \"3 months\"\n  },\n  \"used_in_recipes\": [\n    \"https://app.apicbase.com/api/v2/products/recipes/549173754990004/\"\n  ],\n  \"short_name\": \"Milk\",\n  \"outlets\": [\n    \"https://app.apicbase.com/api/v2/accounts/outlets/229100415400002/\"\n  ],\n  \"allergen_verified\": false,\n  \"short_name_translations\": {\n    \"en\": \"Milk\",\n    \"es\": \"Leche\",\n    \"fr\": \"Lait\",\n    \"hu\": \"Milk\"\n  },\n  \"nutrition_info\": {\n    \"for_weight_qty\": \"100.0000\",\n    \"for_weight_unit\": \"g\",\n    \"energy_kj\": null,\n    \"energy_kcal\": null,\n    \"fat\": null,\n    \"trans_fatty_acids\": null,\n    \"saturates\": null,\n    \"mono_unsaturates\": null,\n    \"polyunsaturates\": null,\n    \"carbohydrate\": null,\n    \"sugars\": null,\n    \"polyols\": null,\n    \"starch\": null,\n    \"fibre\": null,\n    \"protein\": null,\n    \"animal_protein\": null,\n    \"plants_protein\": null,\n    \"salt\": null,\n    \"sodium\": null,\n    \"vitamin_a\": null,\n    \"vitamin_d\": null,\n    \"vitamin_e\": null,\n    \"vitamin_k\": null,\n    \"vitamin_c\": null,\n    \"thiamin\": null,\n    \"riboflavin\": null,\n    \"niacin\": null,\n    \"vitamin_b6\": null,\n    \"folic_acid\": null,\n    \"vitamin_b12\": null,\n    \"biotin\": null,\n    \"pantothenic_acid\": null,\n    \"potassium\": null,\n    \"chloride\": null,\n    \"calcium\": null,\n    \"phosphorus\": null,\n    \"magnesium\": null,\n    \"iron\": null,\n    \"zinc\": null,\n    \"copper\": null,\n    \"manganese\": null,\n    \"fluoride\": null,\n    \"selenium\": null,\n    \"chromium\": null,\n    \"molybdenum\": null,\n    \"iodine\": null,\n    \"water\": null,\n    \"added_sugar\": null,\n    \"cholesterol\": null,\n    \"choline\": null\n  },\n  \"additional_info\": {\n    \"carrot\": false,\n    \"propionates\": false,\n    \"nitrates\": false,\n    \"preservative\": false,\n    \"taurine\": false,\n    \"poultry_meat\": false,\n    \"coriander\": false,\n    \"flavor_enhancer\": false,\n    \"vegetarian\": false,\n    \"benzoates\": false,\n    \"glutamate\": false,\n    \"antioxidant\": false,\n    \"caffeine\": false,\n    \"quinine\": false,\n    \"sorbates\": false,\n    \"halal\": false,\n    \"kosher\": false,\n    \"acesulfame_e962\": false,\n    \"sulphur\": false,\n    \"blackened\": false,\n    \"vegan\": false,\n    \"alcohol\": false,\n    \"genetic_modified\": false,\n    \"sweetener\": false,\n    \"aspartame_e951\": false,\n    \"coloring\": false,\n    \"beef\": false,\n    \"cacao\": false,\n    \"pigmeat\": false,\n    \"lamb\": false,\n    \"phosphate\": false\n  },\n  \"shelf_life\": \"3 months\",\n  \"carbon_footprint\": {\n    \"co2eq_cradle_to_gate_kg\": 50.0,\n    \"co2eq_farm_to_farmgate_kg\": 30.0,\n    \"ecolabels\": [\n      \"example-ecolabel\",\n      \"example-ecolabel-2\"\n    ],\n    \"land_m2\": 50.0,\n    \"water_m3\": 50.0,\n    \"country_of_origin\": \"DE\"\n  },\n  \"stock_variants\": [\n    {\n      \"id\": \"664176283180004\",\n      \"url\": \"https://app.apicbase.com/api/v2/products/ingredients/664176283180004/\",\n      \"name\": \"Milk 0% Fat\"\n    }\n  ],\n}"}}}}}},"deprecated":false},"patch":{"summary":"Edit Ingredient","description":"Edits an existing ingredient.","operationId":"edit-ingredient","parameters":[{"name":"ingredient_id","in":"path","description":"An ingredient's ID","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"short_name":{"type":"string"},"approved":{"type":"boolean"},"allergen_verified":{"type":"boolean"},"archived":{"type":"boolean","description":"If true, the ingredient is archived; if false, it is unarchived. If omitted, the current archive state is preserved."},"custom_fields":{"type":"string","format":"json"},"preferred_uoms":{"type":"array","items":{"type":"string"}},"conversion_ratio":{"type":"number","format":"float"},"internal_uid":{"type":"string","description":"Internal ID in the user interface. Uniqueness is enforced in this field."},"external_uid":{"type":"string","description":"External ID in the user interface."},"composition":{"type":"string"},"description":{"type":"string"},"brand":{"type":"string"},"category":{"type":"string"},"subcategory":{"type":"string"},"accounting_category":{"type":"string"},"storage_instructions":{"type":"string"},"shelf_life":{"type":"string"},"allergens":{"type":"object","properties":{"fish":{"type":"string","enum":["0","1","2","3"]},"milk_dairy":{"type":"string","enum":["0","1","2","3"]},"gluten":{"type":"string","enum":["0","1","2","3"]},"lactose":{"type":"string","enum":["0","1","2","3"]},"egg":{"type":"string","enum":["0","1","2","3"]},"peanut":{"type":"string","enum":["0","1","2","3"]},"lupine":{"type":"string","enum":["0","1","2","3"]},"poppy_seeds":{"type":"string","enum":["0","1","2","3"]},"hazelnuts":{"type":"string","enum":["0","1","2","3"]},"sulfites":{"type":"string","enum":["0","1","2","3"]},"kamut":{"type":"string","enum":["0","1","2","3"]},"mollusc":{"type":"string","enum":["0","1","2","3"]},"legume_pulse":{"type":"string","enum":["0","1","2","3"]},"wheat":{"type":"string","enum":["0","1","2","3"]},"shellfish":{"type":"string","enum":["0","1","2","3"]},"mustard":{"type":"string","enum":["0","1","2","3"]},"sesame":{"type":"string","enum":["0","1","2","3"]},"celery":{"type":"string","enum":["0","1","2","3"]},"oats":{"type":"string","enum":["0","1","2","3"]},"seeds":{"type":"string","enum":["0","1","2","3"]},"rye":{"type":"string","enum":["0","1","2","3"]},"soy":{"type":"string","enum":["0","1","2","3"]},"pistachio_nuts":{"type":"string","enum":["0","1","2","3"]},"spelt":{"type":"string","enum":["0","1","2","3"]},"barley":{"type":"string","enum":["0","1","2","3"]},"corn":{"type":"string","enum":["0","1","2","3"]},"walnuts":{"type":"string","enum":["0","1","2","3"]},"nut":{"type":"string","enum":["0","1","2","3"]},"brazil_nuts":{"type":"string","enum":["0","1","2","3"]},"pecan_nuts":{"type":"string","enum":["0","1","2","3"]},"macadamia_nuts":{"type":"string","enum":["0","1","2","3"]},"sunflower_seeds":{"type":"string","enum":["0","1","2","3"]},"almonds":{"type":"string","enum":["0","1","2","3"]},"cashews":{"type":"string","enum":["0","1","2","3"]}}},"additional_info":{"type":"object","properties":{"kosher":{"type":"boolean","default":false},"halal":{"type":"boolean","default":false},"vegetarian":{"type":"boolean","default":false},"vegan":{"type":"boolean","default":false},"genetic_modified":{"type":"boolean","default":false},"pigmeat":{"type":"boolean","description":"Pork.","default":false},"poultry_meat":{"type":"boolean","default":false},"beef":{"type":"boolean","default":false},"lamb":{"type":"boolean","default":false},"caffeine":{"type":"boolean","default":false},"alcohol":{"type":"boolean","default":false},"carrot":{"type":"boolean","default":false},"cacao":{"type":"boolean","default":false},"sulphur":{"type":"boolean","default":false},"coriander":{"type":"boolean","default":false},"sweetener":{"type":"boolean","default":false},"flavor_enhancer":{"type":"boolean","default":false},"preservative":{"type":"boolean","default":false},"antioxidant":{"type":"boolean","default":false},"coloring":{"type":"boolean","default":false},"phosphate":{"type":"boolean","default":false},"glutamate":{"type":"boolean","default":false},"blackened":{"type":"boolean","default":false},"nitrates":{"type":"boolean","default":false},"benzoates":{"type":"boolean","default":false},"taurine":{"type":"boolean","default":false},"quinine":{"type":"boolean","default":false},"sorbates":{"type":"boolean","default":false},"propionates":{"type":"boolean","default":false},"aspartame_e951":{"type":"boolean","default":false},"acesulfame_e962":{"type":"boolean","default":false}}},"nutrition_info":{"type":"object","properties":{"for_weight_qty":{"type":"number","default":100,"format":"float"},"for_weight_unit":{"type":"string","default":"g","enum":["mg","g","kg","lb","oz","ml","cl","dl","l","tbsp (US)","tbsp (UK)","tsp (US)","tsp (UK)","cup (US)","cup (UK)","fl oz (US)","fl oz (UK)","pt (US)","pt (UK)","gal (US)","gal (UK)","qt (US)","qt (UK)"]},"energy_kg":{"type":"number","format":"float"},"energy_kcal":{"type":"number","format":"float"},"fat":{"type":"number","format":"float"},"trans_fatty_acids":{"type":"number","format":"float"},"saturates":{"type":"number","format":"float"},"mono_unsaturates":{"type":"number","format":"float"},"polyunsaturates":{"type":"number","format":"float"},"carbohydrate":{"type":"number","format":"float"},"sugars":{"type":"number","format":"float"},"polyols":{"type":"number","format":"float"},"starch":{"type":"number","format":"float"},"fibre":{"type":"number","format":"float"},"protein":{"type":"number","format":"float"},"animal_protein":{"type":"number","format":"float"},"plants_protein":{"type":"number","format":"float"},"salt":{"type":"number","format":"float"},"sodium":{"type":"number","format":"float"},"vitamin_a":{"type":"number","format":"float"},"vitamin_d":{"type":"number","format":"float"},"vitamin_e":{"type":"number","format":"float"},"vitamin_k":{"type":"number","format":"float"},"vitamin_c":{"type":"number","format":"float"},"thiamin":{"type":"number","format":"float"},"riboflavin":{"type":"number","format":"float"},"niacin":{"type":"number","format":"float"},"vitamin_b6":{"type":"number","format":"float"},"folic_acid":{"type":"number","format":"float"},"vitamin_b12":{"type":"number","format":"float"},"biotin":{"type":"number","format":"float"},"pantothenic_acid":{"type":"number","format":"float"},"potassium":{"type":"number","format":"float"},"chloride":{"type":"number","format":"float"},"calcium":{"type":"number","format":"float"},"phosphorus":{"type":"number","format":"float"},"magnesium":{"type":"number","format":"float"},"iron":{"type":"number","format":"float"},"zinc":{"type":"number","format":"float"},"copper":{"type":"number","format":"float"},"manganese":{"type":"number","format":"float"},"fluoride":{"type":"number","format":"float"},"selenium":{"type":"number","format":"float"},"chromium":{"type":"number","format":"float"},"molybdenum":{"type":"number","format":"float"},"iodine":{"type":"number","format":"float"},"water":{"type":"number","format":"float"},"added_sugar":{"type":"number","format":"float"},"cholesterol":{"type":"number","format":"float"},"choline":{"type":"number","format":"float"}}},"images":{"type":"array","description":"An array of image IDs.","items":{"type":"string"}},"main_image":{"type":"string","description":"An image's ID."},"carbon_footprint":{"type":"object","properties":{"co2eq_farm_to_farmgate_kg":{"type":"number","format":"double","description":"CO₂ equivalent (kg) from farm to farm gate only. Optional; for reporting and calculations use co2eq_cradle_to_gate_kg."},"co2eq_cradle_to_gate_kg":{"type":"number","format":"double","description":"CO₂ equivalent (kg) from cradle to gate. Use this field for the ingredient's main carbon footprint value used in emissions reporting and product carbon footprint."},"land_m2":{"type":"number","format":"double"},"water_m3":{"type":"number","format":"double"},"ecolabels":{"type":"array","description":"ecolabels are a list of eco label titles in slug case. For example: \"4C Association\" is the title in our UI, but in the API, it is called \"4c-association\".","items":{"type":"string"}},"protein_source":{"type":"string","enum":["UNKNOWN","PLANT_BASED","ANIMAL_BASED","MIXED"]},"country_of_origin":{"type":"string","description":"Abbreviation. Example: DE"}}},"stock_variants":{"type":"array","description":"An array of ingredient IDs.","items":{"type":"string"}}}},"examples":{"Request Example":{"value":{"name":"Wheat flour extra soft","description":"My new text description goes here"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"instance\": \"https://app.apicbase.com/api/v1/products/ingredients/264696398000008/\"\n}"}},"schema":{"type":"object","properties":{"instance":{"type":"string","example":"https://app.apicbase.com/api/v1/products/ingredients/264696398000008/"}}}}}}},"deprecated":false}},"/products/ingredients/{ingredient_id}/clone/":{"post":{"summary":"Clone Ingredient","description":"Creates a complete copy of an ingredient with a new name.","operationId":"clone-ingredient","parameters":[{"name":"ingredient_id","in":"path","description":"The ID of the ingredient to clone.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["new_name"],"properties":{"new_name":{"type":"string","description":"The name for the cloned ingredient. Required, must not be empty, maximum 300 characters.","maxLength":300}}},"examples":{"Request Example":{"value":{"new_name":"Cloned Tomato"}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":{"id":"149510716840007","url":"https://app.apicbase.com/api/v2/products/ingredients/149510716840007/"}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"149510716840007","description":"The ID of the newly created ingredient."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/ingredients/149510716840007/","description":"The URL of the newly created ingredient."}}}}}},"400":{"description":"Invalid or missing `new_name`."},"403":{"description":"User lacks edit permission."},"404":{"description":"Ingredient not found or not in user's library."}},"deprecated":false}},"/products/ingredients/merge/":{"post":{"summary":"Merge Ingredients","description":"Merges a source ingredient into a target ingredient. This operation will move or merge stock items from source to target ingredient, optionally update recipes to use the target ingredient, optionally archive the source ingredient, and create an audit log entry. Stock items with the same quantity and unit will have their supplier packages merged. Stock items with different quantities or units will be moved to the target ingredient.","operationId":"merge-ingredients","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["source_ingredient","target_ingredient"],"properties":{"source_ingredient":{"type":"string","description":"The ID of the ingredient to be merged (source)","example":"123456789012345"},"target_ingredient":{"type":"string","description":"The ID of the ingredient to merge into (target)","example":"987654321098765"},"archive_source_ingredient":{"type":"boolean","default":true,"description":"Whether to archive the source ingredient after merge","example":true},"update_recipes_to_use_target_ingredient":{"type":"boolean","default":true,"description":"Whether to update recipes to use the target ingredient after merge","example":true},"move_stock":{"type":"boolean","default":true,"description":"Whether to move stock items from source to target ingredient","example":true},"stock_items_to_merge":{"type":"array","items":{"type":"string"},"description":"Specific stock items to merge (if not provided, all stock items are merged)","example":["111111111111111","222222222222222"]},"stock_items_not_to_merge":{"type":"array","items":{"type":"string"},"description":"Stock items to exclude from merge","example":["333333333333333"]}}},"examples":{"minimal":{"summary":"Minimal merge request","value":{"source_ingredient":"123456789012345","target_ingredient":"987654321098765"}},"full":{"summary":"Full merge request with all options","value":{"source_ingredient":"123456789012345","target_ingredient":"987654321098765","archive_source_ingredient":true,"update_recipes_to_use_target_ingredient":true,"move_stock":true,"stock_items_to_merge":["111111111111111","222222222222222"]}},"no_archive":{"summary":"Merge without archiving source","value":{"source_ingredient":"123456789012345","target_ingredient":"987654321098765","archive_source_ingredient":false}},"selective_merge":{"summary":"Merge specific stock items only","value":{"source_ingredient":"123456789012345","target_ingredient":"987654321098765","stock_items_to_merge":["111111111111111"]}}}}}},"responses":{"201":{"description":"Ingredients successfully merged","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the merge","example":"123456789012345"},"source_ingredient":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the source ingredient","example":"123456789012345"},"name":{"type":"string","description":"The name of the source ingredient","example":"Organic Potatoes"}}},"target_ingredient":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the target ingredient","example":"987654321098765"},"name":{"type":"string","description":"The name of the target ingredient","example":"Regular Potatoes"}}}}},"examples":{"Result":{"value":{"id":"732410987654321","source_ingredient":{"id":"123456789012345","name":"Organic Potatoes"},"target_ingredient":{"id":"987654321098765","name":"Regular Potatoes"}}}}}}},"400":{"description":"Bad request - validation error","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"examples":{"same_ingredients":{"summary":"Source and target are the same","value":{"non_field_errors":["Source and target ingredients must be different"]}},"overlapping_stock_items":{"summary":"Stock item lists overlap","value":{"non_field_errors":["Stock items cannot be both included and excluded from merge: [111111111111111]"]}},"missing_required_field":{"summary":"Missing required field","value":{"source_ingredient":["This field is required."]}},"invalid_type":{"summary":"Invalid field type","value":{"source_ingredient":["A valid ID is required."]}}}}}},"403":{"description":"Forbidden - feature not enabled or user lacks edit permission on ingredients"},"404":{"description":"Not found - ingredient or stock items not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}},"examples":{"ingredient_not_found":{"summary":"Ingredient not found","value":{"message":"Ingredient not found"}},"stock_items_not_found":{"summary":"Stock items not found","value":{"message":"Stock items not found: [111111111111111, 222222222222222]"}}}}}},"409":{"description":"Conflict - a duplicate merge already exists or a portion stock item conflict was detected","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}},"examples":{"duplicate_merge":{"summary":"Active merge already exists for these ingredients","value":{"message":"Ingredient 123456789012345 has already been used in another active merge"}},"portion_stock_item_conflict":{"summary":"A portion stock item conflict was detected during merge","value":{"message":"A portion stock item conflict was detected during the merge"}}}}}}},"deprecated":false}},"/products/ingredients/merge/list/":{"get":{"summary":"List Ingredient Merges","description":"Retrieve a paginated list of merge operations for the library. Results can be filtered by source ingredient, target ingredient, user who performed the merge, and reverted status. Results are ordered by creation date (newest first).","operationId":"list-ingredient-merges","parameters":[{"name":"source_ingredient","in":"query","description":"Filter by source ingredient ID","schema":{"type":"string"},"example":"712345678901234"},{"name":"target_ingredient","in":"query","description":"Filter by target ingredient ID","schema":{"type":"string"},"example":"722345678901234"},{"name":"user","in":"query","description":"Filter by user ID who performed the merge","schema":{"type":"string"},"example":"502345678901234"},{"name":"reverted","in":"query","description":"Filter by reverted status (true for reverted merges, false for active merges)","schema":{"type":"boolean"},"example":false},{"name":"ordering","in":"query","description":"Order results by specified fields. Prefix with '-' for descending order.","schema":{"type":"string","enum":["created_at","-created_at"]},"example":"-created_at"},{"name":"page","in":"query","description":"Page number for pagination","schema":{"type":"integer","default":1,"minimum":1},"example":1},{"name":"page_size","in":"query","description":"Number of results per page (max 200)","schema":{"type":"integer","default":20,"minimum":1,"maximum":200},"example":20}],"responses":{"200":{"description":"Ingredient merge history retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of results across all pages","example":2},"next":{"type":"string","format":"uri","nullable":true,"description":"URL to the next page of results, or null if no next page exists","example":null},"previous":{"type":"string","format":"uri","nullable":true,"description":"URL to the previous page of results, or null if no previous page exists","example":null},"results":{"type":"array","description":"List of merge operations for the current page","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the merge record","example":"732410987654321"},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the merge was created (UTC)","example":"2025-10-21T14:30:00Z"},"source_ingredient":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the ingredient","example":"712345678901234"},"name":{"type":"string","description":"The ingredient name translated to the requesting user's preferred language where available","example":"Sustainably Farmed Salmon"},"web_page":{"type":"string","format":"uri","description":"Public URL of the ingredient detail page","example":"https://app.apicbase.com/ingredients/712345678901234/"}},"required":["id","name","web_page"]},"target_ingredient":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the ingredient","example":"722345678901234"},"name":{"type":"string","description":"The ingredient name translated to the requesting user's preferred language where available","example":"Atlantic Salmon Fillet"},"web_page":{"type":"string","format":"uri","description":"Public URL of the ingredient detail page","example":"https://app.apicbase.com/ingredients/722345678901234/"}},"required":["id","name","web_page"]},"user":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the user who performed the merge","example":"502345678901234"},"name":{"type":"string","description":"Full name of the user who performed the merge","example":"Maria Gonzalez"}},"required":["id","name"]},"reverted":{"type":"boolean","description":"Whether the merge has been reverted","example":false},"reverted_at":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the merge was reverted (UTC)","example":null}},"required":["id","created_at","source_ingredient","target_ingredient","user","reverted","reverted_at"]}}},"required":["count","next","previous","results"]},"examples":{"paginated":{"summary":"Paginated response with multiple merge entries","value":{"count":2,"next":null,"previous":null,"results":[{"id":"732410987654321","created_at":"2025-10-21T14:30:00Z","source_ingredient":{"id":"712345678901234","name":"Sustainably Farmed Salmon","web_page":"https://app.apicbase.com/ingredients/712345678901234/"},"target_ingredient":{"id":"722345678901234","name":"Atlantic Salmon Fillet","web_page":"https://app.apicbase.com/ingredients/722345678901234/"},"user":{"id":"502345678901234","name":"Maria Gonzalez"},"reverted":false,"reverted_at":null},{"id":"845612389076543","created_at":"2025-09-10T08:15:00Z","source_ingredient":{"id":"733456789012345","name":"Organic Cane Sugar","web_page":"https://app.apicbase.com/ingredients/733456789012345/"},"target_ingredient":{"id":"744567890123456","name":"Cane Sugar","web_page":"https://app.apicbase.com/ingredients/744567890123456/"},"user":{"id":"512345678901234","name":"Alex Smith"},"reverted":true,"reverted_at":"2025-10-22T10:00:00Z"}]}},"filtered_by_source":{"summary":"Filtered by source ingredient","value":{"count":1,"next":null,"previous":null,"results":[{"id":"732410987654321","created_at":"2025-10-21T14:30:00Z","source_ingredient":{"id":"712345678901234","name":"Sustainably Farmed Salmon","web_page":"https://app.apicbase.com/ingredients/712345678901234/"},"target_ingredient":{"id":"722345678901234","name":"Atlantic Salmon Fillet","web_page":"https://app.apicbase.com/ingredients/722345678901234/"},"user":{"id":"502345678901234","name":"Maria Gonzalez"},"reverted":false,"reverted_at":null}]}},"filtered_by_reverted":{"summary":"Filtered to show only active (non-reverted) merges","value":{"count":1,"next":null,"previous":null,"results":[{"id":"732410987654321","created_at":"2025-10-21T14:30:00Z","source_ingredient":{"id":"712345678901234","name":"Sustainably Farmed Salmon","web_page":"https://app.apicbase.com/ingredients/712345678901234/"},"target_ingredient":{"id":"722345678901234","name":"Atlantic Salmon Fillet","web_page":"https://app.apicbase.com/ingredients/722345678901234/"},"user":{"id":"502345678901234","name":"Maria Gonzalez"},"reverted":false,"reverted_at":null}]}}}}}},"403":{"description":"Forbidden - feature not enabled or user lacks view permission on ingredients"}},"deprecated":false}},"/products/ingredients/merge/{ingredient_merge_id}/revert/":{"post":{"summary":"Revert Ingredient Merge","description":"Reverts a previously completed ingredient merge. This operation will move recipes back from target to source ingredient, unarchive the source ingredient, revert stock changes (optional), and mark the merge as reverted.","operationId":"revert-ingredient-merge","parameters":[{"name":"ingredient_merge_id","in":"path","required":true,"description":"The ID of the merge record to revert","schema":{"type":"string"},"example":"732410987654321"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"unarchive_source_ingredient":{"type":"boolean","default":true,"description":"Whether to unarchive the source ingredient"},"move_back_source_ingredient_to_recipes":{"type":"boolean","default":true,"description":"Whether to move recipes back to the source ingredient"},"revert_stock":{"type":"boolean","default":true,"description":"Whether to revert stock quantities to their pre-merge state"}}},"examples":{"default":{"summary":"Default revert (everything)","value":{"unarchive_source_ingredient":true,"move_back_source_ingredient_to_recipes":true,"revert_stock":true}},"no_stock_revert":{"summary":"Revert recipes and unarchive only","value":{"revert_stock":false}}}}}},"responses":{"204":{"description":"Merge successfully reverted"},"403":{"description":"Forbidden - feature not enabled or user lacks edit permission on ingredients"},"404":{"description":"Not found - merge record not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}},"examples":{"merge_not_found":{"summary":"Merge record not found","value":{"message":"No merge record found."}}}}}},"409":{"description":"Conflict - merge has already been reverted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}},"examples":{"already_reverted":{"summary":"Merge already reverted","value":{"message":"Merge with ID 732410987654321 has already been reverted"}}}}}}},"deprecated":false}},"/products/menus/":{"get":{"summary":"Get Menus","description":"Returns a list of menus in the library.","operationId":"get-menus","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"name","in":"query","description":"A menu name to query on.","schema":{"type":"string"}},{"name":"uid","in":"query","description":"A UID (unique menu ID) to filter on.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Query the contents of the description field.","schema":{"type":"string"}},{"name":"created_by","in":"query","description":"A user ID.","schema":{"type":"string"}},{"name":"created_date","in":"query","description":"Filter on a creation date (exact).","schema":{"type":"string","format":"date"}},{"name":"created_date__gt","in":"query","description":"Filter on a creation date (greater than).","schema":{"type":"string","format":"date"}},{"name":"created_date__lt","in":"query","description":"Filter on a creation date (lower than).","schema":{"type":"string","format":"date"}},{"name":"modified_date","in":"query","description":"Filter on a modification date (exact).","schema":{"type":"string","format":"date"}},{"name":"modified_date__gt","in":"query","description":"Filter on a modification date (greater than).","schema":{"type":"string","format":"date"}},{"name":"modified_date__lt","in":"query","description":"Filter on a modification date (lower than).","schema":{"type":"string","format":"date"}},{"name":"starting_date","in":"query","description":"Filter on a menu start date (exact)","schema":{"type":"string","format":"date"}},{"name":"starting_date__gt","in":"query","description":"Filter on a menu start date (greater than)","schema":{"type":"string","format":"date"}},{"name":"starting_date__lt","in":"query","description":"Filter on a menu start date (lower than)","schema":{"type":"string","format":"date"}},{"name":"ending_date","in":"query","description":"Filter on a menu end date (exact)","schema":{"type":"string","format":"date"}},{"name":"ending_date__gt","in":"query","description":"Filter on a menu end date (greater than)","schema":{"type":"string","format":"date"}},{"name":"ending_date__lt","in":"query","description":"Filter on a menu end date (lower than)","schema":{"type":"string","format":"date"}},{"name":"current_sell_price","in":"query","description":"Filter on a sell price (exact)","schema":{"type":"number","format":"float"}},{"name":"current_sell_price__gt","in":"query","description":"Filter on a sell price (greater than)","schema":{"type":"number","format":"float"}},{"name":"current_sell_price__lt","in":"query","description":"Filter on a sell price (lower than)","schema":{"type":"number","format":"float"}},{"name":"vat","in":"query","description":"Filter on a tax rate.","schema":{"type":"number","format":"float"}},{"name":"vat__gt","in":"query","description":"Filter on a tax rate (greater than).","schema":{"type":"number","format":"float"}},{"name":"vat__lt","in":"query","description":"Filter on a tax rate (lower than).","schema":{"type":"number","format":"float"}},{"name":"custom_fields","in":"query","description":"Filter on custom fields. Check reference guide for details.","schema":{"type":"string","format":"json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n    \"url\": \"https://app.apicbase.com/api/v1/products/menus/390400735470004/\",\n    \"id\": \"390400735470004\",\n    \"name\": \"Spaghetti Special Menu\",\n    \"uid\": \"1000\",\n    \"web_page\": \"https://app.apicbase.com/library/menu/4453/\",\n    \"description\": \"A menu for all tastes.\",\n    \"created_date\": \"2020-06-17T11:54:31.484550+02:00\",\n    \"created_by\": \"thiago@apicbase.com\",\n    \"modified_date\": \"2020-06-17T11:55:36.303100+02:00\",\n    \"courses\": [\n        {\n            \"name\": \"Main Course\",\n            \"recipes\": [\n                \"https://app.apicbase.com/api/v1/products/recipes/349980442190000/\",\n                \"https://app.apicbase.com/api/v1/products/recipes/749980262120005/\"\n            ],\n            \"index\": 0\n        },\n        {\n            \"name\": \"Dessert\",\n            \"recipes\": [\n                \"https://app.apicbase.com/api/v1/products/recipes/549980272150003/\"\n            ],\n            \"index\": 1\n        }\n    ],\n    \"cycle_year\": null,\n    \"cycle_week\": null,\n    \"cycle_day\": null,\n    \"starting_date\": \"2020-06-01\",\n    \"ending_date\": \"2020-08-31\",\n    \"time_of_day\": \"12:00:00\",\n    \"vat\": \"12.000\",\n    \"target_profit_margin\": \"60.00\",\n    \"current_sell_price\": {\n        \"created\": \"2020-06-17 11:55:36.302531\",\n        \"pricing\": 16,\n        \"user_pk\": 3475,\n        \"username\": \"thiago@apicbase.com\"\n    },\n    \"sell_price_history\": [\n        {\n            \"created\": \"2020-06-17 11:55:32.387997\",\n            \"pricing\": 16,\n            \"user_pk\": 3475,\n            \"username\": \"thiago@apicbase.com\"\n        }\n    ],\n    \"custom_fields\": [\n        {\n            \"name\": \"Menu Choice Field\",\n            \"value\": \"Choice 2\"\n        }\n    ]\n}"}},"schema":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v1/products/menus/390400735470004/"},"id":{"type":"string","example":"390400735470004"},"name":{"type":"string","example":"Spaghetti Special Menu"},"uid":{"type":"string","example":"1000"},"web_page":{"type":"string","example":"https://app.apicbase.com/library/menu/4453/"},"description":{"type":"string","example":"A menu for all tastes."},"created_date":{"type":"string","example":"2020-06-17T11:54:31.484550+02:00"},"created_by":{"type":"string","example":"thiago@apicbase.com"},"modified_date":{"type":"string","example":"2020-06-17T11:55:36.303100+02:00"},"courses":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Main Course"},"recipes":{"type":"array","items":{"type":"string","example":"https://app.apicbase.com/api/v1/products/recipes/349980442190000/"}},"index":{"type":"integer","example":0,"default":0}}}},"cycle_year":{},"cycle_week":{},"cycle_day":{},"starting_date":{"type":"string","example":"2020-06-01"},"ending_date":{"type":"string","example":"2020-08-31"},"time_of_day":{"type":"string","example":"12:00:00"},"vat":{"type":"string","example":"12.000"},"target_profit_margin":{"type":"string","example":"60.00"},"current_sell_price":{"type":"object","properties":{"created":{"type":"string","example":"2020-06-17 11:55:36.302531"},"pricing":{"type":"integer","example":16,"default":0},"user_pk":{"type":"integer","example":3475,"default":0},"username":{"type":"string","example":"thiago@apicbase.com"}}},"sell_price_history":{"type":"array","items":{"type":"object","properties":{"created":{"type":"string","example":"2020-06-17 11:55:32.387997"},"pricing":{"type":"integer","example":16,"default":0},"user_pk":{"type":"integer","example":3475,"default":0},"username":{"type":"string","example":"thiago@apicbase.com"}}}},"custom_fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Menu Choice Field"},"value":{"type":"string","example":"Choice 2"}}}}}}}}}},"deprecated":false},"post":{"summary":"Create Menu","description":"","operationId":"create-menu","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"uid":{"type":"string","description":"The unique ID."},"description":{"type":"string"},"starting_date":{"type":"string","description":"The menu's start date.","format":"date"},"ending_date":{"type":"string","description":"The menu's end date.","format":"date"},"current_sell_price":{"type":"boolean"},"tax":{"type":"boolean","description":"Tax rate."},"time_of_day":{"type":"string","description":"The time of serving (HH:mm:ss).","format":"date-time"},"courses":{"type":"array","items":{"properties":{"name":{"type":"string"},"recipes":{"type":"array","description":"A list of recipe IDs.","default":[],"items":{"type":"string"}},"index":{"type":"integer","description":"The course's position in the ordered list of courses.","format":"int32"}},"required":["name","recipes"],"type":"object"}},"custom_fields":{"type":"string","format":"json"}}},"examples":{"Request Example":{"value":{"name":"Menu Name","description":"The menu's description","starting_date":"2023-01-01","ending_date":"2023-01-07","time_of_day":"11:30:00","current_sell_price":15,"tax":"11","uid":"MENUNAME1","courses":[{"name":"First Course","recipes":["149833900200009","149833499180007"]},{"name":"Second Course","recipes":["149833900200009","149833499180007"]}]}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/products/menus/{menu_id}/":{"get":{"summary":"Get Menu Details","description":"Returns information about a specific menu.","operationId":"get-menu-details","parameters":[{"name":"menu_id","in":"path","description":"A menu's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n    \"description\": \"A menu for all tastes.\",\n    \"created_date\": \"2020-06-17T09:54:31Z\",\n    \"id\": \"390400735470004\",\n    \"current_sell_price\": {\n        \"created\": \"2020-06-17 11:55:36.302531\",\n        \"pricing\": 16.0,\n        \"user_pk\": 3475,\n        \"username\": \"john.doe@gmail.com\"\n    },\n    \"ending_date\": \"2020-08-31\",\n    \"web_page\": \"https://app.apicbase.com/library/menu/4453/\",\n    \"courses\": [\n        {\n            \"name\": \"Main Course\",\n            \"recipes\": [\n                \"https://app.apicbase.com/api/v2/products/recipes/349980442190000/\",\n                \"https://app.apicbase.com/api/v2/products/recipes/749980262120005/\"\n            ],\n            \"index\": 0\n        },\n        {\n            \"name\": \"Dessert\",\n            \"recipes\": [\n                \"https://app.apicbase.com/api/v2/products/recipes/549980272150003/\"\n            ],\n            \"index\": 1\n        }\n    ],\n    \"target_profit_margin\": \"60.00\",\n    \"starting_date\": \"2020-06-01\",\n    \"modified_date\": \"2020-06-17T09:55:36Z\",\n    \"sell_price_history\": [\n        {\n            \"created\": \"2020-06-17 11:55:32.387997\",\n            \"pricing\": 16.0,\n            \"user_pk\": 3475,\n            \"username\": \"john.doe@gmail.com\"\n        }\n    ],\n    \"custom_fields\": [\n        {\n            \"name\": \"Menu Choice Field\",\n            \"value\": \"Choice 2\"\n        }\n    ],\n    \"created_by\": \"john.doe@gmail.com\",\n    \"uid\": \"1000\",\n    \"time_of_day\": \"12:00:00\",\n    \"name\": \"Spaghetti Special Menu\",\n    \"url\": \"https://app.apicbase.com/api/v2/products/menus/390400735470004/\",\n    \"tax\": \"12.000\"\n}"}},"schema":{"type":"object","properties":{"description":{"type":"string","example":"A menu for all tastes."},"created_date":{"type":"string","example":"2020-06-17T09:54:31Z"},"id":{"type":"string","example":"390400735470004"},"current_sell_price":{"type":"object","properties":{"created":{"type":"string","example":"2020-06-17 11:55:36.302531"},"pricing":{"type":"integer","example":16,"default":0},"user_pk":{"type":"integer","example":3475,"default":0},"username":{"type":"string","example":"john.doe@gmail.com"}}},"ending_date":{"type":"string","example":"2020-08-31"},"web_page":{"type":"string","example":"https://app.apicbase.com/library/menu/4453/"},"courses":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Main Course"},"recipes":{"type":"array","items":{"type":"string","example":"https://app.apicbase.com/api/v2/products/recipes/349980442190000/"}},"index":{"type":"integer","example":0,"default":0}}}},"target_profit_margin":{"type":"string","example":"60.00"},"starting_date":{"type":"string","example":"2020-06-01"},"modified_date":{"type":"string","example":"2020-06-17T09:55:36Z"},"sell_price_history":{"type":"array","items":{"type":"object","properties":{"created":{"type":"string","example":"2020-06-17 11:55:32.387997"},"pricing":{"type":"integer","example":16,"default":0},"user_pk":{"type":"integer","example":3475,"default":0},"username":{"type":"string","example":"john.doe@gmail.com"}}}},"custom_fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Menu Choice Field"},"value":{"type":"string","example":"Choice 2"}}}},"created_by":{"type":"string","example":"john.doe@gmail.com"},"uid":{"type":"string","example":"1000"},"time_of_day":{"type":"string","example":"12:00:00"},"name":{"type":"string","example":"Spaghetti Special Menu"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/menus/390400735470004/"},"tax":{"type":"string","example":"12.000"}}}}}}},"deprecated":false},"patch":{"summary":"Edit Menu","description":"","operationId":"edit-menu","parameters":[{"name":"menu_id","in":"path","description":"A menu's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"uid":{"type":"string","description":"The unique ID."},"description":{"type":"string"},"starting_date":{"type":"string","description":"The menu's start date.","format":"date"},"ending_date":{"type":"string","description":"The menu's end date.","format":"date"},"current_sell_price":{"type":"boolean"},"vat":{"type":"boolean","description":"Tax rate."},"time_of_day":{"type":"string","description":"The time of serving (HH:mm:ss).","format":"date-time"},"courses":{"type":"array","items":{"properties":{"name":{"type":"string"},"recipes":{"type":"array","description":"A list of recipe IDs.","default":[],"items":{"type":"string"}},"index":{"type":"integer","description":"The course's position in the ordered list of courses.","format":"int32"}},"required":["name","recipes"],"type":"object"}},"custom_fields":{"type":"string","format":"json"}}},"examples":{"Request Example":{"value":{"name":"Menu Name Edited","description":"My new text description goes here"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/products/menus/{menu_id}/clone/":{"post":{"summary":"Clone Menu","description":"Creates a complete copy of a menu with a new name, preserving all associated data such as courses.","operationId":"clone-menu","parameters":[{"name":"menu_id","in":"path","description":"The ID of the menu to clone.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["new_name"],"properties":{"new_name":{"type":"string","description":"The name for the cloned menu. Required, must not be empty, maximum 300 characters.","maxLength":300}}},"examples":{"Request Example":{"value":{"new_name":"Cloned Summer Menu"}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":{"id":"456789123","url":"https://app.apicbase.com/api/v2/products/menus/456789123/"}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"456789123","description":"The ID of the newly created menu."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/menus/456789123/","description":"The URL of the newly created menu."}}}}}},"400":{"description":"Invalid or missing `new_name`."},"403":{"description":"User lacks edit permission."},"404":{"description":"Menu not found or not in user's library."}},"deprecated":false}},"/products/outlets/{outlet_id}/menus/":{"get":{"summary":"Get Menus Linked to an Outlet","description":"Returns a list of menus that are linked to a specific outlet.","operationId":"get-menus-linked-to-an-outlet","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"name","in":"query","description":"A menu name to query on.","schema":{"type":"string"}},{"name":"uid","in":"query","description":"A UID (unique menu ID) to filter on.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Query the contents of the description field.","schema":{"type":"string"}},{"name":"created_by","in":"query","description":"A user ID.","schema":{"type":"string"}},{"name":"created_date","in":"query","description":"Filter on a creation date (exact).","schema":{"type":"string","format":"date"}},{"name":"created_date__gt","in":"query","description":"Filter on a creation date (greater than).","schema":{"type":"string","format":"date"}},{"name":"created_date__lt","in":"query","description":"Filter on a creation date (lower than).","schema":{"type":"string","format":"date"}},{"name":"modified_date","in":"query","description":"Filter on a modification date (exact).","schema":{"type":"string","format":"date"}},{"name":"modified_date__gt","in":"query","description":"Filter on a modification date (greater than).","schema":{"type":"string","format":"date"}},{"name":"modified_date__lt","in":"query","description":"Filter on a modification date (lower than).","schema":{"type":"string","format":"date"}},{"name":"starting_date","in":"query","description":"Filter on a menu start date date (exact).","schema":{"type":"string","format":"date"}},{"name":"starting_date__gt","in":"query","description":"Filter on a menu start date date (greater than).","schema":{"type":"string","format":"date"}},{"name":"starting_date__lt","in":"query","description":"Filter on a menu start date date (lower than).","schema":{"type":"string","format":"date"}},{"name":"ending_date","in":"query","description":"Filter on a menu end date (exact).","schema":{"type":"string","format":"date"}},{"name":"ending_date__gt","in":"query","description":"Filter on a menu end date (greater than).","schema":{"type":"string","format":"date"}},{"name":"ending_date__lt","in":"query","description":"Filter on a menu end date (lower than).","schema":{"type":"string","format":"date"}},{"name":"current_sell_price","in":"query","description":"Filter on a sell price (exact)","schema":{"type":"number","format":"float"}},{"name":"current_sell_price__gt","in":"query","description":"Filter on a sell price (greater than)","schema":{"type":"number","format":"float"}},{"name":"current_sell_price__lt","in":"query","description":"Filter on a sell price (lower than)","schema":{"type":"number","format":"float"}},{"name":"tax","in":"query","description":"Filter on a tax rate.","schema":{"type":"number","format":"float"}},{"name":"tax__gt","in":"query","description":"Filter on a tax rate (greater than).","schema":{"type":"number","format":"float"}},{"name":"tax__lt","in":"query","description":"Filter on a tax rate (lower than).","schema":{"type":"number","format":"float"}},{"name":"custom_fields","in":"query","description":"Filter on custom fields. Check reference guide for details.","schema":{"type":"string","format":"json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n    \"count\": 1,\n    \"next\": null,\n    \"previous\": null,\n    \"results\": [\n        {\n            \"description\": \"\",\n            \"created_date\": \"2020-06-17T10:11:33Z\",\n            \"id\": \"990400245400005\",\n            \"current_sell_price\": {\n                \"created\": \"2020-06-17 12:11:33.445185\",\n                \"pricing\": 10.0,\n                \"user_pk\": 3475,\n                \"username\": \"john.doe@gmail.com\"\n            },\n            \"ending_date\": \"2020-12-08\",\n            \"web_page\": \"https://app.apicbase.com/library/menu/4454/\",\n            \"courses\": [\n                {\n                    \"name\": \"Course 1\",\n                    \"recipes\": [\n                        \"https://app.apicbase.com/api/v2/products/recipes/749980262120005/\",\n                        \"https://app.apicbase.com/api/v2/products/recipes/549980272150003/\"\n                    ],\n                    \"index\": 0\n                }\n            ],\n            \"target_profit_margin\": null,\n            \"starting_date\": \"2020-12-01\",\n            \"modified_date\": \"2020-12-09T14:18:05Z\",\n            \"sell_price_history\": [],\n            \"custom_fields\": [\n                {\n                    \"name\": \"Menu Choice Field\",\n                    \"value\": null\n                }\n            ],\n            \"created_by\": \"john.doe@gmail.com\",\n            \"uid\": \"\",\n            \"time_of_day\": null,\n            \"name\": \"Second Menu\",\n            \"url\": \"https://app.apicbase.com/api/v2/products/menus/990400245400005/\",\n            \"tax\": \"12.000\"\n        }\n    ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":1,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","example":""},"created_date":{"type":"string","example":"2020-06-17T10:11:33Z"},"id":{"type":"string","example":"990400245400005"},"current_sell_price":{"type":"object","properties":{"created":{"type":"string","example":"2020-06-17 12:11:33.445185"},"pricing":{"type":"integer","example":10,"default":0},"user_pk":{"type":"integer","example":3475,"default":0},"username":{"type":"string","example":"john.doe@gmail.com"}}},"ending_date":{"type":"string","example":"2020-12-08"},"web_page":{"type":"string","example":"https://app.apicbase.com/library/menu/4454/"},"courses":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Course 1"},"recipes":{"type":"array","items":{"type":"string","example":"https://app.apicbase.com/api/v2/products/recipes/749980262120005/"}},"index":{"type":"integer","example":0,"default":0}}}},"target_profit_margin":{},"starting_date":{"type":"string","example":"2020-12-01"},"modified_date":{"type":"string","example":"2020-12-09T14:18:05Z"},"sell_price_history":{"type":"array"},"custom_fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Menu Choice Field"},"value":{}}}},"created_by":{"type":"string","example":"john.doe@gmail.com"},"uid":{"type":"string","example":""},"time_of_day":{},"name":{"type":"string","example":"Second Menu"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/menus/990400245400005/"},"tax":{"type":"string","example":"12.000"}}}}}}}}}},"deprecated":false}},"/products/menus/{menu_id}/courses/":{"get":{"summary":"Get Courses in a Menu","description":"Returns a menu's courses and their recipes.","operationId":"get-courses-in-a-menu","parameters":[{"name":"menu_id","in":"path","description":"A menu ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"count\": 2,\n  \"next\": null,\n  \"previous\": null,\n  \"results\": [\n    {\n      \"name\": \"Main Course\",\n      \"recipes\": [\n        \"https://app.apicbase.com/api/v2/products/recipes/349980442190000/\",\n        \"https://app.apicbase.com/api/v2/products/recipes/749980262120005/\"\n      ]\n    },\n    {\n      \"name\": \"Dessert\",\n      \"recipes\": [\n        \"https://app.apicbase.com/api/v2/products/recipes/549980272150003/\"\n      ]\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":2,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Main Course"},"recipes":{"type":"array","items":{"type":"string","example":"https://app.apicbase.com/api/v2/products/recipes/349980442190000/"}}}}}}}}}}},"deprecated":false}},"/products/recipes/":{"get":{"summary":"Get Recipes","description":"Returns a list of recipes in the library.","operationId":"get-recipes","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"name","in":"query","description":"A recipe name to query on.","schema":{"type":"string"}},{"name":"uid","in":"query","description":"A UID (reference number) to query on.","schema":{"type":"string"}},{"name":"persons","in":"query","description":"The amount of servings.","schema":{"type":"integer","format":"int32"}},{"name":"persons__gt","in":"query","description":"The amount of servings (greater than).","schema":{"type":"integer","format":"int32"}},{"name":"persons__lt","in":"query","description":"The amount of servings (lower than).","schema":{"type":"integer","format":"int32"}},{"name":"tax","in":"query","description":"Filter on a tax rate.","schema":{"type":"number","format":"float"}},{"name":"tax__gt","in":"query","description":"Filter on a tax rate (greater than).","schema":{"type":"number","format":"float"}},{"name":"tax__lt","in":"query","description":"Filter on a tax rate (lower than).","schema":{"type":"number","format":"float"}},{"name":"current_sell_price","in":"query","description":"Filter on a sell price (exact).","schema":{"type":"number","format":"float"}},{"name":"current_sell_price__gt","in":"query","description":"Filter on a sell price (greater than).","schema":{"type":"number","format":"float"}},{"name":"current_sell_price__lt","in":"query","description":"Filter on a sell price (lower than).","schema":{"type":"number","format":"float"}},{"name":"created_date","in":"query","description":"Filter on a creation date (exact).","schema":{"type":"string","format":"date"}},{"name":"created_date__gt","in":"query","description":"Filter on a creation date (greater than).","schema":{"type":"string","format":"date"}},{"name":"created_date__lt","in":"query","description":"Filter on a creation date (lower than).","schema":{"type":"string","format":"date"}},{"name":"modified_date","in":"query","description":"Filter on a modification date (exact).","schema":{"type":"string","format":"date"}},{"name":"modified_date__gt","in":"query","description":"Filter on a modification date (greater than).","schema":{"type":"string","format":"date"}},{"name":"modified_date__gte","in":"query","description":"Filter on a modification date (greater than or equal).","schema":{"type":"string","format":"date"}},{"name":"modified_date__lt","in":"query","description":"Filter on a modification date (lower than).","schema":{"type":"string","format":"date"}},{"name":"created_by","in":"query","description":"A user ID.","schema":{"type":"string"}},{"name":"stockable","in":"query","description":"Filter recipes that are or are not stockable.","schema":{"type":"boolean"}},{"name":"original","in":"query","description":"A recipe ID. Filters on recipes that are clones of a given recipe.","schema":{"type":"string"}},{"name":"outlet","in":"query","description":"Filter on an outlet ID. Gets recipes connected to an outlet.","schema":{"type":"string"}},{"name":"outlet__in","in":"query","description":"Filter on a list of outlet IDs (comma-separated). Gets recipes connected to any outlet in the list.","schema":{"type":"string"}},{"name":"menu","in":"query","description":"Filter on a menu ID. Gets recipes in a given menu.","schema":{"type":"string"}},{"name":"menu__in","in":"query","description":"Filter on a list of menu IDs (comma-separated). Gets recipes in any of the given menus.","schema":{"type":"string"}},{"name":"type","in":"query","description":"Filter on a recipe type.","schema":{"type":"string","enum":["amuse_bouche","base_recipe","soup","starter","entremet","main_course","dessert","drinks","other"]}},{"name":"type__in","in":"query","description":"Filter on any given recipe type (comma-separated).","schema":{"type":"string"}},{"name":"accounting_category","in":"query","description":"Filter on an accounting category. Only for stockable recipes.","schema":{"type":"string"}},{"name":"accounting_category__in","in":"query","description":"Filter on any given accounting category (comma-separated). Only for stockable recipes.","schema":{"type":"string"}},{"name":"stage","in":"query","description":"Filter on a recipe stage.","schema":{"type":"string","enum":["development","complete","testing","active","discontinued"]}},{"name":"stage__in","in":"query","description":"Filter on any given recipe stage (comma-separated).","schema":{"type":"string"}},{"name":"season","in":"query","description":"Filter on a recipe's season.","schema":{"type":"string","enum":["all_seasons","winter","spring","summer","autumn"]}},{"name":"season__in","in":"query","description":"Filter on any given season (comma-separated).","schema":{"type":"string"}},{"name":"class","in":"query","description":"Filter on a recipe class.","schema":{"type":"string","enum":["dish","ingredient","base_recipe_class","finished_product","semi_finished_product"]}},{"name":"class__in","in":"query","description":"Filter on any given recipe class (comma-separated).","schema":{"type":"string"}},{"name":"category","in":"query","description":"Filter on a category","schema":{"type":"string"}},{"name":"category__in","in":"query","description":"Filter on any given category (comma-separated).","schema":{"type":"string"}},{"name":"subcategory","in":"query","description":"Filter on a subcategory.","schema":{"type":"string"}},{"name":"subcategory__in","in":"query","description":"Filter on any given subcategory (comma-separated).","schema":{"type":"string"}},{"name":"net_weight","in":"query","description":"Filter on a weight (exact).","schema":{"type":"number","format":"float"}},{"name":"net_weight__gt","in":"query","description":"Filter on a weight (greater than).","schema":{"type":"number","format":"float"}},{"name":"net_weight__lt","in":"query","description":"Filter on a weight (lower than).","schema":{"type":"number","format":"float"}},{"name":"net_volume","in":"query","description":"Filter on a volume (exact).","schema":{"type":"number","format":"float"}},{"name":"net_volume__gt","in":"query","description":"Filter on a volume (greater than).","schema":{"type":"number","format":"float"}},{"name":"net_volume__lt","in":"query","description":"Filter on a volume (lower than).","schema":{"type":"number","format":"float"}},{"name":"prep_time","in":"query","description":"Filter on a preparation time duration (exact). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"prep_time__gt","in":"query","description":"Filter on a preparation time duration (greater than). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"prep_time__lt","in":"query","description":"Filter on a preparation time duration (lower than). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"cooking_time","in":"query","description":"Filter on a cooking time duration (exact). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"cooking_time__gt","in":"query","description":"Filter on a cooking time duration (greater than). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"cooking_time__lt","in":"query","description":"Filter on a cooking time duration (lower than). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"plating_time","in":"query","description":"Filter on a plating time duration (exact). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"plating_time__gt","in":"query","description":"Filter on a plating time duration (greater than). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"plating_time__lt","in":"query","description":"Filter on a plating time duration (lower than). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"custom_fields","in":"query","description":"Filter on custom fields. Check reference guide for details.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n    \"count\": 3,\n    \"next\": null,\n    \"previous\": null,\n    \"results\": [\n        {\n            \"name\": \"Carrot Cake\",\n            \"description\": \"A delicious cake.\",\n            \"subcategory\": null,\n            \"net_weight_unit\": \"g\",\n            \"id\": \"549990580860002\",\n            \"current_sell_price\": {\n                \"created\": \"2020-10-01 17:55:07.866442\",\n                \"pricing\": 6.5,\n                \"user_pk\": 3475,\n                \"username\": \"john.doe@gmail.com\"\n            },\n            \"recipe_class\": \"dish\",\n            \"category\": null,\n            \"season\": \"all_seasons\",\n            \"prep_time_passive\": null,\n            \"composition\": \"<p><br></p>\",\n            \"web_page\": \"https://app.apicbase.com/library/recipe/99808/\",\n            \"cuisine\": \"English\",\n            \"remarks\": \"<p>Include remarks here, if you like.</p>\",\n            \"preferred_uoms\": [],\n            \"cooking_time_passive\": \"00:45:00\",\n            \"highly_perishable\": null,\n            \"main_stock_items\": [],\n            \"target_profit_margin\": \"10.25\",\n            \"plating_time\": null,\n            \"recipe_stage\": \"complete\",\n            \"difficulty\": 1,\n            \"sell_price_history\": [],\n            \"modified_date\": \"2020-11-04T16:05:43Z\",\n            \"custom_fields\": [\n                {\n                    \"name\": \"Kitchen Utensils\",\n                    \"value\": null\n                },\n                {\n                    \"name\": \"Filter Field Multi\",\n                    \"value\": null\n                },\n                {\n                    \"name\": \"Filter Field Single\",\n                    \"value\": null\n                },\n                {\n                    \"name\": \"Filter Field Text\",\n                    \"value\": null\n                },\n                {\n                    \"name\": \"Recipe Multi Field\",\n                    \"value\": null\n                }\n            ],\n            \"name_translations\": {\n                \"en\": \"Carrot Cake\",\n                \"hu\": \"Carrot Cake\"\n            },\n            \"net_volume\": null,\n            \"net_weight\": \"700.00\",\n            \"clones\": [],\n            \"storage_conditions\": null,\n            \"url\": \"https://app.apicbase.com/api/v2/products/recipes/549990580860002/\",\n            \"tax\": \"12.000\",\n            \"recipe_type\": \"Dessert\",\n            \"created_date\": \"2020-10-01T15:55:07Z\",\n            \"is_semi_finished_product\": false,\n            \"persons\": 12,\n            \"cooking_time\": \"01:15:00\",\n            \"is_stockable_recipe\": false,\n            \"uid\": \"2222\",\n            \"recipe_type_other\": null,\n            \"prep_time\": \"00:05:00\",\n            \"original\": null,\n            \"storage_conditions_translations\": {},\n            \"created_by\": \"john.doe@gmail.com\",\n            \"net_volume_unit\": \"ml\",\n            \"portion_pieces\": null,\n            \"shelf_life\": {\n                \"days\": 2,\n                \"hours\": 0\n            },\n            \"carbon_footprint\": {\n              \"land_m2\": 60,\n              \"co2eq_cradle_to_gate_kg\": 0,\n              \"co2eq_farm_to_farmgate_kg\": 60,\n              \"water_m3\": 60\n            },\n            \"carbon_footprint_per_portion\": {\n              \"land_m2\": 42,\n              \"co2eq_cradle_to_gate_kg\": 0,\n              \"co2eq_farm_to_farmgate_kg\": 42,\n              \"water_m3\": 42\n            }\n        },\n        {\n            \"name\": \"Tiramisù\",\n            \"description\": \"\",\n            \"subcategory\": null,\n            \"net_weight_unit\": \"\",\n            \"id\": \"549980272150003\",\n            \"current_sell_price\": null,\n            \"recipe_class\": \"\",\n            \"category\": null,\n            \"season\": \"\",\n            \"prep_time_passive\": null,\n            \"composition\": \"<p><br></p>\",\n            \"web_page\": \"https://app.apicbase.com/library/recipe/89127/\",\n            \"cuisine\": \"\",\n            \"remarks\": \"<p><br></p>\",\n            \"preferred_uoms\": [],\n            \"cooking_time_passive\": null,\n            \"highly_perishable\": null,\n            \"main_stock_items\": [],\n            \"target_profit_margin\": \"10.00\",\n            \"plating_time\": null,\n            \"recipe_stage\": \"\",\n            \"difficulty\": null,\n            \"sell_price_history\": [],\n            \"modified_date\": \"2020-11-18T15:25:15Z\",\n            \"custom_fields\": [\n                {\n                    \"name\": \"Kitchen Utensils\",\n                    \"value\": null\n                },\n                {\n                    \"name\": \"Filter Field Multi\",\n                    \"value\": [\n                        \"First\",\n                        \"Fourth\"\n                    ]\n                },\n                {\n                    \"name\": \"Filter Field Single\",\n                    \"value\": \"Single 1\"\n                },\n                {\n                    \"name\": \"Filter Field Text\",\n                    \"value\": \"filter text\"\n                },\n                {\n                    \"name\": \"Recipe Multi Field\",\n                    \"value\": null\n                }\n            ],\n            \"name_translations\": {\n                \"en\": \"Tiramisù\",\n                \"fr\": \"Tiramisù\"\n            },\n            \"net_volume\": null,\n            \"net_weight\": null,\n            \"clones\": [],\n            \"storage_conditions\": null,\n            \"url\": \"https://app.apicbase.com/api/v2/products/recipes/549980272150003/\",\n            \"tax\": null,\n            \"recipe_type\": null,\n            \"created_date\": \"2020-06-17T09:55:07Z\",\n            \"is_semi_finished_product\": false,\n            \"persons\": 1,\n            \"cooking_time\": null,\n            \"is_stockable_recipe\": false,\n            \"uid\": \"\",\n            \"recipe_type_other\": null,\n            \"prep_time\": \"00:45:00\",\n            \"original\": null,\n            \"storage_conditions_translations\": {},\n            \"created_by\": \"john.doe@gmail.com\",\n            \"net_volume_unit\": \"\",\n            \"portion_pieces\": null,\n            \"shelf_life\": null,\n            \"carbon_footprint\": null,\n          \t\"carbon_footprint_per_portion\": null\n        },\n        {\n            \"name\": \"Spaghetti Bolognese\",\n            \"description\": \"A free text field here\",\n            \"subcategory\": \"\",\n            \"net_weight_unit\": \"kg\",\n            \"id\": \"349980442190000\",\n            \"current_sell_price\": {\n                \"created\": \"2021-11-04 10:20:58.627240\",\n                \"pricing\": 1.0,\n                \"user_pk\": null,\n                \"username\": null\n            },\n            \"recipe_class\": \"dish\",\n            \"category\": \"\",\n            \"season\": \"all_seasons\",\n            \"prep_time_passive\": null,\n            \"composition\": \"<p>An explanation about how to compose this recipe goes here.</p>\",\n            \"web_page\": \"https://app.apicbase.com/library/recipe/89124/\",\n            \"cuisine\": \"Italian\",\n            \"remarks\": \"<p>General remarks about this recipe. Free text.</p>\",\n            \"preferred_uoms\": [],\n            \"cooking_time_passive\": \"00:15:30\",\n            \"highly_perishable\": false,\n            \"main_stock_items\": [\n                {\n                    \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421747108501007/\"\n                }\n            ],\n            \"target_profit_margin\": \"80.00\",\n            \"plating_time\": \"00:01:00\",\n            \"recipe_stage\": \"active\",\n            \"difficulty\": 1,\n            \"sell_price_history\": [\n                {\n                    \"created\": \"2020-06-17 11:44:38.762287\",\n                    \"pricing\": 13.0,\n                    \"username\": \"john.doe@gmail.com\"\n                },\n                {\n                    \"created\": \"2020-06-17 11:49:30.968115\",\n                    \"pricing\": 13.0,\n                    \"username\": \"john.doe@gmail.com\"\n                },\n                {\n                    \"created\": \"2020-06-17 12:04:28.685633\",\n                    \"pricing\": 13.0,\n                    \"username\": \"john.doe@gmail.com\"\n                }\n            ],\n            \"modified_date\": \"2023-06-07T07:18:43Z\",\n            \"custom_fields\": [\n                {\n                    \"name\": \"Kitchen Utensils\",\n                    \"value\": null\n                },\n                {\n                    \"name\": \"Filter Field Multi\",\n                    \"value\": null\n                },\n                {\n                    \"name\": \"Filter Field Single\",\n                    \"value\": \"Single 1\"\n                },\n                {\n                    \"name\": \"Filter Field Text\",\n                    \"value\": null\n                },\n                {\n                    \"name\": \"Recipe Multi Field\",\n                    \"value\": [\n                        \"Choice 1\",\n                        \"Choice 3\"\n                    ]\n                }\n            ],\n            \"name_translations\": {\n                \"en\": \"Spaghetti Bolognese\",\n                \"fr\": \"Spaghetti Bolognese\"\n            },\n            \"net_volume\": null,\n            \"net_weight\": \"3.00\",\n            \"clones\": [\n                \"https://app.apicbase.com/api/v2/products/recipes/449964576800007/\"\n            ],\n            \"storage_conditions\": \"\",\n            \"url\": \"https://app.apicbase.com/api/v2/products/recipes/349980442190000/\",\n            \"tax\": \"20.000\",\n            \"recipe_type\": \"Main course\",\n            \"created_date\": \"2020-06-17T09:44:38Z\",\n            \"is_semi_finished_product\": false,\n            \"persons\": 16,\n            \"cooking_time\": \"00:02:00\",\n            \"is_stockable_recipe\": true,\n            \"uid\": \"0001\",\n            \"recipe_type_other\": null,\n            \"prep_time\": \"00:05:00\",\n            \"original\": null,\n            \"storage_conditions_translations\": {},\n            \"created_by\": \"john.doe@gmail.com\",\n            \"net_volume_unit\": \"\",\n            \"portion_pieces\": null,\n            \"shelf_life\": {\n                \"days\": 4,\n                \"hours\": 0\n            },\n            \"carbon_footprint\": {\n              \"land_m2\": 60,\n              \"co2eq_cradle_to_gate_kg\": 0,\n              \"co2eq_farm_to_farmgate_kg\": 60,\n              \"water_m3\": 60\n            },\n            \"carbon_footprint_per_portion\": {\n              \"land_m2\": 42,\n              \"co2eq_cradle_to_gate_kg\": 0,\n              \"co2eq_farm_to_farmgate_kg\": 42,\n              \"water_m3\": 42\n            }\n        }\n    ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":3,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Carrot Cake"},"description":{"type":"string","example":"A delicious cake."},"subcategory":{},"net_weight_unit":{"type":"string","example":"g"},"id":{"type":"string","example":"549990580860002"},"current_sell_price":{"type":"object","properties":{"created":{"type":"string","example":"2020-10-01 17:55:07.866442"},"pricing":{"type":"number","example":6.5,"default":0},"user_pk":{"type":"integer","example":3475,"default":0},"username":{"type":"string","example":"john.doe@gmail.com"}}},"recipe_class":{"type":"string","example":"dish"},"category":{},"season":{"type":"string","example":"all_seasons"},"prep_time_passive":{},"composition":{"type":"string","example":"<p><br></p>"},"web_page":{"type":"string","example":"https://app.apicbase.com/library/recipe/99808/"},"cuisine":{"type":"string","example":"English"},"remarks":{"type":"string","example":"<p>Include remarks here, if you like.</p>"},"preferred_uoms":{"type":"array"},"cooking_time_passive":{"type":"string","example":"00:45:00"},"highly_perishable":{},"main_stock_items":{"type":"array"},"target_profit_margin":{"type":"string","example":"10.25"},"plating_time":{},"recipe_stage":{"type":"string","example":"complete"},"difficulty":{"type":"integer","example":1,"default":0},"sell_price_history":{"type":"array"},"modified_date":{"type":"string","example":"2020-11-04T16:05:43Z"},"custom_fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Kitchen Utensils"},"value":{}}}},"name_translations":{"type":"object","properties":{"en":{"type":"string","example":"Carrot Cake"},"hu":{"type":"string","example":"Carrot Cake"}}},"net_volume":{},"net_weight":{"type":"string","example":"700.00"},"clones":{"type":"array"},"storage_conditions":{},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/recipes/549990580860002/"},"tax":{"type":"string","example":"12.000"},"recipe_type":{"type":"string","example":"Dessert"},"created_date":{"type":"string","example":"2020-10-01T15:55:07Z"},"is_semi_finished_product":{"type":"boolean","example":false,"default":true},"persons":{"type":"integer","example":12,"default":0},"cooking_time":{"type":"string","example":"01:15:00"},"is_stockable_recipe":{"type":"boolean","example":false,"default":true},"uid":{"type":"string","example":"2222"},"recipe_type_other":{},"prep_time":{"type":"string","example":"00:05:00"},"original":{},"storage_conditions_translations":{"type":"object","properties":{}},"created_by":{"type":"string","example":"john.doe@gmail.com"},"net_volume_unit":{"type":"string","example":"ml"},"portion_pieces":{},"shelf_life":{"type":"object","properties":{"days":{"type":"integer","example":2,"default":0},"hours":{"type":"integer","example":0,"default":0}}},"carbon_footprint":{"type":"object","properties":{"land_m2":{"type":"integer","example":60,"default":0},"co2eq_cradle_to_gate_kg":{"type":"integer","example":0,"default":0},"co2eq_farm_to_farmgate_kg":{"type":"integer","example":60,"default":0},"water_m3":{"type":"integer","example":60,"default":0}}},"carbon_footprint_per_portion":{"type":"object","properties":{"land_m2":{"type":"integer","example":42,"default":0},"co2eq_cradle_to_gate_kg":{"type":"integer","example":0,"default":0},"co2eq_farm_to_farmgate_kg":{"type":"integer","example":42,"default":0},"water_m3":{"type":"integer","example":42,"default":0}}}}}}}}}}}},"deprecated":false},"post":{"summary":"Create Recipe","description":"Creates a new instance of a recipe.","operationId":"create-recipe","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","persons"],"properties":{"name":{"type":"string"},"persons":{"type":"integer","description":"The amount of servings.","format":"int32"},"uid":{"type":"string","description":"The reference number."},"description":{"type":"string"},"cuisine":{"type":"string"},"recipe_stage":{"type":"string","enum":["complete","development","testing","active","discontinued"]},"composition":{"type":"string"},"remarks":{"type":"string"},"recipe_type":{"type":"string","enum":["base_recipe","amuse_bouche","starter","entremet","soup","main_course","dessert","drinks","other"]},"season":{"type":"string","enum":["all_seasons","winter","spring","summer","autumn"]},"recipe_type_other":{"type":"string","description":"Free text field. This value is only set when the recipe_type value is \"other\"."},"category":{"type":"string"},"subcategory":{"type":"string"},"difficulty":{"type":"string","description":"Choice on a scale from 1 to 5","enum":["1","2","3","4","5"]},"recipe_class":{"type":"string","enum":["\"dish\"","\"base_recipe_class\"","\"ingredient\"","\"finished_product\"","\"semi_finished_product\""]},"is_semi_finished_product":{"type":"boolean","default":false},"target_profit_margin":{"type":"number","description":"A percentage.","format":"float"},"tax":{"type":"number","description":"Tax rate.","format":"float"},"sell_price":{"type":"number","format":"float"},"net_weight":{"type":"number","format":"float"},"net_weight_unit":{"type":"string"},"net_volume":{"type":"string"},"net_volume_unit":{"type":"string"},"prep_time":{"type":"string","description":"A duration of time. Format: hh:mm:ss"},"prep_time_passive":{"type":"string","description":"A duration of time. Format: hh:mm:ss"},"cooking_time":{"type":"string","description":"A duration of time. Format: hh:mm:ss"},"cooking_time_passive":{"type":"string","description":"A duration of time. Format: hh:mm:ss"},"plating_time":{"type":"string","description":"A duration of time. Format: hh:mm:ss"},"portion_pieces":{"type":"integer","format":"int32"},"shelf_life":{"type":"object","properties":{"days":{"type":"integer","format":"int32"},"hours":{"type":"integer","format":"int32"}}},"ingredients":{"type":"object","properties":{"ingredient":{"type":"string","description":"An ingredient ID."},"subrecipe":{"type":"string","description":"A subrecipe ID."},"quantity":{"type":"number","format":"float"},"unit":{"type":"string","enum":["mg","g","kg","lb","oz","ml","cl","dl","l","tbsp (US)","tbsp (UK)","tsp (US)","tsp (UK)","cup (US)","cup (UK)","fl oz (US)","fl oz (UK)","pt (US)","pt (UK)","gal (US)","gal (UK)","qt (US)","qt (UK)"]},"waste_percentage":{"type":"number","description":"Accepts values between 0 and 1, representing the percentage of ingredient waste.","format":"float"}}},"allergens":{"type":"object","properties":{"fish":{"type":"string","enum":["0","1","2","3"]},"milk_dairy":{"type":"string","enum":["0","1","2","3"]},"gluten":{"type":"string","enum":["0","1","2","3"]},"lactose":{"type":"string","enum":["0","1","2","3"]},"egg":{"type":"string","enum":["0","1","2","3"]},"peanut":{"type":"string","enum":["0","1","2","3"]},"lupine":{"type":"string","enum":["0","1","2","3"]},"poppy_seeds":{"type":"string","enum":["0","1","2","3"]},"hazelnuts":{"type":"string","enum":["0","1","2","3"]},"sulfites":{"type":"string","enum":["0","1","2","3"]},"kamut":{"type":"string","enum":["0","1","2","3"]},"mollusc":{"type":"string","enum":["0","1","2","3"]},"legume_pulse":{"type":"string","enum":["0","1","2","3"]},"wheat":{"type":"string","enum":["0","1","2","3"]},"shellfish":{"type":"string","enum":["0","1","2","3"]},"mustard":{"type":"string","enum":["0","1","2","3"]},"sesame":{"type":"string","enum":["0","1","2","3"]},"celery":{"type":"string","enum":["0","1","2","3"]},"oats":{"type":"string","enum":["0","1","2","3"]},"seeds":{"type":"string","enum":["0","1","2","3"]},"rye":{"type":"string","enum":["0","1","2","3"]},"soy":{"type":"string","enum":["0","1","2","3"]},"pistachio_nuts":{"type":"string","enum":["0","1","2","3"]},"spelt":{"type":"string","enum":["0","1","2","3"]},"barley":{"type":"string","enum":["0","1","2","3"]},"corn":{"type":"string","enum":["0","1","2","3"]},"walnuts":{"type":"string","enum":["0","1","2","3"]},"nut":{"type":"string","enum":["0","1","2","3"]},"brazil_nuts":{"type":"string","enum":["0","1","2","3"]},"pecan_nuts":{"type":"string","enum":["0","1","2","3"]},"macadamia_nuts":{"type":"string","enum":["0","1","2","3"]},"sunflower_seeds":{"type":"string","enum":["0","1","2","3"]},"almonds":{"type":"string","enum":["0","1","2","3"]},"cashews":{"type":"string","enum":["0","1","2","3"]}}},"steps":{"type":"object","properties":{"description":{"type":"string"},"number":{"type":"integer","description":"A recipe step's number based on the order in which they follow each other.","format":"int32"}}},"images":{"type":"array","description":"An array of image IDs. If one is not chosen, the main image will be the first image in this list.","items":{"type":"string"}},"main_image":{"type":"string","description":"An image ID."},"preferred_uoms":{"type":"array","items":{"type":"string"}},"outlets":{"type":"array","description":"An array of outlet IDs. The outlet(s) that this recipe is available at.","items":{"type":"string"}}}},"examples":{"Simple example":{"value":{"name":"Carrot Cake","uid":"10023R","description":"A delicious cake.","persons":12,"cuisine":"English","recipe_stage":"complete","remarks":"Include remarks here, if you like.","recipe_type":"dessert","recipe_type_other":null,"season":"all_seasons","difficulty":1,"recipe_class":"dish","target_profit_margin":10.25,"vat":12,"sell_price":6.5,"net_weight":"700","net_weight_unit":"g","net_volume":"0.00","net_volume_unit":"ml","prep_time":"00:05:00","prep_time_passive":null,"cooking_time":"01:15:00","cooking_time_passive":"00:45:00","plating_time":null,"portion_pieces":null,"custom_fields":[{"name":"Recipe Multi Field","value":["Choice 1","Choice 2"]}],"shelf_life":2,"ingredients":[{"ingredient":"264696398000008","waste_percentage":5,"quantity":400,"unit":"g"},{"ingredient":"464556907820001","waste_percentage":2.5,"quantity":1,"unit":"kg"}],"allergens":{"oats":0,"pistachio_nuts":0,"spelt":0,"pecan_nuts":0,"soy":0,"almonds":0,"rye":0,"fish":0,"lactose":0,"kamut":0,"sulfites":0,"corn":0,"sunflower_seeds":0,"nut":0,"sesame":0,"milk_dairy":0,"macadamia_nuts":0,"legume_pulse":0,"barley":0,"celery":0,"cashews":0,"gluten":0,"shellfish":0,"brazil_nuts":0,"mollusc":0,"peanut":0,"hazelnuts":0,"wheat":1,"egg":1,"seeds":0,"lupine":0,"mustard":0,"walnuts":0,"poppy_seeds":0},"steps":[{"description":"The first step for a delicious carrot cake"},{"description":"The second step, almost there"},{"description":"Third step, it's done!"}],"images":["181566068410002"],"outlets":["629100261280001"],"preferred_uoms":["g","kg"]}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"instance\": \"https://app.apicbase.com/api/v1/products/recipes/549990580860002/\"\n}"}},"schema":{"type":"object","properties":{"instance":{"type":"string","example":"https://app.apicbase.com/api/v1/products/recipes/549990580860002/"}}}}}}},"deprecated":false}},"/products/recipes/{recipe_id}/":{"get":{"summary":"Get Recipe Details","description":"Returns information about a specific recipe.","operationId":"get-recipe-details","parameters":[{"name":"recipe_id","in":"path","description":"A recipe's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n    \"name\": \"Spaghetti Bolognese\",\n    \"manual_net_weight\": 3.0,\n    \"subcategory\": \"\",\n    \"net_weight_unit\": \"kg\",\n    \"current_sell_price\": {\n        \"created\": \"2021-11-04 10:20:58.627240\",\n        \"pricing\": 1.0,\n        \"user_pk\": null,\n        \"username\": null\n    },\n    \"nutrition_info_per_portion\": {\n        \"for\": {\n            \"quantity\": 1,\n            \"unit\": \"portion\"\n        },\n        \"kcal\": {\n            \"quantity\": 6.25,\n            \"unit\": \"kcal\"\n        },\n        \"kj\": {\n            \"quantity\": 26.150000000000002,\n            \"unit\": \"kJ\"\n        },\n        \"fat\": {\n            \"quantity\": 6.25,\n            \"unit\": \"g\"\n        },\n        \"saturated_fat\": {\n            \"quantity\": 3.125,\n            \"unit\": \"g\"\n        },\n        \"carbohydrate\": {\n            \"quantity\": 6.25,\n            \"unit\": \"g\"\n        },\n        \"sugar\": {\n            \"quantity\": 6.25,\n            \"unit\": \"g\"\n        },\n        \"protein\": {\n            \"quantity\": 6.25,\n            \"unit\": \"g\"\n        },\n        \"salt\": {\n            \"quantity\": 6.25,\n            \"unit\": \"g\"\n        },\n        \"sodium\": {\n            \"quantity\": 2.5,\n            \"unit\": \"g\"\n        }\n    },\n    \"outlet_prices\": [\n        {\n            \"created\": \"2022-02-23 12:21:05.335435\",\n            \"pricing\": 8.0,\n            \"user_pk\": null,\n            \"username\": null,\n            \"outlet\": {\n                \"id\": \"829100725420008\",\n                \"name\": \"Brussel\",\n                \"url\": \"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/\"\n            }\n        },\n        {\n            \"created\": \"2022-02-23 12:21:05.327690\",\n            \"pricing\": 7.5,\n            \"user_pk\": null,\n            \"username\": null,\n            \"outlet\": {\n                \"id\": \"229100415400002\",\n                \"name\": \"Antwerpen\",\n                \"url\": \"https://app.apicbase.com/api/v2/accounts/outlets/229100415400002/\"\n            }\n        }\n    ],\n    \"prep_time_passive\": null,\n    \"web_page\": \"https://app.apicbase.com/library/recipe/89124/\",\n    \"cuisine\": \"Italian\",\n    \"remarks\": \"<p>General remarks about this recipe. Free text.</p>\",\n    \"recipe_stage\": \"active\",\n    \"sell_price_history\": [\n        {\n            \"created\": \"2020-06-17 11:44:38.762287\",\n            \"pricing\": 13.0,\n            \"username\": \"john.doe@gmail.com\"\n        },\n        {\n            \"created\": \"2020-06-17 11:49:30.968115\",\n            \"pricing\": 13.0,\n            \"username\": \"john.doe@gmail.com\"\n        },\n        {\n            \"created\": \"2020-06-17 12:04:28.685633\",\n            \"pricing\": 13.0,\n            \"username\": \"john.doe@gmail.com\"\n        }\n    ],\n    \"modified_date\": \"2023-06-07T07:18:43Z\",\n    \"custom_fields\": [\n        {\n            \"name\": \"Kitchen Utensils\",\n            \"value\": null\n        },\n        {\n            \"name\": \"Filter Field Multi\",\n            \"value\": null\n        },\n        {\n            \"name\": \"Filter Field Single\",\n            \"value\": \"Single 1\"\n        },\n        {\n            \"name\": \"Filter Field Text\",\n            \"value\": null\n        },\n        {\n            \"name\": \"Recipe Multi Field\",\n            \"value\": [\n                \"Choice 1\",\n                \"Choice 3\"\n            ]\n        }\n    ],\n    \"allergens\": {\n        \"sunflower_seeds\": \"DOES_NOT_CONTAIN\",\n        \"shellfish\": \"DOES_NOT_CONTAIN\",\n        \"macadamia_nuts\": \"DOES_NOT_CONTAIN\",\n        \"wheat\": \"CONTAINS\",\n        \"corn\": \"DOES_NOT_CONTAIN\",\n        \"pistachio_nuts\": \"DOES_NOT_CONTAIN\",\n        \"sulfites\": \"DOES_NOT_CONTAIN\",\n        \"mustard\": \"DOES_NOT_CONTAIN\",\n        \"hazelnuts\": \"DOES_NOT_CONTAIN\",\n        \"barley\": \"DOES_NOT_CONTAIN\",\n        \"seeds\": \"DOES_NOT_CONTAIN\",\n        \"brazil_nuts\": \"DOES_NOT_CONTAIN\",\n        \"lactose\": \"DOES_NOT_CONTAIN\",\n        \"nut\": \"DOES_NOT_CONTAIN\",\n        \"oats\": \"DOES_NOT_CONTAIN\",\n        \"celery\": \"DOES_NOT_CONTAIN\",\n        \"fish\": \"DOES_NOT_CONTAIN\",\n        \"pecan_nuts\": \"DOES_NOT_CONTAIN\",\n        \"sesame\": \"DOES_NOT_CONTAIN\",\n        \"soy\": \"DOES_NOT_CONTAIN\",\n        \"cashews\": \"DOES_NOT_CONTAIN\",\n        \"poppy_seeds\": \"DOES_NOT_CONTAIN\",\n        \"almonds\": \"DOES_NOT_CONTAIN\",\n        \"peanut\": \"DOES_NOT_CONTAIN\",\n        \"legume_pulse\": \"DOES_NOT_CONTAIN\",\n        \"gluten\": \"CONTAINS\",\n        \"walnuts\": \"DOES_NOT_CONTAIN\",\n        \"kamut\": \"DOES_NOT_CONTAIN\",\n        \"lupine\": \"DOES_NOT_CONTAIN\",\n        \"rye\": \"DOES_NOT_CONTAIN\",\n        \"spelt\": \"DOES_NOT_CONTAIN\",\n        \"mollusc\": \"DOES_NOT_CONTAIN\",\n        \"milk_dairy\": \"DOES_NOT_CONTAIN\",\n        \"egg\": \"MAY_CONTAIN_TRACES\"\n    },\n    \"manual_net_volume\": null,\n    \"net_weight\": \"3.00\",\n    \"clones\": [\n        \"https://app.apicbase.com/api/v2/products/recipes/449964576800007/\"\n    ],\n    \"url\": \"https://app.apicbase.com/api/v2/products/recipes/349980442190000/\",\n    \"ingredients\": [\n        {\n            \"quantity\": \"1.000\",\n            \"waste_percentage\": 0.0,\n            \"number\": 1,\n            \"subrecipe\": null,\n            \"id\": \"764556666890005\",\n            \"type\": \"INGREDIENT\",\n            \"ingredient\": \"https://app.apicbase.com/api/v2/products/ingredients/764556666890005/\",\n            \"uid\": \"\",\n            \"remarks\": \"\",\n            \"name\": \"Pasta Spaghetti\",\n            \"unit\": \"kg\"\n        },\n        {\n            \"quantity\": \"800.000\",\n            \"waste_percentage\": 0.0,\n            \"number\": 2,\n            \"subrecipe\": null,\n            \"id\": \"764556486880003\",\n            \"type\": \"INGREDIENT\",\n            \"ingredient\": \"https://app.apicbase.com/api/v2/products/ingredients/764556486880003/\",\n            \"uid\": \"\",\n            \"remarks\": \"\",\n            \"name\": \"Beef mince\",\n            \"unit\": \"g\"\n        },\n        {\n            \"quantity\": null,\n            \"waste_percentage\": 0.0,\n            \"number\": 3,\n            \"subrecipe\": null,\n            \"id\": \"664556196850009\",\n            \"type\": \"INGREDIENT\",\n            \"ingredient\": \"https://app.apicbase.com/api/v2/products/ingredients/664556196850009/\",\n            \"uid\": \"\",\n            \"remarks\": \"\",\n            \"name\": \"White pepper powder\",\n            \"unit\": \"g\"\n        },\n        {\n            \"quantity\": \"2.000\",\n            \"waste_percentage\": 0.0,\n            \"number\": 4,\n            \"subrecipe\": null,\n            \"id\": \"464556907820001\",\n            \"type\": \"INGREDIENT\",\n            \"ingredient\": \"https://app.apicbase.com/api/v2/products/ingredients/464556907820001/\",\n            \"uid\": \"\",\n            \"remarks\": \"Only fresh carrots!\",\n            \"name\": \"Carrots\",\n            \"unit\": \"piece\"\n        },\n        {\n            \"quantity\": \"1.500\",\n            \"waste_percentage\": 0.0,\n            \"number\": 5,\n            \"subrecipe\": null,\n            \"id\": \"364276506701000\",\n            \"type\": \"INGREDIENT\",\n            \"ingredient\": \"https://app.apicbase.com/api/v2/products/ingredients/364276506701000/\",\n            \"uid\": null,\n            \"remarks\": \"\",\n            \"name\": \"Tomato Passata\",\n            \"unit\": \"l\"\n        }\n    ],\n    \"tax\": \"20.000\",\n    \"created_date\": \"2020-06-17T09:44:38Z\",\n    \"financial\": {\n        \"foodcost\": 0.05357142857142857,\n        \"personnel_cost\": 0.0\n    },\n    \"is_semi_finished_product\": false,\n    \"cooking_time\": \"00:02:00\",\n    \"used_in_menus\": [\n        \"https://app.apicbase.com/api/v2/products/menus/390400735470004/\"\n    ],\n    \"allergen_verified\": false,\n    \"is_stockable_recipe\": true,\n    \"manual_net_volume_unit\": null,\n    \"main_image\": {\n        \"url\": \"https://app.apicbase.com/api/v2/media/images/181566068410002/\",\n        \"id\": \"181566068410002\",\n        \"studio_login\": \"thiago@apicbase.com\",\n        \"full_image_url\": \"https://s3.eu-central-1.amazonaws.com/vault.apicbase.com/rooms/apic_user_3475/download_7MkdGJt.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMI5VVKQ52%2F20231024%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20231024T083552Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEBgaDGV1LWNlbnRyYWwtMSJIMEYCIQDyRSForhUHUlDLvTWpHe%2FeOxmZzpmsf3BvEP1xVQLo0wIhAPAdq64ECqOwuzre3LiyNXN0t7XjQclj7dNmvu4yCazkKsUFCEEQABoMODA2NDQwOTgwNjk2IgzIkqpV7gLBsWoOuhAqogU%2BYnyncJCZX98EjqDkjV0KXuEgy2ZHlXUzTiI7Qtjlaan5YCQ%2Boodt01FyP3pOaIR5C%2F0VTsAx5xPvaBsw0M7pDZZx%2F%2FjoFHUyFqp9tpUVlFU%2BZ0gDcGI4nwIyzM1WKy%2Fz8eymX66TMSKSx%2BIEOThbF3v6GG8FGEYBDG%2F6IXsoo5lRZt%2BIPVi6dPdPjdz30LDAcSFhOfTkogBIAZIzxaxE7nYlvVDczdMK%2BI%2B7rp7NW%2B9MmiUXQ%2BNTfJbHRPpLS8RFtTirycAZH%2FPNtWT93hjPAtHmg%2BNc0xYGx3JgCWAaOEJvS9KdX35WmzR9KzAFrcBktNwxaIsmAqFYr4tmc%2BXbsahtDwKLioRY1oRpoqzwZwkeYMueCxosTUpuVXnFqyw11nO72OXgy8Zpw03gXQOG1DaCyIWqgmS52P5FoM9FALG%2BnRNOyy09bXcQV2B8DjNZ5%2BDHJVK2vkG9SlbmUGRTaIp1QXaAYzjenWOgTDVSa4iVoH2pnaiLgP57OzUvlnzpoSeoODoVKJZTQTpWcSQiO2bfKym7QRKEVAsNJxi7pxckRhRaIuZJxNFboX%2FNC73BKnuypcwDsIJyJfq7vKrZZT%2FyD3m0Hzy5A1sq2XysJwbSdHObMzXRKWobvaoECWiApA15oLSpms9Fo4ZG00bZ7mqoykyUaDrxTCBEjWMQu8BIcPdvy3O6XMLcoz587PeUJ%2BdE6L81%2BkCj%2BwpuE0Jp1wa1dgi9kGZw8QZT%2Bg9wxqpBYqIo2nITVKY8fRyi6YZ3GgJ999hKM8F265ZhDtEdJnRXqtMPhxW%2F4Q6Aw8N%2BGxNWJ%2BMZoBTLS4OA%2BNiHO2cE3tc3ncScPjNCprkxhARP%2BpCkShjMnzBuDkqbvVrw6Ecvg0Zid841QE%2FZl2GsX66nfzCi7d2pBjqwAT6ZrZd10tEqPgBBxW4y09iTzMivqITTfd%2F7WWmqsfNZXNjjx%2FRtVHEcolMyp9SS0Dkdjqm2D7UVuNu3AwQBc2QqGTNEpDt2O5TpHu%2BvY1V6q2BQ4uIepESac4PWZntqTGx%2BaLy%2F4SovKUlXThhWY2qJd8wa7tTKIY83s94jkaA4sD7OBSKbnaecKy4W2proE%2BwJLr0ITvMA2ynKnIXaxEH1WMlP4bAKeYV%2F2ppdbvCu&X-Amz-Signature=f8a4aafbd38d79659b4e3df85aac3b09e2af98bad9b6438f0d04d6a2a458076c\",\n        \"web_image_url\": \"https://s3.eu-central-1.amazonaws.com/vault.apicbase.com/rooms/apic_user_3475/download-webImage_large.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMI5VVKQ52%2F20231024%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20231024T083552Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEBgaDGV1LWNlbnRyYWwtMSJIMEYCIQDyRSForhUHUlDLvTWpHe%2FeOxmZzpmsf3BvEP1xVQLo0wIhAPAdq64ECqOwuzre3LiyNXN0t7XjQclj7dNmvu4yCazkKsUFCEEQABoMODA2NDQwOTgwNjk2IgzIkqpV7gLBsWoOuhAqogU%2BYnyncJCZX98EjqDkjV0KXuEgy2ZHlXUzTiI7Qtjlaan5YCQ%2Boodt01FyP3pOaIR5C%2F0VTsAx5xPvaBsw0M7pDZZx%2F%2FjoFHUyFqp9tpUVlFU%2BZ0gDcGI4nwIyzM1WKy%2Fz8eymX66TMSKSx%2BIEOThbF3v6GG8FGEYBDG%2F6IXsoo5lRZt%2BIPVi6dPdPjdz30LDAcSFhOfTkogBIAZIzxaxE7nYlvVDczdMK%2BI%2B7rp7NW%2B9MmiUXQ%2BNTfJbHRPpLS8RFtTirycAZH%2FPNtWT93hjPAtHmg%2BNc0xYGx3JgCWAaOEJvS9KdX35WmzR9KzAFrcBktNwxaIsmAqFYr4tmc%2BXbsahtDwKLioRY1oRpoqzwZwkeYMueCxosTUpuVXnFqyw11nO72OXgy8Zpw03gXQOG1DaCyIWqgmS52P5FoM9FALG%2BnRNOyy09bXcQV2B8DjNZ5%2BDHJVK2vkG9SlbmUGRTaIp1QXaAYzjenWOgTDVSa4iVoH2pnaiLgP57OzUvlnzpoSeoODoVKJZTQTpWcSQiO2bfKym7QRKEVAsNJxi7pxckRhRaIuZJxNFboX%2FNC73BKnuypcwDsIJyJfq7vKrZZT%2FyD3m0Hzy5A1sq2XysJwbSdHObMzXRKWobvaoECWiApA15oLSpms9Fo4ZG00bZ7mqoykyUaDrxTCBEjWMQu8BIcPdvy3O6XMLcoz587PeUJ%2BdE6L81%2BkCj%2BwpuE0Jp1wa1dgi9kGZw8QZT%2Bg9wxqpBYqIo2nITVKY8fRyi6YZ3GgJ999hKM8F265ZhDtEdJnRXqtMPhxW%2F4Q6Aw8N%2BGxNWJ%2BMZoBTLS4OA%2BNiHO2cE3tc3ncScPjNCprkxhARP%2BpCkShjMnzBuDkqbvVrw6Ecvg0Zid841QE%2FZl2GsX66nfzCi7d2pBjqwAT6ZrZd10tEqPgBBxW4y09iTzMivqITTfd%2F7WWmqsfNZXNjjx%2FRtVHEcolMyp9SS0Dkdjqm2D7UVuNu3AwQBc2QqGTNEpDt2O5TpHu%2BvY1V6q2BQ4uIepESac4PWZntqTGx%2BaLy%2F4SovKUlXThhWY2qJd8wa7tTKIY83s94jkaA4sD7OBSKbnaecKy4W2proE%2BwJLr0ITvMA2ynKnIXaxEH1WMlP4bAKeYV%2F2ppdbvCu&X-Amz-Signature=e66eeeb375ed05a3fb6e194d1b46fd4d8f79e20c9f5f4f9c8bac52440aacf466\",\n        \"thumb_image_url\": \"https://s3.eu-central-1.amazonaws.com/vault.apicbase.com/rooms/apic_user_3475/download-thumbImage.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMI5VVKQ52%2F20231024%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20231024T083552Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEBgaDGV1LWNlbnRyYWwtMSJIMEYCIQDyRSForhUHUlDLvTWpHe%2FeOxmZzpmsf3BvEP1xVQLo0wIhAPAdq64ECqOwuzre3LiyNXN0t7XjQclj7dNmvu4yCazkKsUFCEEQABoMODA2NDQwOTgwNjk2IgzIkqpV7gLBsWoOuhAqogU%2BYnyncJCZX98EjqDkjV0KXuEgy2ZHlXUzTiI7Qtjlaan5YCQ%2Boodt01FyP3pOaIR5C%2F0VTsAx5xPvaBsw0M7pDZZx%2F%2FjoFHUyFqp9tpUVlFU%2BZ0gDcGI4nwIyzM1WKy%2Fz8eymX66TMSKSx%2BIEOThbF3v6GG8FGEYBDG%2F6IXsoo5lRZt%2BIPVi6dPdPjdz30LDAcSFhOfTkogBIAZIzxaxE7nYlvVDczdMK%2BI%2B7rp7NW%2B9MmiUXQ%2BNTfJbHRPpLS8RFtTirycAZH%2FPNtWT93hjPAtHmg%2BNc0xYGx3JgCWAaOEJvS9KdX35WmzR9KzAFrcBktNwxaIsmAqFYr4tmc%2BXbsahtDwKLioRY1oRpoqzwZwkeYMueCxosTUpuVXnFqyw11nO72OXgy8Zpw03gXQOG1DaCyIWqgmS52P5FoM9FALG%2BnRNOyy09bXcQV2B8DjNZ5%2BDHJVK2vkG9SlbmUGRTaIp1QXaAYzjenWOgTDVSa4iVoH2pnaiLgP57OzUvlnzpoSeoODoVKJZTQTpWcSQiO2bfKym7QRKEVAsNJxi7pxckRhRaIuZJxNFboX%2FNC73BKnuypcwDsIJyJfq7vKrZZT%2FyD3m0Hzy5A1sq2XysJwbSdHObMzXRKWobvaoECWiApA15oLSpms9Fo4ZG00bZ7mqoykyUaDrxTCBEjWMQu8BIcPdvy3O6XMLcoz587PeUJ%2BdE6L81%2BkCj%2BwpuE0Jp1wa1dgi9kGZw8QZT%2Bg9wxqpBYqIo2nITVKY8fRyi6YZ3GgJ999hKM8F265ZhDtEdJnRXqtMPhxW%2F4Q6Aw8N%2BGxNWJ%2BMZoBTLS4OA%2BNiHO2cE3tc3ncScPjNCprkxhARP%2BpCkShjMnzBuDkqbvVrw6Ecvg0Zid841QE%2FZl2GsX66nfzCi7d2pBjqwAT6ZrZd10tEqPgBBxW4y09iTzMivqITTfd%2F7WWmqsfNZXNjjx%2FRtVHEcolMyp9SS0Dkdjqm2D7UVuNu3AwQBc2QqGTNEpDt2O5TpHu%2BvY1V6q2BQ4uIepESac4PWZntqTGx%2BaLy%2F4SovKUlXThhWY2qJd8wa7tTKIY83s94jkaA4sD7OBSKbnaecKy4W2proE%2BwJLr0ITvMA2ynKnIXaxEH1WMlP4bAKeYV%2F2ppdbvCu&X-Amz-Signature=9d2ba18bb9ea429ff2e2a04b88aa1cf987cd6a2afc73aee88c6b6b4ff812c074\",\n        \"restaurant\": null,\n        \"description\": \"Spaghetti Bolognese\",\n        \"category\": \"recipe\",\n        \"uploaded_at\": \"2020-06-17T16:08:28Z\",\n        \"picture_taken_date\": \"2020-06-17T16:08:28Z\",\n        \"shared_on\": null,\n        \"modified_date\": \"2020-06-17T16:09:49Z\",\n        \"uploaded_by\": \"john.doe@gmail.com\",\n        \"tags\": [\n            {\n                \"id\": \"id-54-78\",\n                \"top\": 78,\n                \"left\": 54,\n                \"text\": \"tag 1\"\n            },\n            {\n                \"id\": \"id-65-43\",\n                \"top\": 43,\n                \"left\": 65,\n                \"text\": \"tag 2\"\n            }\n        ],\n        \"external\": true\n    },\n    \"storage_conditions_translations\": {},\n    \"created_by\": \"john.doe@gmail.com\",\n    \"net_volume_unit\": \"ml\",\n    \"inventory_ingredient\": \"364297942201009\",\n    \"shelf_life\": {\n        \"days\": 4,\n        \"hours\": 0\n    },\n    \"nutrition_info\": {\n        \"for\": {\n            \"quantity\": 100,\n            \"unit\": \"g\"\n        },\n        \"kcal\": {\n            \"quantity\": 3.333333333333334,\n            \"unit\": \"kcal\"\n        },\n        \"kj\": {\n            \"quantity\": 13.946666666666669,\n            \"unit\": \"kJ\"\n        },\n        \"fat\": {\n            \"quantity\": 3.333333333333334,\n            \"unit\": \"g\"\n        },\n        \"saturated_fat\": {\n            \"quantity\": 1.666666666666667,\n            \"unit\": \"g\"\n        },\n        \"carbohydrate\": {\n            \"quantity\": 3.333333333333334,\n            \"unit\": \"g\"\n        },\n        \"sugar\": {\n            \"quantity\": 3.333333333333334,\n            \"unit\": \"g\"\n        },\n        \"protein\": {\n            \"quantity\": 3.333333333333334,\n            \"unit\": \"g\"\n        },\n        \"salt\": {\n            \"quantity\": 3.333333333333334,\n            \"unit\": \"g\"\n        },\n        \"sodium\": {\n            \"quantity\": 1.3333333333333335,\n            \"unit\": \"g\"\n        }\n    },\n    \"description\": \"A free text field here\",\n    \"dietary_info\": {\n        \"carrot\": true,\n        \"propionates\": false,\n        \"nitrates\": false,\n        \"preservative\": false,\n        \"taurine\": false,\n        \"poultry_meat\": false,\n        \"coriander\": false,\n        \"flavor_enhancer\": false,\n        \"vegetarian\": false,\n        \"benzoates\": false,\n        \"glutamate\": false,\n        \"antioxidant\": false,\n        \"caffeine\": false,\n        \"quinine\": false,\n        \"sorbates\": false,\n        \"halal\": false,\n        \"kosher\": false,\n        \"acesulfame_e962\": false,\n        \"sulphur\": false,\n        \"blackened\": false,\n        \"vegan\": false,\n        \"alcohol\": false,\n        \"genetic_modified\": false,\n        \"sweetener\": false,\n        \"aspartame_e951\": false,\n        \"coloring\": false,\n        \"beef\": true,\n        \"cacao\": false,\n        \"pigmeat\": false,\n        \"lamb\": false,\n        \"phosphate\": false\n    },\n    \"id\": \"349980442190000\",\n    \"recipe_class\": \"Dish\",\n    \"category\": \"\",\n    \"season\": \"all_seasons\",\n    \"composition\": \"<p>An explanation about how to compose this recipe goes here.</p>\",\n    \"preferred_uoms\": null,\n    \"cooking_time_passive\": \"00:15:30\",\n    \"highly_perishable\": false,\n    \"main_stock_items\": [\n        {\n            \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421747108501007/\"\n        }\n    ],\n    \"target_profit_margin\": \"80.00\",\n    \"plating_time\": \"00:01:00\",\n    \"difficulty\": 1,\n    \"name_translations\": {\n        \"en\": \"Spaghetti Bolognese\",\n        \"hu\": \"Spaghetti Bolognese\"\n    },\n    \"net_volume\": \"3000.00\",\n    \"storage_conditions\": \"\",\n    \"portion_weight_unit\": \"kg\",\n    \"recipe_type\": \"Main course\",\n    \"nutriscore\": null,\n    \"images\": [\n        \"https://app.apicbase.com/api/v2/media/images/181566068410002/\"\n    ],\n    \"used_in_recipes\": [],\n    \"portion_weight\": 0.1875,\n    \"persons\": 16,\n    \"outlets\": [\n        \"https://app.apicbase.com/api/v2/accounts/outlets/229100415400002/\",\n        \"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/\",\n        \"https://app.apicbase.com/api/v2/accounts/outlets/729100535470009/\"\n    ],\n    \"uid\": \"0001\",\n    \"recipe_type_other\": null,\n    \"prep_time\": \"00:05:00\",\n    \"original\": null,\n    \"manual_net_weight_unit\": \"kg\",\n    \"steps\": [\n        {\n            \"description\": \"This is the first step.\",\n            \"image_thumb_url\": null,\n            \"image_web_url\": null,\n            \"image_orig_url\": null,\n            \"description_translations\": [\n                {\n                    \"string\": \"This is the first step.\",\n                    \"base_language_code\": \"en\"\n                },\n                {\n                    \"string\": \"This is the first step.\",\n                    \"base_language_code\": \"hu\"\n                }\n            ]\n        },\n        {\n            \"description\": \"This is the second step.\",\n            \"image_thumb_url\": null,\n            \"image_web_url\": null,\n            \"image_orig_url\": null,\n            \"description_translations\": [\n                {\n                    \"string\": \"This is the second step.\",\n                    \"base_language_code\": \"en\"\n                },\n                {\n                    \"string\": \"This is the second step.\",\n                    \"base_language_code\": \"hu\"\n                }\n            ]\n        },\n        {\n            \"description\": \"Third step, voilà.\",\n            \"image_thumb_url\": null,\n            \"image_web_url\": null,\n            \"image_orig_url\": null,\n            \"description_translations\": [\n                {\n                    \"string\": \"Third step, voilà.\",\n                    \"base_language_code\": \"en\"\n                },\n                {\n                    \"string\": \"Third step, voilà.\",\n                    \"base_language_code\": \"hu\"\n                }\n            ]\n        }\n    ],\n    \"portion_pieces\": null,\n    \"carbon_footprint_ingredient_contribution\": [\n      {\n      \t\"id\": \"764556666890005\",\n        \"name\": \"Pasta Spaghetti\",\n        \"contribution_per_kg\": {\n        \t\"water_m3\": 33.3333333333,\n          \"land_m2\": 33.3333333333,\n          \"co2eq_farm_to_farmgate_kg\": 33.3333333333\n        },\n        \"contribution_per_portion\": {\n        \t\"water_m3\": 23.3333333333,\n          \"land_m2\": 23.3333333333,\n          \"co2eq_farm_to_farmgate_kg\": 23.3333333333\n        }\n      },\n      {\n        \"id\": \"764556486880003\",\n        \"name\": \"Beef mince\",\n        \"contribution_per_kg\": {\n        \t\"water_m3\": 26.6666666667,\n          \"land_m2\": 26.6666666667,\n          \"co2eq_farm_to_farmgate_kg\": 26.6666666667\n        },\n        \"contribution_per_portion\": {\n        \t\"water_m3\": 18.6666666667,\n          \"land_m2\": 18.6666666667,\n          \"co2eq_farm_to_farmgate_kg\": 18.6666666667\n        }\n      }\n    ],\n    \"carbon_footprint\": {\n      \"land_m2\": 60,\n      \"co2eq_cradle_to_gate_kg\": 0,\n      \"co2eq_farm_to_farmgate_kg\": 60,\n      \"water_m3\": 60\n    },\n    \"carbon_footprint_per_portion\": {\n      \"land_m2\": 42,\n      \"co2eq_cradle_to_gate_kg\": 0,\n      \"co2eq_farm_to_farmgate_kg\": 42,\n      \"water_m3\": 42\n    }\n}"}},"schema":{"type":"object","properties":{"name":{"type":"string","example":"Spaghetti Bolognese"},"manual_net_weight":{"type":"integer","example":3,"default":0},"subcategory":{"type":"string","example":""},"net_weight_unit":{"type":"string","example":"kg"},"current_sell_price":{"type":"object","properties":{"created":{"type":"string","example":"2021-11-04 10:20:58.627240"},"pricing":{"type":"integer","example":1,"default":0},"user_pk":{},"username":{}}},"nutrition_info_per_portion":{"type":"object","properties":{"for":{"type":"object","properties":{"quantity":{"type":"integer","example":1,"default":0},"unit":{"type":"string","example":"portion"}}},"kcal":{"type":"object","properties":{"quantity":{"type":"number","example":6.25,"default":0},"unit":{"type":"string","example":"kcal"}}},"kj":{"type":"object","properties":{"quantity":{"type":"number","example":26.150000000000002,"default":0},"unit":{"type":"string","example":"kJ"}}},"fat":{"type":"object","properties":{"quantity":{"type":"number","example":6.25,"default":0},"unit":{"type":"string","example":"g"}}},"saturated_fat":{"type":"object","properties":{"quantity":{"type":"number","example":3.125,"default":0},"unit":{"type":"string","example":"g"}}},"carbohydrate":{"type":"object","properties":{"quantity":{"type":"number","example":6.25,"default":0},"unit":{"type":"string","example":"g"}}},"sugar":{"type":"object","properties":{"quantity":{"type":"number","example":6.25,"default":0},"unit":{"type":"string","example":"g"}}},"protein":{"type":"object","properties":{"quantity":{"type":"number","example":6.25,"default":0},"unit":{"type":"string","example":"g"}}},"salt":{"type":"object","properties":{"quantity":{"type":"number","example":6.25,"default":0},"unit":{"type":"string","example":"g"}}},"sodium":{"type":"object","properties":{"quantity":{"type":"number","example":2.5,"default":0},"unit":{"type":"string","example":"g"}}}}},"outlet_prices":{"type":"array","items":{"type":"object","properties":{"created":{"type":"string","example":"2022-02-23 12:21:05.335435"},"pricing":{"type":"integer","example":8,"default":0},"user_pk":{},"username":{},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"829100725420008"},"name":{"type":"string","example":"Brussel"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"}}}}}},"prep_time_passive":{},"web_page":{"type":"string","example":"https://app.apicbase.com/library/recipe/89124/"},"cuisine":{"type":"string","example":"Italian"},"remarks":{"type":"string","example":"<p>General remarks about this recipe. Free text.</p>"},"recipe_stage":{"type":"string","example":"active"},"sell_price_history":{"type":"array","items":{"type":"object","properties":{"created":{"type":"string","example":"2020-06-17 11:44:38.762287"},"pricing":{"type":"integer","example":13,"default":0},"username":{"type":"string","example":"john.doe@gmail.com"}}}},"modified_date":{"type":"string","example":"2023-06-07T07:18:43Z"},"custom_fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Kitchen Utensils"},"value":{}}}},"allergens":{"type":"object","properties":{"sunflower_seeds":{"type":"string","example":"DOES_NOT_CONTAIN"},"shellfish":{"type":"string","example":"DOES_NOT_CONTAIN"},"macadamia_nuts":{"type":"string","example":"DOES_NOT_CONTAIN"},"wheat":{"type":"string","example":"CONTAINS"},"corn":{"type":"string","example":"DOES_NOT_CONTAIN"},"pistachio_nuts":{"type":"string","example":"DOES_NOT_CONTAIN"},"sulfites":{"type":"string","example":"DOES_NOT_CONTAIN"},"mustard":{"type":"string","example":"DOES_NOT_CONTAIN"},"hazelnuts":{"type":"string","example":"DOES_NOT_CONTAIN"},"barley":{"type":"string","example":"DOES_NOT_CONTAIN"},"seeds":{"type":"string","example":"DOES_NOT_CONTAIN"},"brazil_nuts":{"type":"string","example":"DOES_NOT_CONTAIN"},"lactose":{"type":"string","example":"DOES_NOT_CONTAIN"},"nut":{"type":"string","example":"DOES_NOT_CONTAIN"},"oats":{"type":"string","example":"DOES_NOT_CONTAIN"},"celery":{"type":"string","example":"DOES_NOT_CONTAIN"},"fish":{"type":"string","example":"DOES_NOT_CONTAIN"},"pecan_nuts":{"type":"string","example":"DOES_NOT_CONTAIN"},"sesame":{"type":"string","example":"DOES_NOT_CONTAIN"},"soy":{"type":"string","example":"DOES_NOT_CONTAIN"},"cashews":{"type":"string","example":"DOES_NOT_CONTAIN"},"poppy_seeds":{"type":"string","example":"DOES_NOT_CONTAIN"},"almonds":{"type":"string","example":"DOES_NOT_CONTAIN"},"peanut":{"type":"string","example":"DOES_NOT_CONTAIN"},"legume_pulse":{"type":"string","example":"DOES_NOT_CONTAIN"},"gluten":{"type":"string","example":"CONTAINS"},"walnuts":{"type":"string","example":"DOES_NOT_CONTAIN"},"kamut":{"type":"string","example":"DOES_NOT_CONTAIN"},"lupine":{"type":"string","example":"DOES_NOT_CONTAIN"},"rye":{"type":"string","example":"DOES_NOT_CONTAIN"},"spelt":{"type":"string","example":"DOES_NOT_CONTAIN"},"mollusc":{"type":"string","example":"DOES_NOT_CONTAIN"},"milk_dairy":{"type":"string","example":"DOES_NOT_CONTAIN"},"egg":{"type":"string","example":"MAY_CONTAIN_TRACES"}}},"manual_net_volume":{},"net_weight":{"type":"string","example":"3.00"},"clones":{"type":"array","items":{"type":"string","example":"https://app.apicbase.com/api/v2/products/recipes/449964576800007/"}},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/recipes/349980442190000/"},"ingredients":{"type":"array","items":{"type":"object","properties":{"quantity":{"type":"string","example":"1.000"},"waste_percentage":{"type":"integer","example":0,"default":0},"number":{"type":"integer","example":1,"default":0},"subrecipe":{},"id":{"type":"string","example":"764556666890005"},"type":{"type":"string","example":"INGREDIENT"},"ingredient":{"type":"string","example":"https://app.apicbase.com/api/v2/products/ingredients/764556666890005/"},"uid":{"type":"string","example":""},"remarks":{"type":"string","example":""},"name":{"type":"string","example":"Pasta Spaghetti"},"unit":{"type":"string","example":"kg"}}}},"tax":{"type":"string","example":"20.000"},"created_date":{"type":"string","example":"2020-06-17T09:44:38Z"},"financial":{"type":"object","properties":{"foodcost":{"type":"number","example":0.05357142857142857,"default":0},"personnel_cost":{"type":"integer","example":0,"default":0}}},"is_semi_finished_product":{"type":"boolean","example":false,"default":true},"cooking_time":{"type":"string","example":"00:02:00"},"used_in_menus":{"type":"array","items":{"type":"string","example":"https://app.apicbase.com/api/v2/products/menus/390400735470004/"}},"allergen_verified":{"type":"boolean","example":false,"default":true},"is_stockable_recipe":{"type":"boolean","example":true,"default":true},"manual_net_volume_unit":{},"main_image":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v2/media/images/181566068410002/"},"id":{"type":"string","example":"181566068410002"},"studio_login":{"type":"string","example":"thiago@apicbase.com"},"full_image_url":{"type":"string","example":"https://s3.eu-central-1.amazonaws.com/vault.apicbase.com/rooms/apic_user_3475/download_7MkdGJt.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMI5VVKQ52%2F20231024%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20231024T083552Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEBgaDGV1LWNlbnRyYWwtMSJIMEYCIQDyRSForhUHUlDLvTWpHe%2FeOxmZzpmsf3BvEP1xVQLo0wIhAPAdq64ECqOwuzre3LiyNXN0t7XjQclj7dNmvu4yCazkKsUFCEEQABoMODA2NDQwOTgwNjk2IgzIkqpV7gLBsWoOuhAqogU%2BYnyncJCZX98EjqDkjV0KXuEgy2ZHlXUzTiI7Qtjlaan5YCQ%2Boodt01FyP3pOaIR5C%2F0VTsAx5xPvaBsw0M7pDZZx%2F%2FjoFHUyFqp9tpUVlFU%2BZ0gDcGI4nwIyzM1WKy%2Fz8eymX66TMSKSx%2BIEOThbF3v6GG8FGEYBDG%2F6IXsoo5lRZt%2BIPVi6dPdPjdz30LDAcSFhOfTkogBIAZIzxaxE7nYlvVDczdMK%2BI%2B7rp7NW%2B9MmiUXQ%2BNTfJbHRPpLS8RFtTirycAZH%2FPNtWT93hjPAtHmg%2BNc0xYGx3JgCWAaOEJvS9KdX35WmzR9KzAFrcBktNwxaIsmAqFYr4tmc%2BXbsahtDwKLioRY1oRpoqzwZwkeYMueCxosTUpuVXnFqyw11nO72OXgy8Zpw03gXQOG1DaCyIWqgmS52P5FoM9FALG%2BnRNOyy09bXcQV2B8DjNZ5%2BDHJVK2vkG9SlbmUGRTaIp1QXaAYzjenWOgTDVSa4iVoH2pnaiLgP57OzUvlnzpoSeoODoVKJZTQTpWcSQiO2bfKym7QRKEVAsNJxi7pxckRhRaIuZJxNFboX%2FNC73BKnuypcwDsIJyJfq7vKrZZT%2FyD3m0Hzy5A1sq2XysJwbSdHObMzXRKWobvaoECWiApA15oLSpms9Fo4ZG00bZ7mqoykyUaDrxTCBEjWMQu8BIcPdvy3O6XMLcoz587PeUJ%2BdE6L81%2BkCj%2BwpuE0Jp1wa1dgi9kGZw8QZT%2Bg9wxqpBYqIo2nITVKY8fRyi6YZ3GgJ999hKM8F265ZhDtEdJnRXqtMPhxW%2F4Q6Aw8N%2BGxNWJ%2BMZoBTLS4OA%2BNiHO2cE3tc3ncScPjNCprkxhARP%2BpCkShjMnzBuDkqbvVrw6Ecvg0Zid841QE%2FZl2GsX66nfzCi7d2pBjqwAT6ZrZd10tEqPgBBxW4y09iTzMivqITTfd%2F7WWmqsfNZXNjjx%2FRtVHEcolMyp9SS0Dkdjqm2D7UVuNu3AwQBc2QqGTNEpDt2O5TpHu%2BvY1V6q2BQ4uIepESac4PWZntqTGx%2BaLy%2F4SovKUlXThhWY2qJd8wa7tTKIY83s94jkaA4sD7OBSKbnaecKy4W2proE%2BwJLr0ITvMA2ynKnIXaxEH1WMlP4bAKeYV%2F2ppdbvCu&X-Amz-Signature=f8a4aafbd38d79659b4e3df85aac3b09e2af98bad9b6438f0d04d6a2a458076c"},"web_image_url":{"type":"string","example":"https://s3.eu-central-1.amazonaws.com/vault.apicbase.com/rooms/apic_user_3475/download-webImage_large.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMI5VVKQ52%2F20231024%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20231024T083552Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEBgaDGV1LWNlbnRyYWwtMSJIMEYCIQDyRSForhUHUlDLvTWpHe%2FeOxmZzpmsf3BvEP1xVQLo0wIhAPAdq64ECqOwuzre3LiyNXN0t7XjQclj7dNmvu4yCazkKsUFCEEQABoMODA2NDQwOTgwNjk2IgzIkqpV7gLBsWoOuhAqogU%2BYnyncJCZX98EjqDkjV0KXuEgy2ZHlXUzTiI7Qtjlaan5YCQ%2Boodt01FyP3pOaIR5C%2F0VTsAx5xPvaBsw0M7pDZZx%2F%2FjoFHUyFqp9tpUVlFU%2BZ0gDcGI4nwIyzM1WKy%2Fz8eymX66TMSKSx%2BIEOThbF3v6GG8FGEYBDG%2F6IXsoo5lRZt%2BIPVi6dPdPjdz30LDAcSFhOfTkogBIAZIzxaxE7nYlvVDczdMK%2BI%2B7rp7NW%2B9MmiUXQ%2BNTfJbHRPpLS8RFtTirycAZH%2FPNtWT93hjPAtHmg%2BNc0xYGx3JgCWAaOEJvS9KdX35WmzR9KzAFrcBktNwxaIsmAqFYr4tmc%2BXbsahtDwKLioRY1oRpoqzwZwkeYMueCxosTUpuVXnFqyw11nO72OXgy8Zpw03gXQOG1DaCyIWqgmS52P5FoM9FALG%2BnRNOyy09bXcQV2B8DjNZ5%2BDHJVK2vkG9SlbmUGRTaIp1QXaAYzjenWOgTDVSa4iVoH2pnaiLgP57OzUvlnzpoSeoODoVKJZTQTpWcSQiO2bfKym7QRKEVAsNJxi7pxckRhRaIuZJxNFboX%2FNC73BKnuypcwDsIJyJfq7vKrZZT%2FyD3m0Hzy5A1sq2XysJwbSdHObMzXRKWobvaoECWiApA15oLSpms9Fo4ZG00bZ7mqoykyUaDrxTCBEjWMQu8BIcPdvy3O6XMLcoz587PeUJ%2BdE6L81%2BkCj%2BwpuE0Jp1wa1dgi9kGZw8QZT%2Bg9wxqpBYqIo2nITVKY8fRyi6YZ3GgJ999hKM8F265ZhDtEdJnRXqtMPhxW%2F4Q6Aw8N%2BGxNWJ%2BMZoBTLS4OA%2BNiHO2cE3tc3ncScPjNCprkxhARP%2BpCkShjMnzBuDkqbvVrw6Ecvg0Zid841QE%2FZl2GsX66nfzCi7d2pBjqwAT6ZrZd10tEqPgBBxW4y09iTzMivqITTfd%2F7WWmqsfNZXNjjx%2FRtVHEcolMyp9SS0Dkdjqm2D7UVuNu3AwQBc2QqGTNEpDt2O5TpHu%2BvY1V6q2BQ4uIepESac4PWZntqTGx%2BaLy%2F4SovKUlXThhWY2qJd8wa7tTKIY83s94jkaA4sD7OBSKbnaecKy4W2proE%2BwJLr0ITvMA2ynKnIXaxEH1WMlP4bAKeYV%2F2ppdbvCu&X-Amz-Signature=e66eeeb375ed05a3fb6e194d1b46fd4d8f79e20c9f5f4f9c8bac52440aacf466"},"thumb_image_url":{"type":"string","example":"https://s3.eu-central-1.amazonaws.com/vault.apicbase.com/rooms/apic_user_3475/download-thumbImage.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMI5VVKQ52%2F20231024%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20231024T083552Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEBgaDGV1LWNlbnRyYWwtMSJIMEYCIQDyRSForhUHUlDLvTWpHe%2FeOxmZzpmsf3BvEP1xVQLo0wIhAPAdq64ECqOwuzre3LiyNXN0t7XjQclj7dNmvu4yCazkKsUFCEEQABoMODA2NDQwOTgwNjk2IgzIkqpV7gLBsWoOuhAqogU%2BYnyncJCZX98EjqDkjV0KXuEgy2ZHlXUzTiI7Qtjlaan5YCQ%2Boodt01FyP3pOaIR5C%2F0VTsAx5xPvaBsw0M7pDZZx%2F%2FjoFHUyFqp9tpUVlFU%2BZ0gDcGI4nwIyzM1WKy%2Fz8eymX66TMSKSx%2BIEOThbF3v6GG8FGEYBDG%2F6IXsoo5lRZt%2BIPVi6dPdPjdz30LDAcSFhOfTkogBIAZIzxaxE7nYlvVDczdMK%2BI%2B7rp7NW%2B9MmiUXQ%2BNTfJbHRPpLS8RFtTirycAZH%2FPNtWT93hjPAtHmg%2BNc0xYGx3JgCWAaOEJvS9KdX35WmzR9KzAFrcBktNwxaIsmAqFYr4tmc%2BXbsahtDwKLioRY1oRpoqzwZwkeYMueCxosTUpuVXnFqyw11nO72OXgy8Zpw03gXQOG1DaCyIWqgmS52P5FoM9FALG%2BnRNOyy09bXcQV2B8DjNZ5%2BDHJVK2vkG9SlbmUGRTaIp1QXaAYzjenWOgTDVSa4iVoH2pnaiLgP57OzUvlnzpoSeoODoVKJZTQTpWcSQiO2bfKym7QRKEVAsNJxi7pxckRhRaIuZJxNFboX%2FNC73BKnuypcwDsIJyJfq7vKrZZT%2FyD3m0Hzy5A1sq2XysJwbSdHObMzXRKWobvaoECWiApA15oLSpms9Fo4ZG00bZ7mqoykyUaDrxTCBEjWMQu8BIcPdvy3O6XMLcoz587PeUJ%2BdE6L81%2BkCj%2BwpuE0Jp1wa1dgi9kGZw8QZT%2Bg9wxqpBYqIo2nITVKY8fRyi6YZ3GgJ999hKM8F265ZhDtEdJnRXqtMPhxW%2F4Q6Aw8N%2BGxNWJ%2BMZoBTLS4OA%2BNiHO2cE3tc3ncScPjNCprkxhARP%2BpCkShjMnzBuDkqbvVrw6Ecvg0Zid841QE%2FZl2GsX66nfzCi7d2pBjqwAT6ZrZd10tEqPgBBxW4y09iTzMivqITTfd%2F7WWmqsfNZXNjjx%2FRtVHEcolMyp9SS0Dkdjqm2D7UVuNu3AwQBc2QqGTNEpDt2O5TpHu%2BvY1V6q2BQ4uIepESac4PWZntqTGx%2BaLy%2F4SovKUlXThhWY2qJd8wa7tTKIY83s94jkaA4sD7OBSKbnaecKy4W2proE%2BwJLr0ITvMA2ynKnIXaxEH1WMlP4bAKeYV%2F2ppdbvCu&X-Amz-Signature=9d2ba18bb9ea429ff2e2a04b88aa1cf987cd6a2afc73aee88c6b6b4ff812c074"},"restaurant":{},"description":{"type":"string","example":"Spaghetti Bolognese"},"category":{"type":"string","example":"recipe"},"uploaded_at":{"type":"string","example":"2020-06-17T16:08:28Z"},"picture_taken_date":{"type":"string","example":"2020-06-17T16:08:28Z"},"shared_on":{},"modified_date":{"type":"string","example":"2020-06-17T16:09:49Z"},"uploaded_by":{"type":"string","example":"john.doe@gmail.com"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"id-54-78"},"top":{"type":"integer","example":78,"default":0},"left":{"type":"integer","example":54,"default":0},"text":{"type":"string","example":"tag 1"}}}},"external":{"type":"boolean","example":true,"default":true}}},"storage_conditions_translations":{"type":"object","properties":{}},"created_by":{"type":"string","example":"john.doe@gmail.com"},"net_volume_unit":{"type":"string","example":"ml"},"inventory_ingredient":{"type":"string","example":"364297942201009"},"shelf_life":{"type":"object","properties":{"days":{"type":"integer","example":4,"default":0},"hours":{"type":"integer","example":0,"default":0}}},"nutrition_info":{"type":"object","properties":{"for":{"type":"object","properties":{"quantity":{"type":"integer","example":100,"default":0},"unit":{"type":"string","example":"g"}}},"kcal":{"type":"object","properties":{"quantity":{"type":"number","example":3.333333333333334,"default":0},"unit":{"type":"string","example":"kcal"}}},"kj":{"type":"object","properties":{"quantity":{"type":"number","example":13.946666666666669,"default":0},"unit":{"type":"string","example":"kJ"}}},"fat":{"type":"object","properties":{"quantity":{"type":"number","example":3.333333333333334,"default":0},"unit":{"type":"string","example":"g"}}},"saturated_fat":{"type":"object","properties":{"quantity":{"type":"number","example":1.666666666666667,"default":0},"unit":{"type":"string","example":"g"}}},"carbohydrate":{"type":"object","properties":{"quantity":{"type":"number","example":3.333333333333334,"default":0},"unit":{"type":"string","example":"g"}}},"sugar":{"type":"object","properties":{"quantity":{"type":"number","example":3.333333333333334,"default":0},"unit":{"type":"string","example":"g"}}},"protein":{"type":"object","properties":{"quantity":{"type":"number","example":3.333333333333334,"default":0},"unit":{"type":"string","example":"g"}}},"salt":{"type":"object","properties":{"quantity":{"type":"number","example":3.333333333333334,"default":0},"unit":{"type":"string","example":"g"}}},"sodium":{"type":"object","properties":{"quantity":{"type":"number","example":1.3333333333333335,"default":0},"unit":{"type":"string","example":"g"}}}}},"description":{"type":"string","example":"A free text field here"},"dietary_info":{"type":"object","properties":{"carrot":{"type":"boolean","example":true,"default":true},"propionates":{"type":"boolean","example":false,"default":true},"nitrates":{"type":"boolean","example":false,"default":true},"preservative":{"type":"boolean","example":false,"default":true},"taurine":{"type":"boolean","example":false,"default":true},"poultry_meat":{"type":"boolean","example":false,"default":true},"coriander":{"type":"boolean","example":false,"default":true},"flavor_enhancer":{"type":"boolean","example":false,"default":true},"vegetarian":{"type":"boolean","example":false,"default":true},"benzoates":{"type":"boolean","example":false,"default":true},"glutamate":{"type":"boolean","example":false,"default":true},"antioxidant":{"type":"boolean","example":false,"default":true},"caffeine":{"type":"boolean","example":false,"default":true},"quinine":{"type":"boolean","example":false,"default":true},"sorbates":{"type":"boolean","example":false,"default":true},"halal":{"type":"boolean","example":false,"default":true},"kosher":{"type":"boolean","example":false,"default":true},"acesulfame_e962":{"type":"boolean","example":false,"default":true},"sulphur":{"type":"boolean","example":false,"default":true},"blackened":{"type":"boolean","example":false,"default":true},"vegan":{"type":"boolean","example":false,"default":true},"alcohol":{"type":"boolean","example":false,"default":true},"genetic_modified":{"type":"boolean","example":false,"default":true},"sweetener":{"type":"boolean","example":false,"default":true},"aspartame_e951":{"type":"boolean","example":false,"default":true},"coloring":{"type":"boolean","example":false,"default":true},"beef":{"type":"boolean","example":true,"default":true},"cacao":{"type":"boolean","example":false,"default":true},"pigmeat":{"type":"boolean","example":false,"default":true},"lamb":{"type":"boolean","example":false,"default":true},"phosphate":{"type":"boolean","example":false,"default":true}}},"id":{"type":"string","example":"349980442190000"},"recipe_class":{"type":"string","example":"Dish"},"category":{"type":"string","example":""},"season":{"type":"string","example":"all_seasons"},"composition":{"type":"string","example":"<p>An explanation about how to compose this recipe goes here.</p>"},"preferred_uoms":{},"cooking_time_passive":{"type":"string","example":"00:15:30"},"highly_perishable":{"type":"boolean","example":false,"default":true},"main_stock_items":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/421747108501007/"}}}},"target_profit_margin":{"type":"string","example":"80.00"},"plating_time":{"type":"string","example":"00:01:00"},"difficulty":{"type":"integer","example":1,"default":0},"name_translations":{"type":"object","properties":{"en":{"type":"string","example":"Spaghetti Bolognese"},"hu":{"type":"string","example":"Spaghetti Bolognese"}}},"net_volume":{"type":"string","example":"3000.00"},"storage_conditions":{"type":"string","example":""},"portion_weight_unit":{"type":"string","example":"kg"},"recipe_type":{"type":"string","example":"Main course"},"nutriscore":{},"images":{"type":"array","items":{"type":"string","example":"https://app.apicbase.com/api/v2/media/images/181566068410002/"}},"used_in_recipes":{"type":"array"},"portion_weight":{"type":"number","example":0.1875,"default":0},"persons":{"type":"integer","example":16,"default":0},"outlets":{"type":"array","items":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/229100415400002/"}},"uid":{"type":"string","example":"0001"},"recipe_type_other":{},"prep_time":{"type":"string","example":"00:05:00"},"original":{},"manual_net_weight_unit":{"type":"string","example":"kg"},"steps":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","example":"This is the first step."},"image_thumb_url":{},"image_web_url":{},"image_orig_url":{},"description_translations":{"type":"array","items":{"type":"object","properties":{"string":{"type":"string","example":"This is the first step."},"base_language_code":{"type":"string","example":"en"}}}}}}},"portion_pieces":{},"carbon_footprint_ingredient_contribution":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"764556666890005"},"name":{"type":"string","example":"Pasta Spaghetti"},"contribution_per_kg":{"type":"object","properties":{"water_m3":{"type":"number","example":33.3333333333,"default":0},"land_m2":{"type":"number","example":33.3333333333,"default":0},"co2eq_farm_to_farmgate_kg":{"type":"number","example":33.3333333333,"default":0}}},"contribution_per_portion":{"type":"object","properties":{"water_m3":{"type":"number","example":23.3333333333,"default":0},"land_m2":{"type":"number","example":23.3333333333,"default":0},"co2eq_farm_to_farmgate_kg":{"type":"number","example":23.3333333333,"default":0}}}}}},"carbon_footprint":{"type":"object","properties":{"land_m2":{"type":"integer","example":60,"default":0},"co2eq_cradle_to_gate_kg":{"type":"integer","example":0,"default":0},"co2eq_farm_to_farmgate_kg":{"type":"integer","example":60,"default":0},"water_m3":{"type":"integer","example":60,"default":0}}},"carbon_footprint_per_portion":{"type":"object","properties":{"land_m2":{"type":"integer","example":42,"default":0},"co2eq_cradle_to_gate_kg":{"type":"integer","example":0,"default":0},"co2eq_farm_to_farmgate_kg":{"type":"integer","example":42,"default":0},"water_m3":{"type":"integer","example":42,"default":0}}}}}}}}},"deprecated":false},"patch":{"summary":"Edit Recipe","description":"Edits an existing recipe.","operationId":"edit-recipe","parameters":[{"name":"recipe_id","in":"path","description":"A recipe ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"persons":{"type":"integer","description":"The amount of servings.","format":"int32"},"uid":{"type":"string","description":"The reference number. Uniqueness is enforced on this field."},"description":{"type":"string"},"cuisine":{"type":"string"},"recipe_stage":{"type":"string","enum":["complete","development","testing","active","discontinued"]},"composition":{"type":"string"},"remarks":{"type":"string"},"recipe_type":{"type":"string","enum":["base_recipe","amuse_bouche","starter","entremet","soup","main_course","dessert","drinks","other"]},"recipe_type_other":{"type":"string","description":"Only visible on the user interface if \"other\" is selected as the recipe type."},"season":{"type":"string","enum":["all_seasons","winter","spring","summer","autumn"]},"difficulty":{"type":"string","description":"Choice on a scale from 1 to 5","enum":["1","2","3","4","5"]},"recipe_class":{"type":"string","enum":["dish","base_recipe_class","ingredient","finished_product","semi_finished_product"]},"is_semi_finished_product":{"type":"boolean","default":false},"category":{"type":"string"},"subcategory":{"type":"string"},"target_profit_margin":{"type":"number","description":"A percentage.","format":"float"},"tax":{"type":"number","description":"Tax rate.","format":"float"},"sell_price":{"type":"number","format":"float"},"net_weight":{"type":"number","format":"float"},"net_weight_unit":{"type":"string","enum":["mg","g","kg","lb","oz"]},"net_volume":{"type":"number","format":"float"},"net_volume_unit":{"type":"string","enum":["ml","cl","dl","l","tbsp (US)","tbsp (UK)","tsp (US)","tsp (UK)","cup (US)","cup (UK)","fl oz (US)","fl oz (UK)","pt (US)","pt (UK)","gal (US)","gal (UK)","qt (US)","qt (UK)"]},"prep_time":{"type":"string","description":"A duration of time. Format: hh:mm:ss"},"prep_time_passive":{"type":"string","description":"A duration of time. Format: hh:mm:ss"},"cooking_time":{"type":"string","description":"A duration of time. Format: hh:mm:ss"},"cooking_time_passive":{"type":"string","description":"A duration of time. Format: hh:mm:ss"},"plating_time":{"type":"string","description":"A duration of time. Format: hh:mm:ss"},"portion_pieces":{"type":"integer","format":"int32"},"ingredients":{"type":"object","properties":{"ingredient":{"type":"string","description":"An ingredient ID."},"subrecipe":{"type":"string","description":"A subrecipe ID."},"quantity":{"type":"number","format":"float"},"unit":{"type":"string","enum":["mg","g","kg","lb","oz","ml","cl","dl","l","tbsp (US)","tbsp (UK)","tsp (US)","tsp (UK)","cup (US)","cup (UK)","fl oz (US)","fl oz (UK)","pt (US)","pt (UK)","gal (US)","gal (UK)","qt (US)","qt (UK)"]},"waste_percentage":{"type":"number","description":"Accepts values between 0 and 1, representing the percentage of ingredient waste.","format":"float"}}},"allergens":{"type":"object","properties":{"fish":{"type":"string","enum":["0","1","2","3"]},"milk_dairy":{"type":"string","enum":["0","1","2","3"]},"gluten":{"type":"string","enum":["0","1","2","3"]},"lactose":{"type":"string","enum":["0","1","2","3"]},"egg":{"type":"string","enum":["0","1","2","3"]},"peanut":{"type":"string","enum":["0","1","2","3"]},"lupine":{"type":"string","enum":["0","1","2","3"]},"poppy_seeds":{"type":"string","enum":["0","1","2","3"]},"hazelnuts":{"type":"string","enum":["0","1","2","3"]},"sulfites":{"type":"string","enum":["0","1","2","3"]},"kamut":{"type":"string","enum":["0","1","2","3"]},"mollusc":{"type":"string","enum":["0","1","2","3"]},"legume_pulse":{"type":"string","enum":["0","1","2","3"]},"wheat":{"type":"string","enum":["0","1","2","3"]},"shellfish":{"type":"string","enum":["0","1","2","3"]},"mustard":{"type":"string","enum":["0","1","2","3"]},"sesame":{"type":"string","enum":["0","1","2","3"]},"celery":{"type":"string","enum":["0","1","2","3"]},"oats":{"type":"string","enum":["0","1","2","3"]},"seeds":{"type":"string","enum":["0","1","2","3"]},"rye":{"type":"string","enum":["0","1","2","3"]},"soy":{"type":"string","enum":["0","1","2","3"]},"pistachio_nuts":{"type":"string","enum":["0","1","2","3"]},"spelt":{"type":"string","enum":["0","1","2","3"]},"barley":{"type":"string","enum":["0","1","2","3"]},"corn":{"type":"string","enum":["0","1","2","3"]},"walnuts":{"type":"string","enum":["0","1","2","3"]},"nut":{"type":"string","enum":["0","1","2","3"]},"brazil_nuts":{"type":"string","enum":["0","1","2","3"]},"pecan_nuts":{"type":"string","enum":["0","1","2","3"]},"macadamia_nuts":{"type":"string","enum":["0","1","2","3"]},"sunflower_seeds":{"type":"string","enum":["0","1","2","3"]},"almonds":{"type":"string","enum":["0","1","2","3"]},"cashews":{"type":"string","enum":["0","1","2","3"]}}},"steps":{"type":"object","properties":{"description":{"type":"string"},"number":{"type":"integer","description":"A recipe step's number based on the order in which they follow each other.","format":"int32"}}},"images":{"type":"array","description":"An array of image IDs. If one is not chosen, the main image will be the first image in this list.","items":{"type":"string"}},"main_image":{"type":"string","description":"An image ID."},"preferred_uoms":{"type":"array","items":{"type":"string"}},"outlets":{"type":"array","description":"An array of outlet IDs. The outlet(s) that this recipe is available at.","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"instance\": \"https://app.apicbase.com/api/v1/products/recipes/549990580860002/\"\n}"}},"schema":{"type":"object","properties":{"instance":{"type":"string","example":"https://app.apicbase.com/api/v1/products/recipes/549990580860002/"}}}}}}},"deprecated":false}},"/products/recipes/{recipe_id}/clone/":{"post":{"summary":"Clone Recipe","description":"Creates a complete copy of a recipe with a new name, preserving all associated data such as ingredients.","operationId":"clone-recipe","parameters":[{"name":"recipe_id","in":"path","description":"The ID of the recipe to clone.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["new_name"],"properties":{"new_name":{"type":"string","description":"The name for the cloned recipe. Required, must not be empty, maximum 300 characters.","maxLength":300}}},"examples":{"Request Example":{"value":{"new_name":"Cloned Caesar Salad"}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":{"id":"987654321","url":"https://app.apicbase.com/api/v2/products/recipes/987654321/"}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"987654321","description":"The ID of the newly created recipe."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/recipes/987654321/","description":"The URL of the newly created recipe."}}}}}},"400":{"description":"Invalid or missing `new_name`."},"403":{"description":"User lacks edit permission."},"404":{"description":"Recipe not found or not in user's library."}},"deprecated":false}},"/products/recipes/{recipe_id}/cost_history/":{"get":{"summary":"Get Recipe Historical Financial Data","description":"Returns historical cost and sell price data for a given recipe.","operationId":"get-recipe-historical-financial-data","parameters":[{"name":"recipe_id","in":"path","description":"A recipe ID.","schema":{"type":"string"},"required":true},{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"count\": 2,\n  \"next\": null,\n  \"previous\": null,\n  \"results\": [\n    {\n      \"recipe\": \"https://app.apicbase.com/api/v1/products/recipes/749980262120005/\",\n      \"cache_date\": \"2020-10-14\",\n      \"personnel_cost_one\": \"0.00\",\n      \"waste_cost_one\": \"0.00\",\n      \"ingredient_cost_one\": \"0.00\",\n      \"prime_cost_one\": \"0.00\",\n      \"actual_profit_one\": \"1.65\",\n      \"sell_price_excl_tax\": \"1.65\",\n      \"actual_profit_margin\": \"100.00\",\n      \"servings\": 1,\n      \"extra_info\": {},\n      \"updated_at\": \"2020-10-14T17:01:27Z\"\n    },\n    {\n      \"recipe\": \"https://app.apicbase.com/api/v1/products/recipes/749980262120005/\",\n      \"cache_date\": \"2020-06-17\",\n      \"personnel_cost_one\": \"0.00\",\n      \"waste_cost_one\": \"0.00\",\n      \"ingredient_cost_one\": \"0.00\",\n      \"prime_cost_one\": \"0.00\",\n      \"actual_profit_one\": null,\n      \"sell_price_excl_tax\": null,\n      \"actual_profit_margin\": null,\n      \"servings\": 1,\n      \"extra_info\": {},\n      \"updated_at\": \"2020-06-17T11:55:40Z\"\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":2,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","example":"https://app.apicbase.com/api/v1/products/recipes/749980262120005/"},"cache_date":{"type":"string","example":"2020-10-14"},"personnel_cost_one":{"type":"string","example":"0.00"},"waste_cost_one":{"type":"string","example":"0.00"},"ingredient_cost_one":{"type":"string","example":"0.00"},"prime_cost_one":{"type":"string","example":"0.00"},"actual_profit_one":{"type":"string","example":"1.65"},"sell_price_excl_tax":{"type":"string","example":"1.65"},"actual_profit_margin":{"type":"string","example":"100.00"},"servings":{"type":"integer","example":1,"default":0},"extra_info":{"type":"object","properties":{}},"updated_at":{"type":"string","example":"2020-10-14T17:01:27Z"}}}}}}}}}},"deprecated":false}},"/products/recipes/{recipe_id}/nutrition/":{"get":{"summary":"Get Recipe Nutritional Data","description":"Returns data from a recipe's allergen and nutritional info tab.","operationId":"get-recipe-nutritional-data","parameters":[{"name":"recipe_id","in":"path","description":"A recipe ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n    \"nutrition_info\": {\n        \"for\": {\n            \"quantity\": 100,\n            \"unit\": \"g\"\n        },\n        \"kcal\": {\n            \"quantity\": 3.333333333333334,\n            \"unit\": \"kcal\"\n        },\n        \"kj\": {\n            \"quantity\": 13.946666666666669,\n            \"unit\": \"kJ\"\n        },\n        \"fat\": {\n            \"quantity\": 3.333333333333334,\n            \"unit\": \"g\"\n        },\n        \"saturated_fat\": {\n            \"quantity\": 1.666666666666667,\n            \"unit\": \"g\"\n        },\n        \"carbohydrate\": {\n            \"quantity\": 3.333333333333334,\n            \"unit\": \"g\"\n        },\n        \"sugar\": {\n            \"quantity\": 3.333333333333334,\n            \"unit\": \"g\"\n        },\n        \"protein\": {\n            \"quantity\": 3.333333333333334,\n            \"unit\": \"g\"\n        },\n        \"salt\": {\n            \"quantity\": 3.333333333333334,\n            \"unit\": \"g\"\n        },\n        \"sodium\": {\n            \"quantity\": 1.3333333333333335,\n            \"unit\": \"g\"\n        }\n    },\n    \"nutrition_info_per_portion\": {\n        \"for\": {\n            \"quantity\": 1,\n            \"unit\": \"portion\"\n        },\n        \"kcal\": {\n            \"quantity\": 6.25,\n            \"unit\": \"kcal\"\n        },\n        \"kj\": {\n            \"quantity\": 26.150000000000002,\n            \"unit\": \"kJ\"\n        },\n        \"fat\": {\n            \"quantity\": 6.25,\n            \"unit\": \"g\"\n        },\n        \"saturated_fat\": {\n            \"quantity\": 3.125,\n            \"unit\": \"g\"\n        },\n        \"carbohydrate\": {\n            \"quantity\": 6.25,\n            \"unit\": \"g\"\n        },\n        \"sugar\": {\n            \"quantity\": 6.25,\n            \"unit\": \"g\"\n        },\n        \"protein\": {\n            \"quantity\": 6.25,\n            \"unit\": \"g\"\n        },\n        \"salt\": {\n            \"quantity\": 6.25,\n            \"unit\": \"g\"\n        },\n        \"sodium\": {\n            \"quantity\": 2.5,\n            \"unit\": \"g\"\n        }\n    },\n    \"dietary_info\": {\n        \"taurine\": false,\n        \"sulphur\": false,\n        \"cacao\": false,\n        \"vegan\": false,\n        \"kosher\": false,\n        \"blackened\": false,\n        \"sweetener\": false,\n        \"pigmeat\": false,\n        \"beef\": true,\n        \"carrot\": true,\n        \"aspartame_e951\": false,\n        \"caffeine\": false,\n        \"sorbates\": false,\n        \"coriander\": false,\n        \"genetic_modified\": false,\n        \"lamb\": false,\n        \"quinine\": false,\n        \"preservative\": false,\n        \"phosphate\": false,\n        \"acesulfame_e962\": false,\n        \"flavor_enhancer\": false,\n        \"benzoates\": false,\n        \"poultry_meat\": false,\n        \"vegetarian\": false,\n        \"alcohol\": false,\n        \"antioxidant\": false,\n        \"propionates\": false,\n        \"halal\": false,\n        \"nitrates\": false,\n        \"glutamate\": false,\n        \"coloring\": false\n    },\n    \"nutriscore\": {\n        \"label\": null\n    },\n    \"nutrition_verified\": false,\n    \"allergens\": {\n        \"sunflower_seeds\": \"DOES_NOT_CONTAIN\",\n        \"almonds\": \"DOES_NOT_CONTAIN\",\n        \"spelt\": \"DOES_NOT_CONTAIN\",\n        \"lactose\": \"DOES_NOT_CONTAIN\",\n        \"rye\": \"DOES_NOT_CONTAIN\",\n        \"poppy_seeds\": \"DOES_NOT_CONTAIN\",\n        \"walnuts\": \"DOES_NOT_CONTAIN\",\n        \"wheat\": \"CONTAINS\",\n        \"macadamia_nuts\": \"DOES_NOT_CONTAIN\",\n        \"nut\": \"DOES_NOT_CONTAIN\",\n        \"cashews\": \"DOES_NOT_CONTAIN\",\n        \"kamut\": \"DOES_NOT_CONTAIN\",\n        \"egg\": \"DOES_NOT_CONTAIN\",\n        \"pistachio_nuts\": \"DOES_NOT_CONTAIN\",\n        \"barley\": \"DOES_NOT_CONTAIN\",\n        \"oats\": \"DOES_NOT_CONTAIN\",\n        \"sulfites\": \"DOES_NOT_CONTAIN\",\n        \"pecan_nuts\": \"DOES_NOT_CONTAIN\",\n        \"milk_dairy\": \"DOES_NOT_CONTAIN\",\n        \"corn\": \"DOES_NOT_CONTAIN\",\n        \"mollusc\": \"DOES_NOT_CONTAIN\",\n        \"shellfish\": \"DOES_NOT_CONTAIN\",\n        \"fish\": \"DOES_NOT_CONTAIN\",\n        \"peanut\": \"DOES_NOT_CONTAIN\",\n        \"hazelnuts\": \"DOES_NOT_CONTAIN\",\n        \"sesame\": \"DOES_NOT_CONTAIN\",\n        \"soy\": \"DOES_NOT_CONTAIN\",\n        \"celery\": \"DOES_NOT_CONTAIN\",\n        \"legume_pulse\": \"DOES_NOT_CONTAIN\",\n        \"lupine\": \"DOES_NOT_CONTAIN\",\n        \"gluten\": \"CONTAINS\",\n        \"brazil_nuts\": \"DOES_NOT_CONTAIN\",\n        \"seeds\": \"DOES_NOT_CONTAIN\",\n        \"mustard\": \"DOES_NOT_CONTAIN\"\n    },\n    \"allergen_verified\": false,\n    \"label_ingredients\": \"Pasta Spaghetti (33.28%) (<b>Wheat, Cereals containing gluten</b>), Beef mince (26.62%), Tomato (19.97%), Carrots (19.97%), White pepper powder (0.17%)\"\n}"}},"schema":{"type":"object","properties":{"nutrition_info":{"type":"object","properties":{"for":{"type":"object","properties":{"quantity":{"type":"integer","example":100,"default":0},"unit":{"type":"string","example":"g"}}},"kcal":{"type":"object","properties":{"quantity":{"type":"number","example":3.333333333333334,"default":0},"unit":{"type":"string","example":"kcal"}}},"kj":{"type":"object","properties":{"quantity":{"type":"number","example":13.946666666666669,"default":0},"unit":{"type":"string","example":"kJ"}}},"fat":{"type":"object","properties":{"quantity":{"type":"number","example":3.333333333333334,"default":0},"unit":{"type":"string","example":"g"}}},"saturated_fat":{"type":"object","properties":{"quantity":{"type":"number","example":1.666666666666667,"default":0},"unit":{"type":"string","example":"g"}}},"carbohydrate":{"type":"object","properties":{"quantity":{"type":"number","example":3.333333333333334,"default":0},"unit":{"type":"string","example":"g"}}},"sugar":{"type":"object","properties":{"quantity":{"type":"number","example":3.333333333333334,"default":0},"unit":{"type":"string","example":"g"}}},"protein":{"type":"object","properties":{"quantity":{"type":"number","example":3.333333333333334,"default":0},"unit":{"type":"string","example":"g"}}},"salt":{"type":"object","properties":{"quantity":{"type":"number","example":3.333333333333334,"default":0},"unit":{"type":"string","example":"g"}}},"sodium":{"type":"object","properties":{"quantity":{"type":"number","example":1.3333333333333335,"default":0},"unit":{"type":"string","example":"g"}}}}},"nutrition_info_per_portion":{"type":"object","properties":{"for":{"type":"object","properties":{"quantity":{"type":"integer","example":1,"default":0},"unit":{"type":"string","example":"portion"}}},"kcal":{"type":"object","properties":{"quantity":{"type":"number","example":6.25,"default":0},"unit":{"type":"string","example":"kcal"}}},"kj":{"type":"object","properties":{"quantity":{"type":"number","example":26.150000000000002,"default":0},"unit":{"type":"string","example":"kJ"}}},"fat":{"type":"object","properties":{"quantity":{"type":"number","example":6.25,"default":0},"unit":{"type":"string","example":"g"}}},"saturated_fat":{"type":"object","properties":{"quantity":{"type":"number","example":3.125,"default":0},"unit":{"type":"string","example":"g"}}},"carbohydrate":{"type":"object","properties":{"quantity":{"type":"number","example":6.25,"default":0},"unit":{"type":"string","example":"g"}}},"sugar":{"type":"object","properties":{"quantity":{"type":"number","example":6.25,"default":0},"unit":{"type":"string","example":"g"}}},"protein":{"type":"object","properties":{"quantity":{"type":"number","example":6.25,"default":0},"unit":{"type":"string","example":"g"}}},"salt":{"type":"object","properties":{"quantity":{"type":"number","example":6.25,"default":0},"unit":{"type":"string","example":"g"}}},"sodium":{"type":"object","properties":{"quantity":{"type":"number","example":2.5,"default":0},"unit":{"type":"string","example":"g"}}}}},"dietary_info":{"type":"object","properties":{"taurine":{"type":"boolean","example":false,"default":true},"sulphur":{"type":"boolean","example":false,"default":true},"cacao":{"type":"boolean","example":false,"default":true},"vegan":{"type":"boolean","example":false,"default":true},"kosher":{"type":"boolean","example":false,"default":true},"blackened":{"type":"boolean","example":false,"default":true},"sweetener":{"type":"boolean","example":false,"default":true},"pigmeat":{"type":"boolean","example":false,"default":true},"beef":{"type":"boolean","example":true,"default":true},"carrot":{"type":"boolean","example":true,"default":true},"aspartame_e951":{"type":"boolean","example":false,"default":true},"caffeine":{"type":"boolean","example":false,"default":true},"sorbates":{"type":"boolean","example":false,"default":true},"coriander":{"type":"boolean","example":false,"default":true},"genetic_modified":{"type":"boolean","example":false,"default":true},"lamb":{"type":"boolean","example":false,"default":true},"quinine":{"type":"boolean","example":false,"default":true},"preservative":{"type":"boolean","example":false,"default":true},"phosphate":{"type":"boolean","example":false,"default":true},"acesulfame_e962":{"type":"boolean","example":false,"default":true},"flavor_enhancer":{"type":"boolean","example":false,"default":true},"benzoates":{"type":"boolean","example":false,"default":true},"poultry_meat":{"type":"boolean","example":false,"default":true},"vegetarian":{"type":"boolean","example":false,"default":true},"alcohol":{"type":"boolean","example":false,"default":true},"antioxidant":{"type":"boolean","example":false,"default":true},"propionates":{"type":"boolean","example":false,"default":true},"halal":{"type":"boolean","example":false,"default":true},"nitrates":{"type":"boolean","example":false,"default":true},"glutamate":{"type":"boolean","example":false,"default":true},"coloring":{"type":"boolean","example":false,"default":true}}},"nutriscore":{"type":"object","properties":{"label":{}}},"nutrition_verified":{"type":"boolean","example":false,"default":true},"allergens":{"type":"object","properties":{"sunflower_seeds":{"type":"string","example":"DOES_NOT_CONTAIN"},"almonds":{"type":"string","example":"DOES_NOT_CONTAIN"},"spelt":{"type":"string","example":"DOES_NOT_CONTAIN"},"lactose":{"type":"string","example":"DOES_NOT_CONTAIN"},"rye":{"type":"string","example":"DOES_NOT_CONTAIN"},"poppy_seeds":{"type":"string","example":"DOES_NOT_CONTAIN"},"walnuts":{"type":"string","example":"DOES_NOT_CONTAIN"},"wheat":{"type":"string","example":"CONTAINS"},"macadamia_nuts":{"type":"string","example":"DOES_NOT_CONTAIN"},"nut":{"type":"string","example":"DOES_NOT_CONTAIN"},"cashews":{"type":"string","example":"DOES_NOT_CONTAIN"},"kamut":{"type":"string","example":"DOES_NOT_CONTAIN"},"egg":{"type":"string","example":"DOES_NOT_CONTAIN"},"pistachio_nuts":{"type":"string","example":"DOES_NOT_CONTAIN"},"barley":{"type":"string","example":"DOES_NOT_CONTAIN"},"oats":{"type":"string","example":"DOES_NOT_CONTAIN"},"sulfites":{"type":"string","example":"DOES_NOT_CONTAIN"},"pecan_nuts":{"type":"string","example":"DOES_NOT_CONTAIN"},"milk_dairy":{"type":"string","example":"DOES_NOT_CONTAIN"},"corn":{"type":"string","example":"DOES_NOT_CONTAIN"},"mollusc":{"type":"string","example":"DOES_NOT_CONTAIN"},"shellfish":{"type":"string","example":"DOES_NOT_CONTAIN"},"fish":{"type":"string","example":"DOES_NOT_CONTAIN"},"peanut":{"type":"string","example":"DOES_NOT_CONTAIN"},"hazelnuts":{"type":"string","example":"DOES_NOT_CONTAIN"},"sesame":{"type":"string","example":"DOES_NOT_CONTAIN"},"soy":{"type":"string","example":"DOES_NOT_CONTAIN"},"celery":{"type":"string","example":"DOES_NOT_CONTAIN"},"legume_pulse":{"type":"string","example":"DOES_NOT_CONTAIN"},"lupine":{"type":"string","example":"DOES_NOT_CONTAIN"},"gluten":{"type":"string","example":"CONTAINS"},"brazil_nuts":{"type":"string","example":"DOES_NOT_CONTAIN"},"seeds":{"type":"string","example":"DOES_NOT_CONTAIN"},"mustard":{"type":"string","example":"DOES_NOT_CONTAIN"}}},"allergen_verified":{"type":"boolean","example":false,"default":true},"label_ingredients":{"type":"string","example":"Pasta Spaghetti (33.28%) (<b>Wheat, Cereals containing gluten</b>), Beef mince (26.62%), Tomato (19.97%), Carrots (19.97%), White pepper powder (0.17%)"}}}}}}},"deprecated":false}},"/products/recipes/{recipe_id}/financial/":{"get":{"summary":"Get Recipe Financial Data","description":"Returns financial data (food cost breakdown, profit margins, target/actual sell prices, ingredients cost) for a given recipe and outlet.","operationId":"get-recipe-financial-data","parameters":[{"name":"recipe_id","in":"path","description":"The ID of the recipe.","schema":{"type":"integer","format":"int64"},"required":true},{"name":"outlet","in":"query","description":"The ID of the outlet to calculate financials for.","schema":{"type":"integer","format":"int64"},"required":true},{"name":"food_cost_mode","in":"query","description":"The food cost calculation mode. One of: `cheapest` (default), `last_ordered`, `average_stock_value`.","schema":{"type":"string","enum":["cheapest","last_ordered","average_stock_value"],"default":"cheapest"},"required":false}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"id":"12345","name":"Caesar Salad","internal_uid":"R-001","food_cost_mode":"cheapest","tax":"21.000","servings":4,"cost_for_one_serving":{"total_food_cost":"3.5000000000","ingredients_cost":"3.0000000000","waste":"0.5000000000","personnel_cost":"1.2000000000","prime_cost":"4.7000000000","prep_cost":"0.4000000000","cooking_cost":"0.5000000000","plating_cost":"0.3000000000"},"target_for_one_serving":{"profit_margin":"30.000","profit":"2.0100000000","sell_price_excl_tax":"6.7100000000","sell_price_incl_tax":"8.1191000000","tax":"1.4091000000","prime_cost":"4.7000000000","prime_cost_margin":"70.000","profit_by_actual_sell_price":null},"actual_for_one_serving":{"profit":null,"sell_price_excl_tax":null,"sell_price_incl_tax":null,"tax":null,"profit_margin":null},"difference_for_one_serving":{"prime_cost":null,"profit":null,"profit_margin":null,"sell_price_excl_tax":null,"profit_given_actual_sell_price":null},"ingredients":[{"id":"456","type":"INGREDIENT","name":"Romaine Lettuce","quantity":"200","unit":"g","calculated_cost":"0.8000000000","internal_uid":"abc-123"}]}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"12345","description":"The ID of the recipe."},"name":{"type":"string","example":"Caesar Salad","description":"The recipe name in the user's preferred language."},"internal_uid":{"type":"string","example":"R-001","description":"The internal UID of the recipe."},"food_cost_mode":{"type":"string","enum":["cheapest","last_ordered","average_stock_value"],"example":"cheapest","description":"The food cost calculation mode used for this response."},"tax":{"type":"string","example":"21.000","description":"The tax percentage applied to the recipe. Returned with 3 decimal places."},"servings":{"type":"integer","example":4,"description":"The number of servings for the recipe."},"cost_for_one_serving":{"type":"object","description":"Cost breakdown for one serving.","properties":{"total_food_cost":{"type":"string","example":"3.5000000000","description":"Total food cost per serving (ingredients + waste)."},"ingredients_cost":{"type":"string","example":"3.0000000000","description":"Cost of ingredients per serving."},"waste":{"type":"string","example":"0.5000000000","description":"Waste cost per serving."},"personnel_cost":{"type":"string","example":"1.2000000000","description":"Personnel cost per serving."},"prime_cost":{"type":"string","example":"4.7000000000","description":"Prime cost per serving (food cost + personnel cost)."},"prep_cost":{"type":"string","example":"0.4000000000","description":"Preparation cost per serving."},"cooking_cost":{"type":"string","example":"0.5000000000","description":"Cooking cost per serving."},"plating_cost":{"type":"string","example":"0.3000000000","description":"Plating cost per serving."}}},"target_for_one_serving":{"type":"object","description":"Target financial figures for one serving based on the configured profit margin.","properties":{"profit_margin":{"type":"string","example":"30.000","description":"Target profit margin percentage. Returned with 3 decimal places."},"profit":{"type":"string","example":"2.0100000000","description":"Target profit per serving."},"sell_price_excl_tax":{"type":"string","example":"6.7100000000","description":"Target sell price per serving excluding tax."},"sell_price_incl_tax":{"type":"string","example":"8.1191000000","description":"Target sell price per serving including tax."},"tax":{"type":"string","example":"1.4091000000","description":"Tax amount per serving."},"prime_cost":{"type":"string","example":"4.7000000000","description":"Prime cost per serving."},"prime_cost_margin":{"type":"string","example":"70.000","description":"Prime cost as a percentage of the sell price. Returned with 3 decimal places."},"profit_by_actual_sell_price":{"type":"string","example":null,"nullable":true,"description":"Profit calculated using the actual sell price. Null if no actual sell price is set."}}},"actual_for_one_serving":{"type":"object","description":"Actual financial figures for one serving based on the configured actual sell price. Fields are null if no actual sell price is set.","properties":{"profit":{"type":"string","example":null,"nullable":true,"description":"Actual profit per serving."},"sell_price_excl_tax":{"type":"string","example":null,"nullable":true,"description":"Actual sell price per serving excluding tax."},"sell_price_incl_tax":{"type":"string","example":null,"nullable":true,"description":"Actual sell price per serving including tax."},"tax":{"type":"string","example":null,"nullable":true,"description":"Tax amount on the actual sell price."},"profit_margin":{"type":"string","example":null,"nullable":true,"description":"Actual profit margin percentage."}}},"difference_for_one_serving":{"type":"object","description":"Difference between target and actual figures for one serving. Fields are null if no actual sell price is set.","properties":{"prime_cost":{"type":"string","example":null,"nullable":true,"description":"Difference in prime cost."},"profit":{"type":"string","example":null,"nullable":true,"description":"Difference in profit."},"profit_margin":{"type":"string","example":null,"nullable":true,"description":"Difference in profit margin."},"sell_price_excl_tax":{"type":"string","example":null,"nullable":true,"description":"Difference in sell price excluding tax."},"profit_given_actual_sell_price":{"type":"string","example":null,"nullable":true,"description":"Profit given the actual sell price."}}},"ingredients":{"type":"array","description":"List of ingredients with their cost breakdown.","items":{"type":"object","properties":{"id":{"type":"string","example":"764556666890005","description":"The ID of the ingredient."},"type":{"type":"string","enum":["INGREDIENT","RECIPE"],"example":"INGREDIENT","description":"The type of the component. One of: INGREDIENT, RECIPE."},"name":{"type":"string","example":"Romaine Lettuce","description":"The ingredient name in the user's preferred language."},"quantity":{"type":"string","example":"200","description":"The quantity of the ingredient as a numeric string."},"unit":{"type":"string","example":"g","description":"The unit of measurement."},"calculated_cost":{"type":"string","example":"0.8000000000","description":"The calculated cost for this ingredient in the recipe."},"internal_uid":{"type":"string","example":"abc-123","description":"The internal UID of the ingredient."}}}}}}}}},"400":{"description":"Missing `outlet` parameter or invalid `food_cost_mode` value."},"403":{"description":"User lacks the \"recipe financial details\" permission."},"404":{"description":"Recipe not found, outlet not found, or outlet belongs to a different library."}},"deprecated":false}},"/products/outlets/{outlet_id}/recipes/":{"get":{"summary":"Get Recipes Linked to an Outlet","description":"Returns a list of recipes linked to a given outlet.","operationId":"get-recipes-linked-to-an-outlet","parameters":[{"name":"outlet_id","in":"path","description":"An outlet ID.","schema":{"type":"string"},"required":true},{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"string"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"name","in":"query","description":"A recipe name to query on.","schema":{"type":"string"}},{"name":"uid","in":"query","description":"A UID (reference number) to query on.","schema":{"type":"string"}},{"name":"persons","in":"query","description":"The amount of servings.","schema":{"type":"integer","format":"int32"}},{"name":"persons__gt","in":"query","description":"The amount of servings (greater than).","schema":{"type":"integer","format":"int32"}},{"name":"persons__lt","in":"query","description":"The amount of servings (lower than).","schema":{"type":"integer","format":"int32"}},{"name":"tax","in":"query","description":"Filter on a tax rate.","schema":{"type":"number","format":"float"}},{"name":"tax__gt","in":"query","description":"Filter on a tax rate (greater than).","schema":{"type":"number","format":"float"}},{"name":"tax__lt","in":"query","description":"Filter on a tax rate (lower than).","schema":{"type":"number","format":"float"}},{"name":"current_sell_price","in":"query","description":"Filter on a sell price (exact).","schema":{"type":"number","format":"float"}},{"name":"current_sell_price__gt","in":"query","description":"Filter on a sell price (greater than).","schema":{"type":"number","format":"float"}},{"name":"current_sell_price__lt","in":"query","description":"Filter on a sell price (lower than).","schema":{"type":"number","format":"float"}},{"name":"created_date","in":"query","description":"Filter on a creation date (exact).","schema":{"type":"string","format":"date"}},{"name":"created_date__gt","in":"query","description":"Filter on a creation date (greater than).","schema":{"type":"string","format":"date"}},{"name":"created_date__lt","in":"query","description":"Filter on a creation date (lower than).","schema":{"type":"string","format":"date"}},{"name":"modified_date","in":"query","description":"Filter on a modification date (exact).","schema":{"type":"string","format":"date"}},{"name":"modified_date__gt","in":"query","description":"Filter on a modification date (greater than).","schema":{"type":"string","format":"date"}},{"name":"modified_date__lt","in":"query","description":"Filter on a modification date (lower than).","schema":{"type":"string","format":"date"}},{"name":"created_by","in":"query","description":"A user ID.","schema":{"type":"string"}},{"name":"stockable","in":"query","description":"Filter recipes that are or are not stockable","schema":{"type":"boolean"}},{"name":"original","in":"query","description":"A recipe ID. Filters on recipes that are clones of a given recipe.","schema":{"type":"string"}},{"name":"net_weight","in":"query","description":"Filter on a weight (exact).","schema":{"type":"number","format":"float"}},{"name":"net_weight__gt","in":"query","description":"Filter on a weight (greater than).","schema":{"type":"number","format":"float"}},{"name":"net_weight__lt","in":"query","description":"Filter on a weight (lower than).","schema":{"type":"number","format":"float"}},{"name":"net_volume","in":"query","description":"Filter on a volume (exact).","schema":{"type":"number","format":"float"}},{"name":"net_volume__gt","in":"query","description":"Filter on a volume (greater than).","schema":{"type":"number","format":"float"}},{"name":"net_volume__lt","in":"query","description":"Filter on a volume (lower than).","schema":{"type":"number","format":"float"}},{"name":"prep_time","in":"query","description":"Filter on a preparation time duration (exact). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"prep_time__gt","in":"query","description":"Filter on a preparation time duration (greater than). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"prep_time__lt","in":"query","description":"Filter on a preparation time duration (lower than). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"cooking_time","in":"query","description":"Filter on a cooking time duration (exact). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"cooking_time__gt","in":"query","description":"Filter on a cooking time duration (greater than). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"cooking_time__lt","in":"query","description":"Filter on a cooking time duration (lower than). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"plating_time","in":"query","description":"Filter on a plating time duration (exact). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"plating_time__gt","in":"query","description":"Filter on a plating time duration (greater than). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"plating_time__lt","in":"query","description":"Filter on a plating time duration (lower than). Format is hh:mm:ss.","schema":{"type":"string"}},{"name":"custom_fields","in":"query","description":"Filter on custom fields. Check reference guide for details.","schema":{"type":"string","format":"json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n    \"count\": 3,\n    \"next\": null,\n    \"previous\": null,\n    \"results\": [\n        {\n            \"name\": \"Carrot Cake\",\n            \"description\": \"A delicious cake.\",\n            \"subcategory\": null,\n            \"net_weight_unit\": \"g\",\n            \"id\": \"549990580860002\",\n            \"current_sell_price\": {\n                \"created\": \"2020-10-01 17:55:07.866442\",\n                \"pricing\": 6.5,\n                \"user_pk\": 3475,\n                \"username\": \"john.doe@gmail.com\"\n            },\n            \"recipe_class\": \"dish\",\n            \"category\": null,\n            \"season\": \"all_seasons\",\n            \"prep_time_passive\": null,\n            \"composition\": \"<p><br></p>\",\n            \"web_page\": \"https://app.apicbase.com/library/recipe/99808/\",\n            \"cuisine\": \"English\",\n            \"remarks\": \"<p>Include remarks here, if you like.</p>\",\n            \"preferred_uoms\": [],\n            \"cooking_time_passive\": \"00:45:00\",\n            \"highly_perishable\": null,\n            \"main_stock_items\": [],\n            \"target_profit_margin\": \"10.25\",\n            \"plating_time\": null,\n            \"recipe_stage\": \"complete\",\n            \"difficulty\": 1,\n            \"sell_price_history\": [],\n            \"modified_date\": \"2020-11-04T16:05:43Z\",\n            \"custom_fields\": [\n                {\n                    \"name\": \"Kitchen Utensils\",\n                    \"value\": null\n                },\n                {\n                    \"name\": \"Filter Field Multi\",\n                    \"value\": null\n                },\n                {\n                    \"name\": \"Filter Field Single\",\n                    \"value\": null\n                },\n                {\n                    \"name\": \"Filter Field Text\",\n                    \"value\": null\n                },\n                {\n                    \"name\": \"Recipe Multi Field\",\n                    \"value\": null\n                }\n            ],\n            \"name_translations\": {\n                \"en\": \"Carrot Cake\",\n                \"hu\": \"Carrot Cake\"\n            },\n            \"net_volume\": null,\n            \"net_weight\": \"700.00\",\n            \"clones\": [],\n            \"storage_conditions\": null,\n            \"url\": \"https://app.apicbase.com/api/v2/products/recipes/549990580860002/\",\n            \"tax\": \"12.000\",\n            \"recipe_type\": \"Dessert\",\n            \"created_date\": \"2020-10-01T15:55:07Z\",\n            \"is_semi_finished_product\": false,\n            \"persons\": 12,\n            \"cooking_time\": \"01:15:00\",\n            \"is_stockable_recipe\": false,\n            \"uid\": \"2222\",\n            \"recipe_type_other\": null,\n            \"prep_time\": \"00:05:00\",\n            \"original\": null,\n            \"storage_conditions_translations\": {},\n            \"created_by\": \"john.doe@gmail.com\",\n            \"net_volume_unit\": \"ml\",\n            \"portion_pieces\": null,\n            \"shelf_life\": {\n                \"days\": 2,\n                \"hours\": 0\n            },\n            \"carbon_footprint\": {\n              \"land_m2\": 60,\n              \"co2eq_cradle_to_gate_kg\": 0,\n              \"co2eq_farm_to_farmgate_kg\": 60,\n              \"water_m3\": 60\n            },\n            \"carbon_footprint_per_portion\": {\n              \"land_m2\": 42,\n              \"co2eq_cradle_to_gate_kg\": 0,\n              \"co2eq_farm_to_farmgate_kg\": 42,\n              \"water_m3\": 42\n            }\n        },\n        {\n            \"name\": \"Tiramisù\",\n            \"description\": \"\",\n            \"subcategory\": null,\n            \"net_weight_unit\": \"\",\n            \"id\": \"549980272150003\",\n            \"current_sell_price\": null,\n            \"recipe_class\": \"\",\n            \"category\": null,\n            \"season\": \"\",\n            \"prep_time_passive\": null,\n            \"composition\": \"<p><br></p>\",\n            \"web_page\": \"https://app.apicbase.com/library/recipe/89127/\",\n            \"cuisine\": \"\",\n            \"remarks\": \"<p><br></p>\",\n            \"preferred_uoms\": [],\n            \"cooking_time_passive\": null,\n            \"highly_perishable\": null,\n            \"main_stock_items\": [],\n            \"target_profit_margin\": \"10.00\",\n            \"plating_time\": null,\n            \"recipe_stage\": \"\",\n            \"difficulty\": null,\n            \"sell_price_history\": [],\n            \"modified_date\": \"2020-11-18T15:25:15Z\",\n            \"custom_fields\": [\n                {\n                    \"name\": \"Kitchen Utensils\",\n                    \"value\": null\n                },\n                {\n                    \"name\": \"Filter Field Multi\",\n                    \"value\": [\n                        \"First\",\n                        \"Fourth\"\n                    ]\n                },\n                {\n                    \"name\": \"Filter Field Single\",\n                    \"value\": \"Single 1\"\n                },\n                {\n                    \"name\": \"Filter Field Text\",\n                    \"value\": \"filter text\"\n                },\n                {\n                    \"name\": \"Recipe Multi Field\",\n                    \"value\": null\n                }\n            ],\n            \"name_translations\": {\n                \"en\": \"Tiramisù\",\n                \"fr\": \"Tiramisù\"\n            },\n            \"net_volume\": null,\n            \"net_weight\": null,\n            \"clones\": [],\n            \"storage_conditions\": null,\n            \"url\": \"https://app.apicbase.com/api/v2/products/recipes/549980272150003/\",\n            \"tax\": null,\n            \"recipe_type\": null,\n            \"created_date\": \"2020-06-17T09:55:07Z\",\n            \"is_semi_finished_product\": false,\n            \"persons\": 1,\n            \"cooking_time\": null,\n            \"is_stockable_recipe\": false,\n            \"uid\": \"\",\n            \"recipe_type_other\": null,\n            \"prep_time\": \"00:45:00\",\n            \"original\": null,\n            \"storage_conditions_translations\": {},\n            \"created_by\": \"john.doe@gmail.com\",\n            \"net_volume_unit\": \"\",\n            \"portion_pieces\": null,\n            \"shelf_life\": null,\n            \"carbon_footprint\": {\n              \"land_m2\": 60,\n              \"co2eq_cradle_to_gate_kg\": 0,\n              \"co2eq_farm_to_farmgate_kg\": 60,\n              \"water_m3\": 60\n            },\n            \"carbon_footprint_per_portion\": {\n              \"land_m2\": 42,\n              \"co2eq_cradle_to_gate_kg\": 0,\n              \"co2eq_farm_to_farmgate_kg\": 42,\n              \"water_m3\": 42\n            }\n        },\n        {\n            \"name\": \"Spaghetti Bolognese\",\n            \"description\": \"A free text field here\",\n            \"subcategory\": \"\",\n            \"net_weight_unit\": \"kg\",\n            \"id\": \"349980442190000\",\n            \"current_sell_price\": {\n                \"created\": \"2021-11-04 10:20:58.627240\",\n                \"pricing\": 1.0,\n                \"user_pk\": null,\n                \"username\": null\n            },\n            \"recipe_class\": \"dish\",\n            \"category\": \"\",\n            \"season\": \"all_seasons\",\n            \"prep_time_passive\": null,\n            \"composition\": \"<p>An explanation about how to compose this recipe goes here.</p>\",\n            \"web_page\": \"https://app.apicbase.com/library/recipe/89124/\",\n            \"cuisine\": \"Italian\",\n            \"remarks\": \"<p>General remarks about this recipe. Free text.</p>\",\n            \"preferred_uoms\": [],\n            \"cooking_time_passive\": \"00:15:30\",\n            \"highly_perishable\": false,\n            \"main_stock_items\": [\n                {\n                    \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421747108501007/\"\n                }\n            ],\n            \"target_profit_margin\": \"80.00\",\n            \"plating_time\": \"00:01:00\",\n            \"recipe_stage\": \"active\",\n            \"difficulty\": 1,\n            \"sell_price_history\": [\n                {\n                    \"created\": \"2020-06-17 11:44:38.762287\",\n                    \"pricing\": 13.0,\n                    \"username\": \"john.doe@gmail.com\"\n                },\n                {\n                    \"created\": \"2020-06-17 11:49:30.968115\",\n                    \"pricing\": 13.0,\n                    \"username\": \"john.doe@gmail.com\"\n                },\n                {\n                    \"created\": \"2020-06-17 12:04:28.685633\",\n                    \"pricing\": 13.0,\n                    \"username\": \"john.doe@gmail.com\"\n                }\n            ],\n            \"modified_date\": \"2023-06-07T07:18:43Z\",\n            \"custom_fields\": [\n                {\n                    \"name\": \"Kitchen Utensils\",\n                    \"value\": null\n                },\n                {\n                    \"name\": \"Filter Field Multi\",\n                    \"value\": null\n                },\n                {\n                    \"name\": \"Filter Field Single\",\n                    \"value\": \"Single 1\"\n                },\n                {\n                    \"name\": \"Filter Field Text\",\n                    \"value\": null\n                },\n                {\n                    \"name\": \"Recipe Multi Field\",\n                    \"value\": [\n                        \"Choice 1\",\n                        \"Choice 3\"\n                    ]\n                }\n            ],\n            \"name_translations\": {\n                \"en\": \"Spaghetti Bolognese\",\n                \"fr\": \"Spaghetti Bolognese\"\n            },\n            \"net_volume\": null,\n            \"net_weight\": \"3.00\",\n            \"clones\": [\n                \"https://app.apicbase.com/api/v2/products/recipes/449964576800007/\"\n            ],\n            \"storage_conditions\": \"\",\n            \"url\": \"https://app.apicbase.com/api/v2/products/recipes/349980442190000/\",\n            \"tax\": \"20.000\",\n            \"recipe_type\": \"Main course\",\n            \"created_date\": \"2020-06-17T09:44:38Z\",\n            \"is_semi_finished_product\": false,\n            \"persons\": 16,\n            \"cooking_time\": \"00:02:00\",\n            \"is_stockable_recipe\": true,\n            \"uid\": \"0001\",\n            \"recipe_type_other\": null,\n            \"prep_time\": \"00:05:00\",\n            \"original\": null,\n            \"storage_conditions_translations\": {},\n            \"created_by\": \"john.doe@gmail.com\",\n            \"net_volume_unit\": \"\",\n            \"portion_pieces\": null,\n            \"shelf_life\": {\n                \"days\": 4,\n                \"hours\": 0\n            },\n            \"carbon_footprint\": {\n              \"land_m2\": 60,\n              \"co2eq_cradle_to_gate_kg\": 0,\n              \"co2eq_farm_to_farmgate_kg\": 60,\n              \"water_m3\": 60\n            },\n            \"carbon_footprint_per_portion\": {\n              \"land_m2\": 42,\n              \"co2eq_cradle_to_gate_kg\": 0,\n              \"co2eq_farm_to_farmgate_kg\": 42,\n              \"water_m3\": 42\n            }\n        }\n    ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":3,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Carrot Cake"},"description":{"type":"string","example":"A delicious cake."},"subcategory":{},"net_weight_unit":{"type":"string","example":"g"},"id":{"type":"string","example":"549990580860002"},"current_sell_price":{"type":"object","properties":{"created":{"type":"string","example":"2020-10-01 17:55:07.866442"},"pricing":{"type":"number","example":6.5,"default":0},"user_pk":{"type":"integer","example":3475,"default":0},"username":{"type":"string","example":"john.doe@gmail.com"}}},"recipe_class":{"type":"string","example":"dish"},"category":{},"season":{"type":"string","example":"all_seasons"},"prep_time_passive":{},"composition":{"type":"string","example":"<p><br></p>"},"web_page":{"type":"string","example":"https://app.apicbase.com/library/recipe/99808/"},"cuisine":{"type":"string","example":"English"},"remarks":{"type":"string","example":"<p>Include remarks here, if you like.</p>"},"preferred_uoms":{"type":"array"},"cooking_time_passive":{"type":"string","example":"00:45:00"},"highly_perishable":{},"main_stock_items":{"type":"array"},"target_profit_margin":{"type":"string","example":"10.25"},"plating_time":{},"recipe_stage":{"type":"string","example":"complete"},"difficulty":{"type":"integer","example":1,"default":0},"sell_price_history":{"type":"array"},"modified_date":{"type":"string","example":"2020-11-04T16:05:43Z"},"custom_fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Kitchen Utensils"},"value":{}}}},"name_translations":{"type":"object","properties":{"en":{"type":"string","example":"Carrot Cake"},"hu":{"type":"string","example":"Carrot Cake"}}},"net_volume":{},"net_weight":{"type":"string","example":"700.00"},"clones":{"type":"array"},"storage_conditions":{},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/recipes/549990580860002/"},"tax":{"type":"string","example":"12.000"},"recipe_type":{"type":"string","example":"Dessert"},"created_date":{"type":"string","example":"2020-10-01T15:55:07Z"},"is_semi_finished_product":{"type":"boolean","example":false,"default":true},"persons":{"type":"integer","example":12,"default":0},"cooking_time":{"type":"string","example":"01:15:00"},"is_stockable_recipe":{"type":"boolean","example":false,"default":true},"uid":{"type":"string","example":"2222"},"recipe_type_other":{},"prep_time":{"type":"string","example":"00:05:00"},"original":{},"storage_conditions_translations":{"type":"object","properties":{}},"created_by":{"type":"string","example":"john.doe@gmail.com"},"net_volume_unit":{"type":"string","example":"ml"},"portion_pieces":{},"shelf_life":{"type":"object","properties":{"days":{"type":"integer","example":2,"default":0},"hours":{"type":"integer","example":0,"default":0}}},"carbon_footprint":{"type":"object","properties":{"land_m2":{"type":"integer","example":60,"default":0},"co2eq_cradle_to_gate_kg":{"type":"integer","example":0,"default":0},"co2eq_farm_to_farmgate_kg":{"type":"integer","example":60,"default":0},"water_m3":{"type":"integer","example":60,"default":0}}},"carbon_footprint_per_portion":{"type":"object","properties":{"land_m2":{"type":"integer","example":42,"default":0},"co2eq_cradle_to_gate_kg":{"type":"integer","example":0,"default":0},"co2eq_farm_to_farmgate_kg":{"type":"integer","example":42,"default":0},"water_m3":{"type":"integer","example":42,"default":0}}}}}}}}}}}},"deprecated":false}},"/products/stock_items/":{"get":{"summary":"Get Stock Items","description":"Returns a list of stock items in the library.","operationId":"get-stock-items","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by: `name` or `modified`. Prefix with `-` for descending order. Values outside this list are ignored and the default ordering is used.","schema":{"type":"string"}},{"name":"name","in":"query","description":"A stock item name to query on.","schema":{"type":"string"}},{"name":"id__in","in":"query","description":"A comma-separated list of stock item IDs. Returns the stock items in the list.","schema":{"type":"string"},"example":"921060274251001,421725660680004"},{"name":"created_by","in":"query","description":"Part of the email address of the user who created the stock item. Case-insensitive partial match.","schema":{"type":"string"},"example":"john.doe"},{"name":"ingredient","in":"query","description":"An ingredient ID. Filters on stock items belonging to this ingredient.","schema":{"type":"string"}},{"name":"count_outlet","in":"query","description":"An outlet ID. Filters on stock items that can be counted in this outlet.","schema":{"type":"string"}},{"name":"stockable","in":"query","description":"Filter on stock items that are/are not stockable.","schema":{"type":"boolean"}},{"name":"weighted","in":"query","description":"Filter on stock items that are/are not weighted.","schema":{"type":"boolean"}},{"name":"gtin","in":"query","description":"Filter on GTIN/EAN. Matches any GTIN in the item's `gtin_list`.","schema":{"type":"string"}},{"name":"modified_date__date","in":"query","description":"Filter on a modification date (exact). Format `YYYY-MM-DD`.","schema":{"type":"string","format":"date"}},{"name":"modified_date__date__gte","in":"query","description":"Filter on a modification date (greater than or equal).","schema":{"type":"string","format":"date"}},{"name":"modified_date__date__lte","in":"query","description":"Filter on a modification date (lower than or equal).","schema":{"type":"string","format":"date"}},{"name":"modified_date__time","in":"query","description":"Filter on a modification time of day (exact). Format `HH:MM:SS`.","schema":{"type":"string","pattern":"^\\d{2}:\\d{2}:\\d{2}$"},"example":"14:30:00"},{"name":"modified_date__time__gte","in":"query","description":"Filter on a modification time of day (greater than or equal). Format `HH:MM:SS`.","schema":{"type":"string","pattern":"^\\d{2}:\\d{2}:\\d{2}$"},"example":"14:30:00"},{"name":"modified_date__time__lte","in":"query","description":"Filter on a modification time of day (lower than or equal). Format `HH:MM:SS`.","schema":{"type":"string","pattern":"^\\d{2}:\\d{2}:\\d{2}$"},"example":"14:30:00"},{"in":"query","name":"gtin__in","schema":{"type":"string"},"description":"A comma-separated list of GTIN/EAN values. Returns stock items carrying any of them.","example":"05449000000996,05449000214911"},{"name":"page_size","in":"query","description":"Number of results per page. Values above 200 are capped at 200.","schema":{"type":"integer","format":"int32","maximum":200},"required":false,"example":50},{"name":"fields","in":"query","description":"A comma-separated list of fields to return. Unknown field names are ignored.","schema":{"type":"string"},"required":false,"example":"id,name,gtin_list"},{"name":"base_stock_item_unit_id","in":"query","description":"A stock item ID. Returns the stock items whose base stock item is this one.","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"count":3,"next":null,"previous":null,"results":[{"url":"https://api.apicbase.com/api/v2/products/stock_items/921060274251001/","id":"921060274251001","name":"Cola 6 x 33 cl","main_ingredient_id":"664556437850007","main_ingredient_name":"Cola","stockable_recipe":null,"created_by":"john.doe@apicbase.com","content":"6 x 33 cl","package_description":{"unit":"Can (33 cl)","base_unit":null,"quantity":"6.000000","unit_stock_item":{"id":"721794004480005","name":"Cola Can (33 cl)","url":"https://api.apicbase.com/api/v2/products/stock_items/721794004480005/"},"type":"Pack"},"average_price_per_package":null,"average_price_per_standard_unit":null,"base_stock_item_quantity":"6.00000","base_stock_item_unit":"cl","base_stock_item_unit_id":"721794004480005","gtin":null,"gtin_list":[],"modified_date":"2022-01-18T14:04:16Z","piece":false,"stockable":true,"weighted":true,"returnable":false,"active":true,"name_translations":{"fr":"Cola 6 x 33 cl","en":"Cola 6 x 33 cl"},"main_ingredient_short_name":"Cola"},{"url":"https://api.apicbase.com/api/v2/products/stock_items/421725660680004/","id":"421725660680004","name":"Milk 0% Fat Crate (6 x 1 l)","main_ingredient_id":"664176283180004","main_ingredient_name":"Milk 0% Fat","stockable_recipe":null,"created_by":"john.doe@apicbase.com","content":"6 x 1 l","package_description":{"unit":"Bottle (1 l)","base_unit":null,"quantity":"6.000000","unit_stock_item":{"id":"121725050680004","name":"Milk 0% Fat Bottle (1 l)","url":"https://api.apicbase.com/api/v2/products/stock_items/121725050680004/"},"type":"Crate"},"average_price_per_package":null,"average_price_per_standard_unit":null,"base_stock_item_quantity":"6.00000","base_stock_item_unit":"l","base_stock_item_unit_id":"121725050680004","gtin":null,"gtin_list":[],"modified_date":"2020-07-29T08:46:23Z","piece":false,"stockable":true,"weighted":true,"returnable":true,"active":true,"name_translations":{"en":"Milk 0% Fat Crate (6 x 1 l)"},"main_ingredient_short_name":"Milk"},{"url":"https://api.apicbase.com/api/v2/products/stock_items/121725050680004/","id":"121725050680004","name":"Milk 0% Fat Bottle (1 l)","main_ingredient_id":"664176283180004","main_ingredient_name":"Milk 0% Fat","stockable_recipe":null,"created_by":"john.doe@apicbase.com","content":"1 l","package_description":{"unit":"l","base_unit":"l","quantity":"1.000000","unit_stock_item":null,"type":"Bottle"},"average_price_per_package":null,"average_price_per_standard_unit":null,"base_stock_item_quantity":"1.00000","base_stock_item_unit":"l","base_stock_item_unit_id":"121725050680004","gtin":null,"modified_date":"2020-07-29T08:46:14Z","piece":true,"stockable":true,"weighted":true,"returnable":false,"active":true,"name_translations":{"en":"Milk 0% Fat Bottle (1 l)","hu":"Milk 0% Fat Bottle (1 l)"},"gtin_list":[],"main_ingredient_short_name":"Milk"}]}}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":3,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"https://api.apicbase.com/api/v2/products/stock_items/921060274251001/"},"id":{"type":"string","example":"921060274251001"},"name":{"type":"string","example":"Cola 6 x 33 cl"},"main_ingredient_id":{"type":"string","example":"664556437850007","nullable":true},"main_ingredient_name":{"type":"string","example":"Cola","nullable":true},"stockable_recipe":{"nullable":true},"created_by":{"type":"string","example":"john.doe@apicbase.com","nullable":true},"content":{"type":"string","example":"6 x 33 cl"},"package_description":{"type":"object","properties":{"unit":{"type":"string","example":"Can (33 cl)"},"base_unit":{},"quantity":{"type":"string","example":"6.000000"},"unit_stock_item":{"type":"object","properties":{"id":{"type":"string","example":"721794004480005"},"name":{"type":"string","example":"Cola Can (33 cl)"},"url":{"type":"string","example":"https://api.apicbase.com/api/v2/products/stock_items/721794004480005/"}}},"type":{"type":"string","nullable":true,"example":"Can","description":"The qualifier submitted as `name` on create. The displayed `name` is composed from the ingredient name, this qualifier and `content`."}}},"average_price_per_package":{"nullable":true},"average_price_per_standard_unit":{"nullable":true},"base_stock_item_quantity":{"type":"string","example":"6.00000","nullable":true},"base_stock_item_unit":{"type":"string","example":"cl","nullable":true},"base_stock_item_unit_id":{"type":"string","example":"721794004480005","nullable":true},"gtin":{"nullable":true},"modified_date":{"type":"string","example":"2022-01-18T14:04:16Z"},"piece":{"type":"boolean","example":false,"default":true},"stockable":{"type":"boolean","example":true,"default":true},"weighted":{"type":"boolean","example":true,"default":true},"returnable":{"type":"boolean","example":false,"default":false,"description":"Whether the package is returnable packaging: a crate, keg, CO2 cylinder, pallet or similar container that carries a deposit and goes back to the supplier. A marker only, it does not change how the package is ordered, counted or costed."},"active":{"type":"boolean","example":true,"default":true},"name_translations":{"type":"object","properties":{"fr":{"type":"string","example":"Cola 6 x 33 cl"},"en":{"type":"string","example":"Cola 6 x 33 cl"}}},"gtin_list":{"type":"array","items":{"type":"string"},"description":"All GTIN/EAN values on the stock item. `gtin` is the first entry of this list."},"main_ingredient_short_name":{"type":"string","nullable":true,"example":"Cola","description":"The short name of the ingredient."}}}}}}}}},"404":{"description":"The requested page is out of range."}},"deprecated":false},"post":{"summary":"Create Stock Item","description":"Creates a stock item.","operationId":"create-stock-item","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["package_description"],"properties":{"name":{"type":"string"},"main_ingredient_id":{"type":"string","description":"An ingredient ID."},"stockable_recipe":{"type":"string","description":"A recipe ID."},"package_description":{"type":"object","properties":{"base_unit":{"type":"string","enum":[""]},"unit_stock_item":{"type":"string","description":"A stock item ID, when a stock item is defined as units of another stock item."},"quantity":{"type":"number","format":"float"}}},"gtin":{"type":"string","description":"GTIN/EAN"},"piece":{"type":"boolean","description":"Whether the stock item defines a \"piece\" of the ingredient. Only one stock item in an ingredient can be a piece."},"stockable":{"type":"boolean"},"weighted":{"type":"boolean"},"returnable":{"type":"boolean","default":false,"description":"Whether the package is returnable packaging: a crate, keg, CO2 cylinder, pallet or similar container that carries a deposit and goes back to the supplier. A marker only, it does not change how the package is ordered, counted or costed."},"active":{"type":"boolean"},"gtin_list":{"type":"array","description":"List of GTIN/EAN values.","items":{"type":"string"}}}},"examples":{"Stock item defined as units of another stock item":{"value":{"name":"8 Packs","main_ingredient_id":"264835764070003","package_description":{"base_unit":null,"quantity":"8","unit_stock_item":"621993824180008"},"gtin":"8486465151","piece":false,"stockable":true}},"Stock item that makes a stockable recipe":{"value":{"name":"Can","stockable_recipe":"249960950400005","package_description":{"base_unit":"ml","quantity":"200"}}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":{"url":"https://api.apicbase.com/api/v2/products/stock_items/121993444160004/","id":"121993444160004","name":"Cola Can (200 ml)","main_ingredient_id":"664645906990004","main_ingredient_name":"Cola","stockable_recipe":{"id":"249960950400005","name":"Cola","url":"https://api.apicbase.com/api/v2/products/recipes/249960950400005/"},"created_by":"john.doe@apicbase.com","content":"200 ml","package_description":{"unit":"ml","base_unit":"ml","quantity":"200.000000","unit_stock_item":null,"type":"Can"},"average_price_per_package":null,"average_price_per_standard_unit":null,"base_stock_item_quantity":"1.00000","base_stock_item_unit":"ml","gtin":null,"modified_date":"2021-04-09T15:31:46Z","piece":false,"stockable":true,"weighted":true,"returnable":false,"active":true,"name_translations":{"en":"Cola Can (200 ml)"},"base_stock_item_unit_id":"121993444160004","gtin_list":[],"main_ingredient_short_name":"Cola"}}},"schema":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v1/products/stock_items/121993444160004/"},"id":{"type":"string","example":"121993444160004"},"name":{"type":"string","example":"Cola Can (200 ml)"},"main_ingredient_id":{"type":"string","example":"664645906990004","nullable":true},"main_ingredient_name":{"type":"string","example":"Cola","nullable":true},"stockable_recipe":{"type":"object","properties":{"id":{"type":"string","example":"249960950400005"},"name":{"type":"string","example":"Cola"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/recipes/249960950400005/"}},"nullable":true},"created_by":{"type":"string","example":"john.doe@apicbase.com","nullable":true},"content":{"type":"string","example":"200 ml"},"package_description":{"type":"object","properties":{"unit":{"type":"string","example":"ml"},"base_unit":{"type":"string","example":"ml"},"quantity":{"type":"string","example":"200.000000"},"unit_stock_item":{},"type":{"type":"string","nullable":true,"example":"Can","description":"The qualifier submitted as `name` on create. The displayed `name` is composed from the ingredient name, this qualifier and `content`."}}},"average_price_per_package":{"nullable":true},"average_price_per_standard_unit":{"nullable":true},"base_stock_item_quantity":{"type":"string","example":"1.00000","nullable":true},"base_stock_item_unit":{"type":"string","example":"ml","nullable":true},"gtin":{"nullable":true},"modified_date":{"type":"string","example":"2021-04-09T15:31:46"},"piece":{"type":"boolean","example":false,"default":true},"stockable":{"type":"boolean","example":true,"default":true},"weighted":{"type":"boolean","example":true,"default":true},"returnable":{"type":"boolean","example":false,"default":false,"description":"Whether the package is returnable packaging: a crate, keg, CO2 cylinder, pallet or similar container that carries a deposit and goes back to the supplier. A marker only, it does not change how the package is ordered, counted or costed."},"active":{"type":"boolean","example":true,"default":true},"gtin_list":{"type":"array","items":{"type":"string"},"description":"All GTIN/EAN values on the stock item. `gtin` is the first entry of this list."},"main_ingredient_short_name":{"type":"string","nullable":true,"example":"Cola","description":"The short name of the ingredient."},"base_stock_item_unit_id":{"type":"string","nullable":true,"example":"721794004480005","description":"The ID of the base stock item for the same ingredient. Stock quantities are converted into its package. For a base stock item this is its own ID."},"name_translations":{"type":"object","additionalProperties":{"type":"string"},"description":"The stock item name per language code."}}}}}},"400":{"description":"Validation error. For example: neither `main_ingredient_id` nor `stockable_recipe` given, both given, neither `base_unit` nor `unit_stock_item` given, or an invalid GTIN."},"404":{"description":"The referenced ingredient, recipe or stock item was not found, or belongs to a different library."}},"deprecated":false}},"/products/stock_items/{stock_item_id}/":{"get":{"summary":"Get Stock Item","description":"Returns information about a specific stock item.","operationId":"get-stock-item","parameters":[{"name":"stock_item_id","in":"path","description":"A stock item's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"url":"https://api.apicbase.com/api/v2/products/stock_items/621725870650009/","id":"621725870650009","name":"Milk 0% Fat Big Crate (12 x 1 l)","main_ingredient_id":"664176283180004","main_ingredient_name":"Milk 0% Fat","stockable_recipe":null,"created_by":"john.doe@apicbase.com","content":"12 x 1 l","package_description":{"unit":"Bottle (1 l)","base_unit":null,"quantity":"12.000000","unit_stock_item":{"id":"121725050680004","name":"Milk 0% Fat Bottle (1 l)","url":"https://api.apicbase.com/api/v2/products/stock_items/121725050680004/"},"type":"Big Crate"},"average_price_per_package":"9.00000","average_price_per_standard_unit":"0.75000","base_stock_item_quantity":"12.00000","base_stock_item_unit":"l","base_stock_item_unit_id":"121725050680004","gtin":null,"gtin_list":[],"modified_date":"2023-10-18T09:53:30Z","piece":false,"stockable":true,"weighted":true,"returnable":true,"active":true,"name_translations":{"en":"Milk 0% Fat Big Crate (12 x 1 l)","fr":"Milk 0% Fat Big Crate (12 x 1 l)"},"supplier_packages":[{"url":"https://api.apicbase.com/api/v2/products/supplier_packages/521344660300002/","id":"521344660300002"}],"main_ingredient_short_name":"Milk"}}},"schema":{"type":"object","properties":{"url":{"type":"string","example":"https://api.apicbase.com/api/v2/products/stock_items/621725870650009/"},"id":{"type":"string","example":"621725870650009"},"name":{"type":"string","example":"Milk 0% Fat Big Crate (12 x 1 l)"},"main_ingredient_id":{"type":"string","example":"664176283180004","nullable":true},"main_ingredient_name":{"type":"string","example":"Milk 0% Fat","nullable":true},"stockable_recipe":{"nullable":true},"created_by":{"type":"string","example":"john.doe@apicbase.com","nullable":true},"content":{"type":"string","example":"12 x 1 l"},"package_description":{"type":"object","properties":{"unit":{"type":"string","example":"Bottle (1 l)"},"base_unit":{},"quantity":{"type":"string","example":"12.000000"},"unit_stock_item":{"type":"object","properties":{"id":{"type":"string","example":"121725050680004"},"name":{"type":"string","example":"Milk 0% Fat Bottle (1 l)"},"url":{"type":"string","example":"https://api.apicbase.com/api/v2/products/stock_items/121725050680004/"}}},"type":{"type":"string","nullable":true,"example":"Can","description":"The qualifier submitted as `name` on create. The displayed `name` is composed from the ingredient name, this qualifier and `content`."}}},"average_price_per_package":{"type":"string","example":"9.00000","nullable":true},"average_price_per_standard_unit":{"type":"string","example":"0.75000","nullable":true},"base_stock_item_quantity":{"type":"string","example":"12.00000","nullable":true},"base_stock_item_unit":{"type":"string","example":"l","nullable":true},"base_stock_item_unit_id":{"type":"string","example":"121725050680004","nullable":true},"gtin":{"nullable":true},"modified_date":{"type":"string","example":"2023-10-18T09:53:30Z"},"piece":{"type":"boolean","example":false,"default":true},"stockable":{"type":"boolean","example":true,"default":true},"weighted":{"type":"boolean","example":true,"default":true},"returnable":{"type":"boolean","example":false,"default":false,"description":"Whether the package is returnable packaging: a crate, keg, CO2 cylinder, pallet or similar container that carries a deposit and goes back to the supplier. A marker only, it does not change how the package is ordered, counted or costed."},"active":{"type":"boolean","example":true,"default":true},"name_translations":{"type":"object","properties":{"en":{"type":"string","example":"Milk 0% Fat Big Crate (12 x 1 l)"},"fr":{"type":"string","example":"Milk 0% Fat Big Crate (12 x 1 l)"}}},"supplier_packages":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"https://api.apicbase.com/api/v2/products/supplier_packages/521344660300002/"},"id":{"type":"string","example":"521344660300002"}}}},"gtin_list":{"type":"array","items":{"type":"string"},"description":"All GTIN/EAN values on the stock item. `gtin` is the first entry of this list."},"main_ingredient_short_name":{"type":"string","nullable":true,"example":"Milk","description":"The short name of the ingredient."}}}}}},"404":{"description":"Stock item not found, or belongs to a different library."}},"deprecated":false},"patch":{"summary":"Edit Stock Item","description":"Updates an existing stock item.","operationId":"edit-stock-item","parameters":[{"name":"stock_item_id","in":"path","description":"A stock item ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"package_description":{"type":"object","properties":{"base_unit":{"type":"string","enum":[""]},"unit_stock_item":{"type":"string","description":"A stock item ID, when a stock item is defined as units of another stock item."},"quantity":{"type":"number","format":"float"}}},"gtin":{"type":"string","description":"GTIN/EAN"},"piece":{"type":"boolean","description":"Whether the stock item defines a \"piece\" of the ingredient. Only one stock item in an ingredient can be a piece.","default":false},"stockable":{"type":"boolean","default":true},"weighted":{"type":"boolean","default":false},"returnable":{"type":"boolean","default":false,"description":"Whether the package is returnable packaging: a crate, keg, CO2 cylinder, pallet or similar container that carries a deposit and goes back to the supplier. A marker only, it does not change how the package is ordered, counted or costed. Cannot be changed on a package that comes from an integrated supplier."},"active":{"type":"boolean"},"gtin_list":{"type":"array","items":{"type":"string"},"default":"","description":"List of GTIN/EAN values."}}},"examples":{"Request Example":{"value":{"name":"Can","package_description":{"base_unit":"g","quantity":"200","unit_stock_item":null},"gtin":"8486465151","piece":false,"stockable":true,"weighted":true,"returnable":true}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"url":"https://api.apicbase.com/api/v2/products/stock_items/621993824180008/","id":"621993824180008","name":"Cabbage Can (200 g)","main_ingredient_id":"264835764070003","main_ingredient_name":"Cabbage","main_ingredient_short_name":"Cabbage","stockable_recipe":null,"created_by":"john.doe@apicbase.com","content":"200 g","package_description":{"unit":"g","base_unit":"g","quantity":"200.000000","unit_stock_item":null,"type":"Can"},"average_price_per_package":null,"average_price_per_standard_unit":null,"base_stock_item_quantity":"1.00000","base_stock_item_unit":"g","base_stock_item_unit_id":"621993824180008","gtin":"8486465151","gtin_list":["8486465151"],"modified_date":"2021-04-09T14:04:57Z","piece":false,"stockable":true,"weighted":false,"returnable":false,"active":true,"name_translations":{"en":"Cabbage Can (200 g)"},"supplier_packages":[]}}},"schema":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v1/products/stock_items/621993824180008/"},"id":{"type":"string","example":"621993824180008"},"name":{"type":"string","example":"Cabbage Can (200 g)"},"main_ingredient_id":{"type":"string","example":"264835764070003","nullable":true},"main_ingredient_name":{"type":"string","example":"jan19-even2","nullable":true},"stockable_recipe":{"nullable":true},"created_by":{"type":"string","example":"john.doe@apicbase.com","nullable":true},"content":{"type":"string","example":"200 g"},"package_description":{"type":"object","properties":{"unit":{"type":"string","example":"g"},"base_unit":{"type":"string","example":"g"},"quantity":{"type":"string","example":"200.000000"},"unit_stock_item":{},"type":{"type":"string","nullable":true,"example":"Can","description":"The qualifier submitted as `name` on create. The displayed `name` is composed from the ingredient name, this qualifier and `content`."}}},"average_price_per_package":{"nullable":true},"average_price_per_standard_unit":{"nullable":true},"base_stock_item_quantity":{"type":"string","example":"1.00000","nullable":true},"base_stock_item_unit":{"type":"string","example":"g","nullable":true},"gtin":{"type":"string","example":"8486465151","nullable":true},"modified_date":{"type":"string","example":"2021-04-09T14:04:57"},"piece":{"type":"boolean","example":false,"default":true},"stockable":{"type":"boolean","example":true,"default":true},"weighted":{"type":"boolean","example":true,"default":true},"returnable":{"type":"boolean","example":false,"default":false,"description":"Whether the package is returnable packaging: a crate, keg, CO2 cylinder, pallet or similar container that carries a deposit and goes back to the supplier. A marker only, it does not change how the package is ordered, counted or costed."},"active":{"type":"boolean","example":true,"default":true},"gtin_list":{"type":"array","items":{"type":"string"},"description":"All GTIN/EAN values on the stock item. `gtin` is the first entry of this list."},"main_ingredient_short_name":{"type":"string","nullable":true,"example":"Milk","description":"The short name of the ingredient."},"base_stock_item_unit_id":{"type":"string","nullable":true,"example":"121725050680004","description":"The ID of the base stock item for the same ingredient. Stock quantities are converted into its package. For a base stock item this is its own ID."},"name_translations":{"type":"object","additionalProperties":{"type":"string"},"description":"The stock item name per language code."},"supplier_packages":{"type":"array","description":"The supplier packages linked to this stock item.","items":{"type":"object","properties":{"url":{"type":"string","example":"https://api.apicbase.com/api/v2/products/supplier_packages/521344660300002/"},"id":{"type":"string","example":"521344660300002"}}}}}}}}},"400":{"description":"Validation error. For example: an invalid GTIN, both `base_unit` and `unit_stock_item` given, a `weighted` combination the model does not allow, or a `returnable` change on a package that comes from an integrated supplier."},"404":{"description":"Stock item not found, or belongs to a different library."}},"deprecated":false}},"/products/supplier_packages/":{"get":{"summary":"Get Supplier Packages","description":"Returns a list of supplier packages in the library.","operationId":"get-supplier-packages","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"supplier_email","in":"query","description":"Filter on supplier packages belonging to a supplier. Takes an email address.","schema":{"type":"string"}},{"name":"supplier_id","in":"query","description":"Filter on supplier packages belonging to a supplier. Takes a supplier ID.","schema":{"type":"string"}},{"name":"stock_item_id","in":"query","description":"A stock item ID. Filter on supplier packages in a given stock item.","schema":{"type":"string"}},{"name":"supplier_article_number","in":"query","description":"Filter on a supplier article number.","schema":{"type":"string"}},{"name":"active","in":"query","description":"Filter on active/inactive supplier packages.","schema":{"type":"boolean"}},{"name":"orderable","in":"query","description":"Filter on orderable/not orderable supplier packages.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"count":1,"next":null,"previous":null,"results":[{"url":"https://app.apicbase.com/api/v2/products/supplier_packages/821344070300004/","id":"821344070300004","stock_item":{"id":"521725390640009","name":"Pasta Spaghetti Box (50 x 700 g)","url":"https://app.apicbase.com/api/v2/products/stock_items/521725390640009/"},"supplier":{"id":"825320333320003","url":"https://app.apicbase.com/api/v2/suppliers/825320333320003/","name":"Mama Pasta","contact_first_name":"","contact_last_name":"","email":"","supplier_email_list":[],"tax_number":"","customer_number":"","internal_supplier_id":"","supplier_outlet_id":null,"standard_delivery_fee":null,"notes":"","attach_csv_on_purchase_orders":false,"address":{"street":"","number":null,"city":"","country":null,"postal_code":"","mobile":"","telephone":""}},"average_price_per_package":"30.0000000000","average_price_per_standard_unit":"0.8571428571","supplier_article_number":"9999999","supplier_product_name":"PASTA SPAGHETTI BOX 50 PC","active":true,"orderable":true,"portioning":false,"is_portion_article":false,"dynamic_pricing_fee":null,"dynamic_pricing_margin_percentage":null,"use_dynamic_pricing":false}]}}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":1,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/supplier_packages/821344070300004/"},"id":{"type":"string","example":"821344070300004"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"521725390640009"},"name":{"type":"string","example":"Pasta Spaghetti Box (50 x 700 g)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/521725390640009/"}}},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"825320333320003"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/suppliers/825320333320003/"},"name":{"type":"string","example":"Mama Pasta"},"contact_first_name":{"type":"string","example":""},"contact_last_name":{"type":"string","example":""},"email":{"type":"string","example":""},"supplier_email_list":{"type":"array","items":{"type":"string"},"example":[]},"tax_number":{"type":"string","example":""},"customer_number":{"type":"string","example":""},"internal_supplier_id":{"type":"string","example":""},"supplier_outlet_id":{"nullable":true},"standard_delivery_fee":{"nullable":true},"notes":{"type":"string","example":""},"attach_csv_on_purchase_orders":{"type":"boolean","example":false,"default":false},"address":{"type":"object","properties":{"street":{"type":"string","example":""},"number":{"nullable":true},"city":{"type":"string","example":""},"country":{"nullable":true},"postal_code":{"type":"string","example":""},"mobile":{"type":"string","example":""},"telephone":{"type":"string","example":""}}}}},"average_price_per_package":{"type":"string","example":"30.0000000000"},"average_price_per_standard_unit":{"type":"string","example":"0.8571428571"},"supplier_article_number":{"nullable":true,"example":"9999999"},"supplier_product_name":{"type":"string","example":"PASTA SPAGHETTI BOX 50 PC"},"active":{"type":"boolean","example":true,"default":true},"orderable":{"type":"boolean","example":true,"default":true},"portioning":{"type":"boolean","example":false,"default":false},"is_portion_article":{"type":"boolean","example":false,"description":"Whether this package is generated from a supplier portion articles configuration."},"dynamic_pricing_fee":{"nullable":true},"dynamic_pricing_margin_percentage":{"nullable":true},"use_dynamic_pricing":{"type":"boolean","example":false,"default":false}}}}}}}}}},"deprecated":false},"post":{"summary":"Create Supplier Package","description":"Creates a new instance of a supplier package.","operationId":"create-supplier-package","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["price","supplier","stock_item"],"properties":{"price":{"type":"number","description":"The package's price","format":"float"},"price_unit":{"type":"string","description":"The price's unit. Must be a valid unit of measure (g, l, kg, cl...)"},"orderable":{"type":"boolean","description":"Whether the supplier package should be orderable or not.","default":true},"supplier":{"type":"object","properties":{"id":{"type":"string","description":"A supplier's ID."},"name":{"type":"string","description":"A supplier's name."}}},"supplier_article_number":{"type":"string","description":"The supplier's article number."},"supplier_product_name":{"type":"string","description":"The supplier's product name"},"stock_item":{"type":"object","properties":{"id":{"type":"string","description":"A stock item ID."},"package_description":{"type":"object","properties":{"base_unit":{"type":"string","description":"quantity"},"quantity":{"type":"number","format":"float"}}},"name":{"type":"string"},"main_ingredient_id":{"type":"string","description":"An ingredient ID"},"stockable_recipe":{"type":"string","description":"A recipe ID"},"gtin":{"type":"string","description":"GTIN/EAN"},"piece":{"type":"boolean","description":"Whether the stock item defines a \"piece\" of the ingredient. Only one stock item in an ingredient can be a piece."},"stockable":{"type":"boolean","default":true},"weighted":{"type":"boolean","default":false},"returnable":{"type":"boolean","default":false,"description":"Whether the package is returnable packaging: a crate, keg, CO2 cylinder, pallet or similar container that carries a deposit and goes back to the supplier. A marker only, it does not change how the package is ordered, counted or costed. Write-only here: it is accepted when creating the stock item but is not returned when reading supplier packages back. Read it from the stock items endpoint instead."},"active":{"type":"boolean","default":true}}},"active":{"type":"boolean","description":"Whether the supplier package should be active or not.","default":true},"use_dynamic_pricing":{"type":"boolean","description":"Whether the supplier package should use dynamic pricing or not. Only available to supplier packages of internal suppliers.","default":false},"dynamic_pricing_margin_percentage":{"type":"number","description":"The supplier package's dynamic pricing margin percentage. Used when use_dynamic_pricing is set to true.","format":"double"},"dynamic_pricing_fee":{"type":"number","description":"The supplier package's dynamic pricing fee. Used when use_dynamic_pricing is set to true.","format":"double"}}},"examples":{"Create: existing stock item and existing supplier (by id)":{"value":{"supplier":{"id":"325220129010007"},"stock_item":{"id":"521725390640009"},"price_unit":"g","price":"8","orderable":false,"dynamic_pricing_fee":5,"supplier_article_number":null,"use_dynamic_pricing":true}},"Create: existing stock item and existing supplier (by name)":{"value":{"supplier":{"name":"Mama Pasta"},"stock_item":{"id":"421725380620004"},"price_unit":"g","price":"8","orderable":false}},"Create: new stock_item and new supplier":{"value":{"supplier":{"name":"New Supplier Example","email":"newsupplieremail@apicbase.com"},"stock_item":{"package_description":{"base_unit":"g","quantity":10},"stockable":true,"weighted":true,"returnable":true,"main_ingredient_id":"964556037770002"},"price":"10","orderable":false}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":{"url":"https://app.apicbase.com/api/v2/products/supplier_packages/785679/","id":"785679","stock_item":{"id":"521725390640009","name":"Pasta Spaghetti Box (50 x 700 g)","url":"https://app.apicbase.com/api/v2/products/stock_items/521725390640009/"},"supplier":{"id":"325220129010007","url":"https://app.apicbase.com/api/v2/suppliers/325220129010007/","name":"Happy Cow Products","contact_first_name":"Matthew","contact_last_name":"Smith","email":"","supplier_email_list":[],"tax_number":"","customer_number":"","internal_supplier_id":"","supplier_outlet_id":null,"standard_delivery_fee":null,"notes":"","attach_csv_on_purchase_orders":false,"address":{"street":"Main Street","number":"12","city":"Brussels","country":null,"postal_code":"2000","mobile":"","telephone":""}},"average_price_per_package":"280000.0000000000","average_price_per_standard_unit":"8000.0000000000","supplier_article_number":null,"supplier_product_name":null,"active":true,"orderable":false,"portioning":false,"is_portion_article":false,"dynamic_pricing_fee":"5.0000000000","dynamic_pricing_margin_percentage":null,"use_dynamic_pricing":true}},"Created (using supplier name)":{"value":{"url":"https://app.apicbase.com/api/v2/products/supplier_packages/785680/","id":"785680","stock_item":{"id":"421725380620004","name":"Pasta Spaghetti 700 g","url":"https://app.apicbase.com/api/v2/products/stock_items/421725380620004/"},"supplier":{"id":"825320333320003","url":"https://app.apicbase.com/api/v2/suppliers/825320333320003/","name":"Mama Pasta","contact_first_name":"","contact_last_name":"","email":"","supplier_email_list":[],"tax_number":"","customer_number":"","internal_supplier_id":"","supplier_outlet_id":null,"standard_delivery_fee":null,"notes":"","attach_csv_on_purchase_orders":false,"address":{"street":"","number":null,"city":"","country":null,"postal_code":"","mobile":"","telephone":""}},"average_price_per_package":"5600.0000000000","average_price_per_standard_unit":"8000.0000000000","supplier_article_number":null,"supplier_product_name":null,"active":true,"orderable":false,"portioning":false,"is_portion_article":false,"dynamic_pricing_fee":null,"dynamic_pricing_margin_percentage":null,"use_dynamic_pricing":false}},"Created new stock_item, supplier and supplier package":{"value":{"url":"https://app.apicbase.com/api/v2/products/supplier_packages/785682/","id":"785682","stock_item":{"id":"921998012750003","name":"Egg 10 g","url":"https://app.apicbase.com/api/v2/products/stock_items/921998012750003/"},"supplier":{"id":"125930981570002","url":"https://app.apicbase.com/api/v2/suppliers/125930981570002/","name":"New Supplier Example","contact_first_name":"","contact_last_name":"","email":"newsupplieremail@apicbase.com","supplier_email_list":[],"tax_number":"","customer_number":"","internal_supplier_id":"","supplier_outlet_id":null,"standard_delivery_fee":null,"notes":"","attach_csv_on_purchase_orders":false,"address":{"street":"","number":null,"city":"","country":null,"postal_code":"","mobile":"","telephone":""}},"average_price_per_package":"10.0000000000","average_price_per_standard_unit":"1000.0000000000","supplier_article_number":null,"supplier_product_name":null,"active":true,"orderable":false,"portioning":false,"is_portion_article":false,"dynamic_pricing_fee":null,"dynamic_pricing_margin_percentage":null,"use_dynamic_pricing":false}}},"schema":{"oneOf":[{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/supplier_packages/785679/"},"id":{"type":"string","example":"785679"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"521725390640009"},"name":{"type":"string","example":"Pasta Spaghetti Box (50 x 700 g)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/521725390640009/"}}},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"325220129010007"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/suppliers/325220129010007/"},"name":{"type":"string","example":"Happy Cow Products"},"contact_first_name":{"type":"string","example":"Matthew"},"contact_last_name":{"type":"string","example":"Smith"},"email":{"type":"string","example":""},"supplier_email_list":{"type":"array","items":{"type":"string"},"example":[]},"tax_number":{"type":"string","example":""},"customer_number":{"type":"string","example":""},"internal_supplier_id":{"type":"string","example":""},"supplier_outlet_id":{"nullable":true},"standard_delivery_fee":{"nullable":true},"notes":{"type":"string","example":""},"attach_csv_on_purchase_orders":{"type":"boolean","example":false},"address":{"type":"object","properties":{"street":{"type":"string","example":"Main Street"},"number":{"nullable":true},"city":{"type":"string","example":"Brussels"},"country":{"nullable":true},"postal_code":{"type":"string","example":"2000"},"mobile":{"type":"string","example":""},"telephone":{"type":"string","example":""}}}}},"average_price_per_package":{"type":"string","example":"280000.0000000000"},"average_price_per_standard_unit":{"type":"string","example":"8000.0000000000"},"supplier_article_number":{"nullable":true},"supplier_product_name":{"nullable":true},"active":{"type":"boolean","example":true,"default":true},"orderable":{"type":"boolean","example":false,"default":true},"portioning":{"type":"boolean","example":false,"default":false},"is_portion_article":{"type":"boolean","example":false},"dynamic_pricing_fee":{"nullable":true},"dynamic_pricing_margin_percentage":{"nullable":true},"use_dynamic_pricing":{"type":"boolean","example":true,"default":false}}},{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/supplier_packages/785680/"},"id":{"type":"string","example":"785680"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421725380620004"},"name":{"type":"string","example":"Pasta Spaghetti 700 g"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/421725380620004/"}}},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"825320333320003"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/suppliers/825320333320003/"},"name":{"type":"string","example":"Mama Pasta"},"contact_first_name":{"type":"string","example":""},"contact_last_name":{"type":"string","example":""},"email":{"type":"string","example":""},"supplier_email_list":{"type":"array","items":{"type":"string"},"example":[]},"tax_number":{"type":"string","example":""},"customer_number":{"type":"string","example":""},"internal_supplier_id":{"type":"string","example":""},"supplier_outlet_id":{"nullable":true},"standard_delivery_fee":{"nullable":true},"notes":{"type":"string","example":""},"attach_csv_on_purchase_orders":{"type":"boolean","example":false},"address":{"type":"object","properties":{"street":{"type":"string","example":""},"number":{"nullable":true},"city":{"type":"string","example":""},"country":{"nullable":true},"postal_code":{"type":"string","example":""},"mobile":{"type":"string","example":""},"telephone":{"type":"string","example":""}}}}},"average_price_per_package":{"type":"string","example":"5600.0000000000"},"average_price_per_standard_unit":{"type":"string","example":"8000.0000000000"},"supplier_article_number":{"nullable":true},"supplier_product_name":{"nullable":true},"active":{"type":"boolean","example":true,"default":true},"orderable":{"type":"boolean","example":false,"default":true},"portioning":{"type":"boolean","example":false,"default":false},"is_portion_article":{"type":"boolean","example":false},"dynamic_pricing_fee":{"nullable":true},"dynamic_pricing_margin_percentage":{"nullable":true},"use_dynamic_pricing":{"type":"boolean","example":false,"default":false}},"title":"Created (using supplier name)"},{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/supplier_packages/785682/"},"id":{"type":"string","example":"785682"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"921998012750003"},"name":{"type":"string","example":"Egg 10 g"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/921998012750003/"}}},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"125930981570002"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/suppliers/125930981570002/"},"name":{"type":"string","example":"New Supplier Example"},"contact_first_name":{"type":"string","example":""},"contact_last_name":{"type":"string","example":""},"email":{"type":"string","example":"newsupplieremail@apicbase.com"},"supplier_email_list":{"type":"array","items":{"type":"string"},"example":[]},"tax_number":{"type":"string","example":""},"customer_number":{"type":"string","example":""},"internal_supplier_id":{"type":"string","example":""},"supplier_outlet_id":{"nullable":true},"standard_delivery_fee":{"nullable":true},"notes":{"type":"string","example":""},"attach_csv_on_purchase_orders":{"type":"boolean","example":false},"address":{"type":"object","properties":{"street":{"type":"string","example":""},"number":{"nullable":true},"city":{"type":"string","example":""},"country":{"nullable":true},"postal_code":{"type":"string","example":""},"mobile":{"type":"string","example":""},"telephone":{"type":"string","example":""}}}}},"average_price_per_package":{"type":"string","example":"10.0000000000"},"average_price_per_standard_unit":{"type":"string","example":"1000.0000000000"},"supplier_article_number":{"nullable":true},"supplier_product_name":{"nullable":true},"active":{"type":"boolean","example":true,"default":true},"orderable":{"type":"boolean","example":false,"default":true},"portioning":{"type":"boolean","example":false,"default":false},"is_portion_article":{"type":"boolean","example":false},"dynamic_pricing_fee":{"nullable":true},"dynamic_pricing_margin_percentage":{"nullable":true},"use_dynamic_pricing":{"type":"boolean","example":false,"default":false}},"title":"Created new stock_item, supplier and supplier package"}]}}}},"400":{"description":"Bad request — the payload failed validation.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}]},"description":"Field errors are keyed by field name. Most values are an array of strings, but stock_item errors (missing package_description, missing ingredient/recipe, or an unknown stock_item.id) are nested one level deeper under a stock_item key, since those checks run inside the nested stock_item serializer. Two specific failures below use the key `messsage` (three s's) instead of `message` — a known quirk of the underlying implementation, not a documentation typo."},"examples":{"missing_price":{"summary":"The required price field was left out","value":{"price":["This field is required."]}},"supplier_missing_id_or_name":{"summary":"The supplier object has neither id nor name","value":{"supplier":["you need to provide either supplier id or supplier name"]}},"stock_item_not_found":{"summary":"stock_item.id was given but does not match any stock item in the library. The body doubly-nests stock_item (`{\"stock_item\": {\"stock_item\": [...]}}`) because the underlying error already carries a stock_item key before DRF nests it again under the field name — a real quirk, not a documentation typo.","value":{"stock_item":{"stock_item":["stock item matching id does not exist"]}}},"new_stock_item_missing_package_description":{"summary":"stock_item has no id (new stock item) but package_description was left out","value":{"stock_item":{"package_description":["This field is required when creating a new stock item."]}}},"new_stock_item_missing_ingredient_or_recipe":{"summary":"stock_item has no id (new stock item) but neither main_ingredient_id nor stockable_recipe was given","value":{"stock_item":{"main_ingredient_id":["Either ingredient or stockable recipe is required when creating a new stock item."]}}},"dynamic_pricing_missing_fee_or_margin":{"summary":"use_dynamic_pricing key is present in the request (even as false) but neither dynamic_pricing_fee nor dynamic_pricing_margin_percentage was given. The check fires on the key merely being present, not on its value being true.","value":{"use_dynamic_pricing":["Either dynamic_pricing_fee or dynamic_pricing_margin_percentage are required if use_dynamic_pricing is set"]}},"duplicate_package":{"summary":"A supplier package already exists for this exact (stock_item, supplier, supplier_article_number) combination — not documented anywhere else on this page. Uses the `messsage` key.","value":{"messsage":["Package already connected to the supplier"]}},"negative_price":{"summary":"price is a negative number. Uses the `messsage` key.","value":{"messsage":["Price cannot be negative"]}},"no_permission_to_create_supplier":{"summary":"The user lacks the \"Manage suppliers\" permission needed to create a new supplier","value":{"supplier":["You don't have the required permissions to create a supplier, Please enter a valid supplier id or supplier name."]}}}}}}},"deprecated":false}},"/products/supplier_packages/{supplier_package_id}/":{"get":{"summary":"Get Supplier Package","description":"Returns information about a single supplier package.","operationId":"get-supplier-package","parameters":[{"name":"supplier_package_id","in":"path","description":"A supplier package ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n    \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/821344070300004/\",\n    \"id\": \"821344070300004\",\n    \"stock_item\": {\n        \"id\": \"521725390640009\",\n        \"name\": \"Pasta Spaghetti Box (50 x 700 g)\",\n        \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/521725390640009/\"\n    },\n    \"supplier\": {\n        \"url\": \"https://app.apicbase.com/api/v2/suppliers/825320333320003/\",\n        \"first_name\": \"\",\n        \"id\": \"825320333320003\",\n        \"company_name\": \"Mama Pasta\",\n        \"last_name\": \"\",\n        \"internal_supplier_outlet_id\": null\n    },\n    \"average_price_per_package\": \"30.0000000000\",\n    \"average_price_per_standard_unit\": \"0.8571428571\",\n    \"supplier_article_number\": \"9999999\",\n    \"supplier_product_name\": \"PASTA SPAGHETTI BOX 50 PC\",\n    \"active\": true,\n    \"orderable\": true,\n    \"portioning\": false,\n    \"dynamic_pricing_fee\": null,\n    \"supplier_article_number\": null,\n    \"use_dynamic_pricing\": false\n}"}},"schema":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/supplier_packages/821344070300004/"},"id":{"type":"string","example":"821344070300004"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"521725390640009"},"name":{"type":"string","example":"Pasta Spaghetti Box (50 x 700 g)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/521725390640009/"}}},"supplier":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v2/suppliers/825320333320003/"},"first_name":{"type":"string","example":""},"id":{"type":"string","example":"825320333320003"},"company_name":{"type":"string","example":"Mama Pasta"},"last_name":{"type":"string","example":""},"internal_supplier_outlet_id":{}}},"average_price_per_package":{"type":"string","example":"30.0000000000"},"average_price_per_standard_unit":{"type":"string","example":"0.8571428571"},"supplier_article_number":{},"supplier_product_name":{"type":"string","example":"PASTA SPAGHETTI BOX 50 PC"},"active":{"type":"boolean","example":true,"default":true},"orderable":{"type":"boolean","example":true,"default":true},"portioning":{"type":"boolean","example":false,"default":true},"dynamic_pricing_fee":{},"use_dynamic_pricing":{"type":"boolean","example":false,"default":true}}}}}}},"deprecated":false},"patch":{"summary":"Edit Supplier Package","description":"Edits an existing supplier package.","operationId":"edit-supplier-package","parameters":[{"name":"supplier_package_id","in":"path","description":"A supplier package ID.","schema":{"type":"integer","format":"int32"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"price":{"type":"number","description":"The package's price","format":"float"},"price_unit":{"type":"string","description":"The price's unit"},"active":{"type":"boolean","description":"Whether the supplier package should be active or not.","default":true},"orderable":{"type":"boolean","description":"Whether the supplier package should be orderable or not.","default":true},"supplier_article_number":{"type":"string","description":"The supplier's article number"},"supplier_product_name":{"type":"string","description":"The supplier's product name"},"use_dynamic_pricing":{"type":"boolean","description":"Whether the supplier package should use dynamic pricing or not. Only available to supplier packages of internal suppliers.","default":false},"dynamic_pricing_margin_percentage":{"type":"number","description":"The supplier package's dynamic pricing margin percentage. Used when use_dynamic_pricing is set to true.","format":"double"},"dynamic_pricing_fee":{"type":"number","description":"The supplier package's dynamic pricing fee. Used when use_dynamic_pricing is set to true.","format":"double"}}},"examples":{"Request Example":{"value":{"supplier_article_number":null,"supplier_article_name":"Article Name Example","price_unit":"kg","price":"10","orderable":true,"dynamic_pricing_fee":5,"use_dynamic_pricing":true}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/785680/\",\n  \"id\": 785680,\n  \"stock_item\": {\n    \"id\": \"421725380620004\",\n    \"name\": \"Pasta Spaghetti 700 g\",\n    \"url\": \"https://app.apicbase.com/api/v1/products/stock_items/421725380620004/\"\n  },\n  \"supplier\": {\n    \"id\": \"825320333320003\",\n    \"url\": \"https://app.apicbase.com/api/v1/contact/825320333320003/\",\n    \"company_name\": \"Mama Pasta\",\n    \"first_name\": \"\",\n    \"last_name\": \"\",\n    \"avatar\": null,\n    \"telephone\": \"\",\n    \"mobile\": \"\",\n    \"email\": null,\n    \"website\": null,\n    \"facebook_url\": null,\n    \"twitter_url\": null,\n    \"instagram_url\": null,\n    \"linkedin_url\": null,\n    \"street\": \"\",\n    \"number\": null,\n    \"postal_code\": \"\",\n    \"city\": \"\",\n    \"country\": null,\n    \"internal_supplier_id\": null\n  },\n  \"average_price_per_package\": \"7.0000000000\",\n  \"average_price_per_standard_unit\": \"10.0000000000\",\n  \"supplier_article_number\": \"54\",\n  \"supplier_product_name\": \"Article Name Example\",\n  \"active\": true,\n  \"orderable\": true,\n  \"portioning\": false,\n  \"dynamic_pricing_fee\": 5.0,\n  \"supplier_article_number\": null,\n  \"use_dynamic_pricing\": true\n}"}},"schema":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v1/products/supplier_packages/785680/"},"id":{"type":"integer","example":785680,"default":0},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421725380620004"},"name":{"type":"string","example":"Pasta Spaghetti 700 g"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/products/stock_items/421725380620004/"}}},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"825320333320003"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/contact/825320333320003/"},"company_name":{"type":"string","example":"Mama Pasta"},"first_name":{"type":"string","example":""},"last_name":{"type":"string","example":""},"avatar":{},"telephone":{"type":"string","example":""},"mobile":{"type":"string","example":""},"email":{},"website":{},"facebook_url":{},"twitter_url":{},"instagram_url":{},"linkedin_url":{},"street":{"type":"string","example":""},"number":{},"postal_code":{"type":"string","example":""},"city":{"type":"string","example":""},"country":{},"internal_supplier_id":{}}},"average_price_per_package":{"type":"string","example":"7.0000000000"},"average_price_per_standard_unit":{"type":"string","example":"10.0000000000"},"supplier_article_number":{},"supplier_product_name":{"type":"string","example":"Article Name Example"},"active":{"type":"boolean","example":true,"default":true},"orderable":{"type":"boolean","example":true,"default":true},"portioning":{"type":"boolean","example":false,"default":true},"dynamic_pricing_fee":{"type":"integer","example":5,"default":0},"use_dynamic_pricing":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false}},"/products/supplier_packages/{supplier_package_id}/integration_data/":{"get":{"summary":"Get Supplier Package Integration Data","description":"Returns the raw integration data recorded by Apicbase for a given supplier package.\n\nUse this endpoint to retrieve the original, unprocessed payload that was supplied by the integrated supplier. This is useful for building automations that rely on fields Apicbase does not natively expose (for example, VAT codes or other supplier-specific attributes).\n\n**Availability**: Only supplier packages that were created via a supplier integration are supported.","operationId":"get-supplier-package-integration-data","parameters":[{"name":"supplier_package_id","in":"path","description":"A supplier package ID.","schema":{"type":"string","example":"821344070300004"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"results":[{"integration_type":"bidfood-nl","customer_number":"123456","raw_data":{"name":"Coca-Cola","price":"12.00","third_party_id":"AB1234"},"last_supplier_update":"2026-04-15T12:30:00Z"},{"integration_type":"bidfood-nl","customer_number":"789012","raw_data":{"name":"Coca-Cola Alt","price":"12.50","third_party_id":"AB1234"},"last_supplier_update":"2026-04-16T08:10:00Z"}]}},"Empty Result":{"value":{"results":[]}},"Shared Customer Number":{"value":{"results":[{"integration_type":"solucious","customer_number":null,"raw_data":{"name":"Solucious Product","third_party_id":"SOL001"},"last_supplier_update":"2026-04-15T12:30:00Z"}]}}},"schema":{"type":"object","properties":{"results":{"type":"array","description":"List of integration data records for the supplier package. Empty when the package is integrated but no raw data records exist yet.","items":{"type":"object","properties":{"integration_type":{"type":"string","example":"bidfood-nl","description":"The Apicbase identifier of the supplier integration that produced this record."},"customer_number":{"type":"string","nullable":true,"example":"123456","description":"The customer number of the account this record belongs to. `null` for integrations where data is shared across all customers of the integrated supplier."},"raw_data":{"type":"object","description":"The raw payload as received from the supplier.","additionalProperties":true,"example":{"name":"Coca-Cola","price":"12.00","third_party_id":"AB1234"}},"last_supplier_update":{"type":"string","format":"date-time","nullable":true,"example":"2026-04-15T12:30:00Z","description":"Timestamp of the most recent supplier update for this record."}}}}}}}}},"404":{"description":"Returned when the supplier package does not exist, when it exists but has no integration connector, or when the supplier does not support the generic integration model (for example, Sligro V1, VHC V1, or Hanos)."}},"deprecated":false}},"/accounts/outlets/{outlet_id}/indirect_linked":{"get":{"summary":"Get Related Items through Indirect Links for Outlet","description":"Returns information about items with indirect links to an outlet.","operationId":"get-related-items-through-indirect-links-for-outlet","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"000000000000000\",\n  \"url\": \"https://app.apicbase.com/api/v1/accounts/outlets/000000000000000/\",\n  \"name\": \"My outlet\",\n  \"external_name\": \"My outlet external name\",\n  \"description\": \"My outlet description\",\n  \"timezone\": \"Europe/Brussels\",\n  \"supplier\": {\n    \"id\": \"225040863690007\",\n    \"url\": \"http://apicdev.com:8000/api/v1/contact/225040863690007/\",\n    \"company_name\": \"My Supplier\",\n    \"first_name\": \"My\",\n    \"last_name\": \"Supplier\",\n    \"avatar\": \"https://production-apicvault-static.s3.amazonaws.com/apicbase/images/avatar.png\",\n    \"telephone\": \"000-0000\",\n    \"mobile\": \"000-0000\",\n    \"email\": \"email@email.com\",\n    \"website\": \"https://www.website.com\",\n    \"facebook_url\": \"https://www.facebook.com/my-supplier\",\n    \"twitter_url\": \"https://www.twitter.com/my-supplier\",\n    \"instagram_url\": \"https://www.instagram.com/my-supplier\",\n    \"linkedin_url\": \"https://www.linkedin.com/my-supplier\",\n    \"street\": \"my street\",\n    \"number\": \"1234\",\n    \"postal_code\": \"000-0000\",\n    \"city\": \"Brussels\",\n    \"country\": \"Belgium\",\n    \"internal_supplier_id\": \"000000000000000\"\n  },\n  \"billing_contact\": {\n    \"id\": \"725040573610007\",\n    \"first_name\": \"supplier contact 08031940\",\n    \"last_name\": \"supplier last 08031940\",\n    \"phone\": \"08031940\",\n    \"email\": \"08031940@email.com\",\n    \"street\": \"my street\",\n    \"number\": \"1234\",\n    \"postal_code\": \"000-0000\",\n    \"city\": \"Brussels\",\n    \"country\": \"Belgium\"\n  },\n  \"procurement_contact\": {\n    \"id\": \"525040083670002\",\n    \"first_name\": \"My Procurement\",\n    \"last_name\": \"Contact\",\n    \"phone\": \"000-0000\",\n    \"email\": \"email@email.com\"\n  },\n  \"supplier_contact\": {\n    \"id\": \"625040593600008\",\n    \"first_name\": \"My Supplier\",\n    \"last_name\": \"Contact\",\n    \"phone\": \"000-0000\",\n    \"email\": \"email@email.com\",\n    \"street\": \"my street\",\n    \"number\": \"1234\",\n    \"postal_code\": \"000-0000\",\n    \"city\": \"Brussels\",\n    \"country\": \"Belgium\"\n  },\n  \"suppliers\": [\n    {\n      \"id\": \"000000000000000\",\n      \"name\": \"My existing supplier 1\"\n    }\n  ],\n  \"ingredients\": [\n    {\n      \"id\": \"000000000000000\",\n      \"name\": \"My existing ingredient\",\n      \"short_name\": \"ing\",\n      \"name_translations\": {\n        \"nl\": \"Mijn bestaande ingrediënt\"\n      }\n    },\n    {\n      \"id\": \"000000000000000\",\n      \"name\": \"My indirect linked ingredient\",\n      \"short_name\": \"indirect ing\",\n      \"name_translations\": {\n        \"nl\": \"Mijn indirect gekoppelde ingrediënt\"\n      }\n    }\n  ],\n  \"recipes\": [\n    {\n      \"id\": \"000000000000000\",\n      \"name\": \"My existing recipe\",\n      \"name_translations\": {\n        \"nl\": \"Mijn bestaande recept\"\n      }\n    },\n    {\n      \"id\": \"000000000000000\",\n      \"name\": \"My indirect linked recipe\",\n      \"name_translations\": {\n        \"nl\": \"Mijn indirect gelinkte recept\"\n      }\n    }\n  ],\n  \"menus\": [\n    {\n      \"id\": \"000000000000000\",\n      \"name\": \"My existing menu 1\"\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/outlets/000000000000000/"},"name":{"type":"string","example":"My outlet"},"external_name":{"type":"string","example":"My outlet external name"},"description":{"type":"string","example":"My outlet description"},"timezone":{"type":"string","example":"Europe/Brussels"},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"225040863690007"},"url":{"type":"string","example":"http://apicdev.com:8000/api/v1/contact/225040863690007/"},"company_name":{"type":"string","example":"My Supplier"},"first_name":{"type":"string","example":"My"},"last_name":{"type":"string","example":"Supplier"},"avatar":{"type":"string","example":"https://production-apicvault-static.s3.amazonaws.com/apicbase/images/avatar.png"},"telephone":{"type":"string","example":"000-0000"},"mobile":{"type":"string","example":"000-0000"},"email":{"type":"string","example":"email@email.com"},"website":{"type":"string","example":"https://www.website.com"},"facebook_url":{"type":"string","example":"https://www.facebook.com/my-supplier"},"twitter_url":{"type":"string","example":"https://www.twitter.com/my-supplier"},"instagram_url":{"type":"string","example":"https://www.instagram.com/my-supplier"},"linkedin_url":{"type":"string","example":"https://www.linkedin.com/my-supplier"},"street":{"type":"string","example":"my street"},"number":{"type":"string","example":"1234"},"postal_code":{"type":"string","example":"000-0000"},"city":{"type":"string","example":"Brussels"},"country":{"type":"string","example":"Belgium"},"internal_supplier_id":{"type":"string","example":"000000000000000"}}},"billing_contact":{"type":"object","properties":{"id":{"type":"string","example":"725040573610007"},"first_name":{"type":"string","example":"supplier contact 08031940"},"last_name":{"type":"string","example":"supplier last 08031940"},"phone":{"type":"string","example":"08031940"},"email":{"type":"string","example":"08031940@email.com"},"street":{"type":"string","example":"my street"},"number":{"type":"string","example":"1234"},"postal_code":{"type":"string","example":"000-0000"},"city":{"type":"string","example":"Brussels"},"country":{"type":"string","example":"Belgium"}}},"procurement_contact":{"type":"object","properties":{"id":{"type":"string","example":"525040083670002"},"first_name":{"type":"string","example":"My Procurement"},"last_name":{"type":"string","example":"Contact"},"phone":{"type":"string","example":"000-0000"},"email":{"type":"string","example":"email@email.com"}}},"supplier_contact":{"type":"object","properties":{"id":{"type":"string","example":"625040593600008"},"first_name":{"type":"string","example":"My Supplier"},"last_name":{"type":"string","example":"Contact"},"phone":{"type":"string","example":"000-0000"},"email":{"type":"string","example":"email@email.com"},"street":{"type":"string","example":"my street"},"number":{"type":"string","example":"1234"},"postal_code":{"type":"string","example":"000-0000"},"city":{"type":"string","example":"Brussels"},"country":{"type":"string","example":"Belgium"}}},"suppliers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"My existing supplier 1"}}}},"ingredients":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"My existing ingredient"},"short_name":{"type":"string","example":"ing"},"name_translations":{"type":"object","properties":{"nl":{"type":"string","example":"Mijn bestaande ingrediënt"}}}}}},"recipes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"My existing recipe"},"name_translations":{"type":"object","properties":{"nl":{"type":"string","example":"Mijn bestaande recept"}}}}}},"menus":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"My existing menu 1"}}}}}}}}}},"deprecated":false}},"/products/ecolabels/":{"get":{"summary":"Get Eco Labels","description":"","operationId":"get-eco-labels","responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"[\n  {\n    \"id\": \"4c-association\",\n    \"name\": \"4C Association\"\n  },\n  {\n    \"id\": \"ab-agriculture-biologique\",\n    \"name\": \"AB (Agriculture Biologique)\"\n  },\n  {\n    \"id\": \"abio\",\n    \"name\": \"ABIO\"\n  },\n  {\n    \"id\": \"aenor-medio-ambiente\",\n    \"name\": \"AENOR Medio Ambiente\"\n  },\n  {\n    \"id\": \"afor-compost-certified\",\n    \"name\": \"AfOR Compost Certified\"\n  },\n  {\n    \"id\": \"afrisco-certified-organic\",\n    \"name\": \"Afrisco Certified Organic\"\n  },\n  {\n    \"id\": \"aiab-italian-association-for-organic-agriculture\",\n    \"name\": \"AIAB (Italian Association for Organic Agriculture)\"\n  },\n  {\n    \"id\": \"ama-biozeichen\",\n    \"name\": \"AMA Biozeichen\"\n  },\n  {\n    \"id\": \"american-grassfed\",\n    \"name\": \"American Grassfed\"\n  },\n  {\n    \"id\": \"animal-welfare-approved\",\n    \"name\": \"Animal Welfare Approved\"\n  },\n  {\n    \"id\": \"aquaculture-stewardship-council\",\n    \"name\": \"Aquaculture Stewardship Council\"\n  },\n  {\n    \"id\": \"asurequality-organic-standard\",\n    \"name\": \"AsureQuality Organic Standard\"\n  },\n  {\n    \"id\": \"australian-certified-organic\",\n    \"name\": \"Australian Certified Organic\"\n  },\n  {\n    \"id\": \"avogreen\",\n    \"name\": \"AvoGreen®\"\n  },\n  {\n    \"id\": \"b-corporation\",\n    \"name\": \"B Corporation\"\n  },\n  {\n    \"id\": \"best-aquaculture-practices\",\n    \"name\": \"Best Aquaculture Practices\"\n  },\n  {\n    \"id\": \"biodar\",\n    \"name\": \"BIODAR\"\n  },\n  {\n    \"id\": \"bioforum-biogarantie-and-ecogarantie\",\n    \"name\": \"BioForum Biogarantie and Ecogarantie\"\n  },\n  {\n    \"id\": \"biogro-new-zealand\",\n    \"name\": \"BioGro New Zealand\"\n  },\n  {\n    \"id\": \"bio-hellas\",\n    \"name\": \"BIO Hellas\"\n  },\n  {\n    \"id\": \"bio-hotels\",\n    \"name\": \"BIO Hotels\"\n  },\n  {\n    \"id\": \"biokreis\",\n    \"name\": \"Biokreis\"\n  },\n  {\n    \"id\": \"bioland\",\n    \"name\": \"Bioland\"\n  },\n  {\n    \"id\": \"bio-quebec\",\n    \"name\": \"Bio Quebec\"\n  },\n  {\n    \"id\": \"bio-siegel\",\n    \"name\": \"Bio-Siegel\"\n  },\n  {\n    \"id\": \"bio-suisse\",\n    \"name\": \"Bio Suisse\"\n  },\n  {\n    \"id\": \"bird-friendly-coffee\",\n    \"name\": \"Bird Friendly Coffee\"\n  },\n  {\n    \"id\": \"bonsucro\",\n    \"name\": \"Bonsucro\"\n  },\n  {\n    \"id\": \"british-columbia-certified-organic\",\n    \"name\": \"British Columbia Certified Organic\"\n  },\n  {\n    \"id\": \"cafe-practices\",\n    \"name\": \"C.A.F.E. Practices\"\n  },\n  {\n    \"id\": \"california-certified-organic-farmers-ccof\",\n    \"name\": \"California Certified Organic Farmers - CCOF\"\n  },\n  {\n    \"id\": \"canada-organic\",\n    \"name\": \"Canada Organic\"\n  },\n  {\n    \"id\": \"carboncare\",\n    \"name\": \"CarbonCare\"\n  },\n  {\n    \"id\": \"carbonfree-certified\",\n    \"name\": \"CarbonFree® Certified\"\n  },\n  {\n    \"id\": \"carbon-neutral-certification\",\n    \"name\": \"Carbon Neutral Certification\"\n  },\n  {\n    \"id\": \"carbon-neutral-product-certification\",\n    \"name\": \"Carbon Neutral Product Certification\"\n  },\n  {\n    \"id\": \"carbon-reduction-label\",\n    \"name\": \"Carbon Reduction Label\"\n  },\n  {\n    \"id\": \"carrefour-eco-planete\",\n    \"name\": \"Carrefour Eco-Planete\"\n  },\n  {\n    \"id\": \"certified-australian-southern-rocklobster-cleangreen-program\",\n    \"name\": \"Certified Australian Southern Rocklobster \\\"CleanGreen\\\" Program\"\n  },\n  {\n    \"id\": \"certified-green-restaurant\",\n    \"name\": \"Certified Green Restaurant®\"\n  },\n  {\n    \"id\": \"certified-humane-raised-and-handled\",\n    \"name\": \"Certified Humane Raised and Handled\"\n  },\n  {\n    \"id\": \"certified-naturally-grown\",\n    \"name\": \"Certified Naturally Grown\"\n  },\n  {\n    \"id\": \"certified-pesticide-residue-free\",\n    \"name\": \"Certified Pesticide Residue Free\"\n  },\n  {\n    \"id\": \"certified-vegan\",\n    \"name\": \"Certified Vegan\"\n  },\n  {\n    \"id\": \"certified-wildlife-friendly\",\n    \"name\": \"Certified Wildlife Friendly®\"\n  },\n  {\n    \"id\": \"chao-vivo\",\n    \"name\": \"Chão Vivo\"\n  },\n  {\n    \"id\": \"china-organic-food-certification\",\n    \"name\": \"China Organic Food Certification\"\n  },\n  {\n    \"id\": \"climatop\",\n    \"name\": \"Climatop\"\n  },\n  {\n    \"id\": \"danish-mark\",\n    \"name\": \"Danish Ø-mark\"\n  },\n  {\n    \"id\": \"delinat-bio-garantie\",\n    \"name\": \"Delinat Bio Garantie\"\n  },\n  {\n    \"id\": \"demeter-biodynamic\",\n    \"name\": \"Demeter Biodynamic®\"\n  },\n  {\n    \"id\": \"deutsches-guteband-wein-dlg\",\n    \"name\": \"Deutsches Güteband Wein (DLG)\"\n  },\n  {\n    \"id\": \"dolphin-safe-dolphin-friendly\",\n    \"name\": \"Dolphin Safe / Dolphin Friendly\"\n  },\n  {\n    \"id\": \"earthsure\",\n    \"name\": \"Earthsure\"\n  },\n  {\n    \"id\": \"ecocert\",\n    \"name\": \"Ecocert\"\n  },\n  {\n    \"id\": \"eco-leaf\",\n    \"name\": \"Eco-Leaf\"\n  },\n  {\n    \"id\": \"ecomark-africa\",\n    \"name\": \"EcoMark Africa\"\n  },\n  {\n    \"id\": \"ecomark-india\",\n    \"name\": \"Ecomark: India\"\n  },\n  {\n    \"id\": \"environmental-product-declaration\",\n    \"name\": \"Environmental Product Declaration\"\n  },\n  {\n    \"id\": \"equitrade\",\n    \"name\": \"EQUITRADE\"\n  },\n  {\n    \"id\": \"estonian-organic-farming\",\n    \"name\": \"Estonian Organic Farming\"\n  },\n  {\n    \"id\": \"eu-organic-products-label\",\n    \"name\": \"EU organic products label\"\n  },\n  {\n    \"id\": \"fair-for-life\",\n    \"name\": \"Fair for Life\"\n  },\n  {\n    \"id\": \"fair-labor-practices-and-community-benefits\",\n    \"name\": \"Fair Labor Practices and Community Benefits\"\n  },\n  {\n    \"id\": \"fairtrade\",\n    \"name\": \"Fairtrade\"\n  },\n  {\n    \"id\": \"fair-trade-certified\",\n    \"name\": \"Fair Trade Certified\"\n  },\n  {\n    \"id\": \"fair-trade-organization-mark\",\n    \"name\": \"Fair Trade Organization Mark\"\n  },\n  {\n    \"id\": \"fairwild\",\n    \"name\": \"FairWild\"\n  },\n  {\n    \"id\": \"farm-and-ranch-certification-program\",\n    \"name\": \"Farm and Ranch Certification Program\"\n  },\n  {\n    \"id\": \"farm-verified-organic\",\n    \"name\": \"Farm Verified Organic\"\n  },\n  {\n    \"id\": \"food-alliance-certified\",\n    \"name\": \"Food Alliance Certified\"\n  },\n  {\n    \"id\": \"friend-of-the-sea\",\n    \"name\": \"Friend of the Sea\"\n  },\n  {\n    \"id\": \"global-good-agricultural-practice-gap\",\n    \"name\": \"Global Good Agricultural Practice (GAP)\"\n  },\n  {\n    \"id\": \"good-shopping-guide-ethical-award\",\n    \"name\": \"Good Shopping Guide Ethical Award\"\n  },\n  {\n    \"id\": \"green-americas-green-business-certification\",\n    \"name\": \"Green America's Green Business Certification\"\n  },\n  {\n    \"id\": \"green-crane-ukraine\",\n    \"name\": \"Green Crane: Ukraine\"\n  },\n  {\n    \"id\": \"green-good-housekeeping-seal\",\n    \"name\": \"Green Good Housekeeping Seal\"\n  },\n  {\n    \"id\": \"green-seal\",\n    \"name\": \"Green Seal\"\n  },\n  {\n    \"id\": \"green-table\",\n    \"name\": \"Green Table\"\n  },\n  {\n    \"id\": \"green-tick\",\n    \"name\": \"Green Tick\"\n  },\n  {\n    \"id\": \"hand-in-hand\",\n    \"name\": \"HAND IN HAND\"\n  },\n  {\n    \"id\": \"healthy-child-healthy-world\",\n    \"name\": \"Healthy Child Healthy World\"\n  },\n  {\n    \"id\": \"imo-certified\",\n    \"name\": \"IMO Certified\"\n  },\n  {\n    \"id\": \"india-organic-national-programme-for-organic-production-npop\",\n    \"name\": \"India Organic - National Programme for Organic Production (NPOP)\"\n  },\n  {\n    \"id\": \"japanese-agricultural-organic-standard-jas\",\n    \"name\": \"Japanese Agricultural Organic Standard (JAS)\"\n  },\n  {\n    \"id\": \"krav\",\n    \"name\": \"Krav\"\n  },\n  {\n    \"id\": \"lao-organic\",\n    \"name\": \"Lao Organic\"\n  },\n  {\n    \"id\": \"leaf\",\n    \"name\": \"LEAF\"\n  },\n  {\n    \"id\": \"leaf-marque\",\n    \"name\": \"LEAF Marque\"\n  },\n  {\n    \"id\": \"lfp-certified\",\n    \"name\": \"LFP Certified\"\n  },\n  {\n    \"id\": \"live-low-input-viticulture-and-enology\",\n    \"name\": \"LIVE (Low Input Viticulture and Enology)\"\n  },\n  {\n    \"id\": \"lowco2-certification\",\n    \"name\": \"LowCO2 Certification\"\n  },\n  {\n    \"id\": \"luomuliitto-the-ladybird-label\",\n    \"name\": \"Luomuliitto - The Ladybird label\"\n  },\n  {\n    \"id\": \"luomu-sun-sign\",\n    \"name\": \"Luomu Sun Sign\"\n  },\n  {\n    \"id\": \"marine-stewardship-council\",\n    \"name\": \"Marine Stewardship Council\"\n  },\n  {\n    \"id\": \"max-havelaar\",\n    \"name\": \"Max Havelaar\"\n  },\n  {\n    \"id\": \"m-brio-organic-and-food-labeling\",\n    \"name\": \"M-BRIO Organic and Food Labeling\"\n  },\n  {\n    \"id\": \"milieukeur-the-dutch-environmental-quality-label\",\n    \"name\": \"Milieukeur: the Dutch environmental quality label\"\n  },\n  {\n    \"id\": \"natures-promise\",\n    \"name\": \"Nature's Promise\"\n  },\n  {\n    \"id\": \"naturland-ev\",\n    \"name\": \"Naturland e.V.\"\n  },\n  {\n    \"id\": \"neuland\",\n    \"name\": \"Neuland\"\n  },\n  {\n    \"id\": \"non-gmo\",\n    \"name\": \"Non-GMO\"\n  },\n  {\n    \"id\": \"nordic-ecolabel-or-swan\",\n    \"name\": \"Nordic Ecolabel or \\\"Swan\\\"\"\n  },\n  {\n    \"id\": \"ocean-wise\",\n    \"name\": \"Ocean Wise\"\n  },\n  {\n    \"id\": \"label-norway\",\n    \"name\": \"Ø-label: Norway\"\n  },\n  {\n    \"id\": \"orc-cert-organic-seal\",\n    \"name\": \"ORC-Cert Organic Seal\"\n  },\n  {\n    \"id\": \"oregon-tilth\",\n    \"name\": \"Oregon Tilth\"\n  },\n  {\n    \"id\": \"organic-farmers-growers-certification\",\n    \"name\": \"Organic Farmers & Growers Certification\"\n  },\n  {\n    \"id\": \"organic-food-china\",\n    \"name\": \"Organic Food China\"\n  },\n  {\n    \"id\": \"organic-food-federation\",\n    \"name\": \"Organic Food Federation\"\n  },\n  {\n    \"id\": \"preservando-el-medio-ambiente-preserving-the-environment\",\n    \"name\": \"Preservando El Medio Ambiente (Preserving the Environment)\"\n  },\n  {\n    \"id\": \"processed-chlorine-free\",\n    \"name\": \"Processed Chlorine Free\"\n  },\n  {\n    \"id\": \"protected-harvest\",\n    \"name\": \"Protected Harvest\"\n  },\n  {\n    \"id\": \"qcs-organic\",\n    \"name\": \"QCS Organic\"\n  },\n  {\n    \"id\": \"rainforest-alliance-certified\",\n    \"name\": \"Rainforest Alliance Certified\"\n  },\n  {\n    \"id\": \"rhode-island-certified-organic\",\n    \"name\": \"Rhode Island Certified Organic\"\n  },\n  {\n    \"id\": \"rspo-certified-sustainable-palm-oil\",\n    \"name\": \"RSPO Certified Sustainable Palm Oil\"\n  },\n  {\n    \"id\": \"rtrs-certified-soy\",\n    \"name\": \"RTRS Certified Soy\"\n  },\n  {\n    \"id\": \"safe-agri-food-product\",\n    \"name\": \"Safe Agri-Food Product\"\n  },\n  {\n    \"id\": \"salmon-safe\",\n    \"name\": \"Salmon-Safe\"\n  },\n  {\n    \"id\": \"seachoice\",\n    \"name\": \"SeaChoice\"\n  },\n  {\n    \"id\": \"seafood-safe\",\n    \"name\": \"Seafood Safe\"\n  },\n  {\n    \"id\": \"see-what-you-are-buying-into\",\n    \"name\": \"SEE What You Are Buying Into\"\n  },\n  {\n    \"id\": \"singapore-green-label-scheme-sgls\",\n    \"name\": \"Singapore Green Label Scheme (SGLS)\"\n  },\n  {\n    \"id\": \"sip-certified\",\n    \"name\": \"SIP Certified\"\n  },\n  {\n    \"id\": \"skal-eko-symbol\",\n    \"name\": \"Skal Eko Symbol\"\n  },\n  {\n    \"id\": \"smart-consensus-sustainable-product-standards\",\n    \"name\": \"SMaRT Consensus Sustainable Product Standards\"\n  },\n  {\n    \"id\": \"soil-association-organic-standard\",\n    \"name\": \"Soil Association Organic Standard\"\n  },\n  {\n    \"id\": \"sourcemap\",\n    \"name\": \"Sourcemap\"\n  },\n  {\n    \"id\": \"state-of-utah-organic-certification-program\",\n    \"name\": \"State of Utah Organic Certification Program\"\n  },\n  {\n    \"id\": \"stemilt-responsible-choice\",\n    \"name\": \"Stemilt Responsible Choice\"\n  },\n  {\n    \"id\": \"sustainable-agricultural-network\",\n    \"name\": \"Sustainable Agricultural Network\"\n  },\n  {\n    \"id\": \"sustainable-winegrowing-new-zealand\",\n    \"name\": \"Sustainable Winegrowing New Zealand\"\n  },\n  {\n    \"id\": \"terracycle\",\n    \"name\": \"TerraCycle\"\n  },\n  {\n    \"id\": \"texas-certified-organically-produced\",\n    \"name\": \"Texas Certified Organically Produced\"\n  },\n  {\n    \"id\": \"totally-chlorine-free\",\n    \"name\": \"Totally Chlorine Free\"\n  },\n  {\n    \"id\": \"tunisia-ecolabel\",\n    \"name\": \"Tunisia Ecolabel\"\n  },\n  {\n    \"id\": \"usda-certified-biobased\",\n    \"name\": \"USDA Certified BioBased\"\n  },\n  {\n    \"id\": \"usda-organic\",\n    \"name\": \"USDA Organic\"\n  },\n  {\n    \"id\": \"utz-certified\",\n    \"name\": \"UTZ Certified\"\n  },\n  {\n    \"id\": \"vermont-organic-certified\",\n    \"name\": \"Vermont Organic Certified\"\n  },\n  {\n    \"id\": \"vitality-leaf\",\n    \"name\": \"Vitality Leaf\"\n  },\n  {\n    \"id\": \"wholesome-food-association\",\n    \"name\": \"Wholesome Food Association\"\n  },\n  {\n    \"id\": \"whole-tradetm-guarantee\",\n    \"name\": \"Whole Trade™ Guarantee\"\n  },\n  {\n    \"id\": \"windmade\",\n    \"name\": \"WindMade\"\n  },\n  {\n    \"id\": \"wsda-organic\",\n    \"name\": \"WSDA Organic\"\n  },\n  {\n    \"id\": \"zq-natural-fibre\",\n    \"name\": \"ZQ Natural Fibre\"\n  }\n]"}},"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"4c-association"},"name":{"type":"string","example":"4C Association"}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/recipes/ingredients/swap/":{"put":{"summary":"Swap ingredients in recipes","description":"","operationId":"swap-ingredients-in-recipes","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["old_ingredient_id","new_ingredient_id"],"properties":{"old_ingredient_id":{"type":"integer","description":"The ID of the ingredient to be replaced","default":0,"format":"int32"},"new_ingredient_id":{"type":"integer","description":"The ID of the ingredient that will replace the original one","default":0,"format":"int32"},"recipes":{"type":"array","description":"The IDs of the recipes that contain the ingredient to be replaced.","default":[null],"items":{"type":"integer","format":"int32"}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \told_ingredient: {pk: 1, name: 'Tomato'},\n    new_ingredient: {pk: 2, name: 'Cherry Tomato'},\n      recipes: [\n        {pk: 10, name: 'Pasta with Tomato Sauce'},\n        {pk: 20, name: 'Tomato Soup'}\n      ]\n}"}}}}}},"deprecated":false,"x-readme":{"samples-languages":["shell"]}}},"/menu_planning/menu_cycle_schedule/":{"post":{"summary":"Create Menu Cycle Schedule","description":"Creates a new instance of a menu cycle schedule.","operationId":"create-menu-cycle-schedule","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","start_date","duration_in_weeks","number_of_cycles","outlets","courses"],"properties":{"name":{"type":"string","description":"The name of the menu cycle schedule. The max length is 100 characters."},"start_date":{"type":"string","description":"The start date of the menu cycle schedule.","format":"date"},"duration_in_weeks":{"type":"integer","description":"The duration of the menu cycle schedule in weeks. Must be between 1 and 15.","format":"int32"},"number_of_cycles":{"type":"integer","description":"The number of cycles in the menu cycle schedule. Must be between 1 and 100. It's required if `end_date` is not provided.","format":"int32"},"end_date":{"type":"string","description":"The end date of the menu cycle schedule. It's required if `number_of_cycles` is not provided.","format":"date"},"repeat_every_in_weeks":{"type":"integer","description":"The number of weeks between each cycle start date. If not provided, each cycle will start after the end of the previous cycle. Must be between 1 and 16.","format":"int32"},"status":{"type":"string","description":"The status of the menu cycle schedule","default":"Draft","enum":["Live","Draft","Inactive","Archived"]},"description":{"type":"string","description":"The description of the menu cycle schedule. The max length is 255 characters."},"outlets":{"type":"array","description":"A list of outlet IDs to be linked to the menu cycle schedule.","items":{"type":"string"}},"courses":{"type":"array","description":"The courses and planned recipes of the menu cycle schedule.","items":{"properties":{"index":{"type":"integer","format":"int32"},"name":{"type":"string","description":"The name of the course. It is required only if you are creating the course."},"planned_recipes":{"type":"object","description":"An object where each key is a week number (starting from 0) and each value is an object with weekday names as keys, containing arrays of planned recipes for that day.","properties":{"0":{"type":"object","description":"Week 0 (first week). Additional weeks can be added using keys \"1\", \"2\", etc.","properties":{"Monday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","description":"The recipe ID."},"quantity_of_portions":{"type":"number","description":"The quantity of portions for this recipe.","nullable":true},"index":{"type":"integer","minimum":0,"nullable":true,"description":"The position of the recipe within its group (week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0. If not provided, the backend will auto-calculate the next available index."}}}},"Tuesday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","description":"The recipe ID."},"quantity_of_portions":{"type":"number","description":"The quantity of portions for this recipe.","nullable":true},"index":{"type":"integer","minimum":0,"nullable":true,"description":"The position of the recipe within its group (week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0. If not provided, the backend will auto-calculate the next available index."}}}},"Wednesday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","description":"The recipe ID."},"quantity_of_portions":{"type":"number","description":"The quantity of portions for this recipe.","nullable":true},"index":{"type":"integer","minimum":0,"nullable":true,"description":"The position of the recipe within its group (week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0. If not provided, the backend will auto-calculate the next available index."}}}},"Thursday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","description":"The recipe ID."},"quantity_of_portions":{"type":"number","description":"The quantity of portions for this recipe.","nullable":true},"index":{"type":"integer","minimum":0,"nullable":true,"description":"The position of the recipe within its group (week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0. If not provided, the backend will auto-calculate the next available index."}}}},"Friday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","description":"The recipe ID."},"quantity_of_portions":{"type":"number","description":"The quantity of portions for this recipe.","nullable":true},"index":{"type":"integer","minimum":0,"nullable":true,"description":"The position of the recipe within its group (week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0. If not provided, the backend will auto-calculate the next available index."}}}},"Saturday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","description":"The recipe ID."},"quantity_of_portions":{"type":"number","description":"The quantity of portions for this recipe.","nullable":true},"index":{"type":"integer","minimum":0,"nullable":true,"description":"The position of the recipe within its group (week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0. If not provided, the backend will auto-calculate the next available index."}}}},"Sunday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","description":"The recipe ID."},"quantity_of_portions":{"type":"number","description":"The quantity of portions for this recipe.","nullable":true},"index":{"type":"integer","minimum":0,"nullable":true,"description":"The position of the recipe within its group (week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0. If not provided, the backend will auto-calculate the next available index."}}}}}}},"additionalProperties":{"type":"object","description":"Additional weeks (keys should be \"1\", \"2\", etc.)","properties":{"Monday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string"},"quantity_of_portions":{"type":"number","nullable":true},"index":{"type":"integer","nullable":true}}}},"Tuesday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string"},"quantity_of_portions":{"type":"number","nullable":true},"index":{"type":"integer","nullable":true}}}},"Wednesday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string"},"quantity_of_portions":{"type":"number","nullable":true},"index":{"type":"integer","nullable":true}}}},"Thursday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string"},"quantity_of_portions":{"type":"number","nullable":true},"index":{"type":"integer","nullable":true}}}},"Friday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string"},"quantity_of_portions":{"type":"number","nullable":true},"index":{"type":"integer","nullable":true}}}},"Saturday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string"},"quantity_of_portions":{"type":"number","nullable":true},"index":{"type":"integer","nullable":true}}}},"Sunday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string"},"quantity_of_portions":{"type":"number","nullable":true},"index":{"type":"integer","nullable":true}}}}}}},"id":{"type":"string","description":"The ID of the course. It is required if you are updating the course."}},"required":["index","name"],"type":"object"}},"custom_fields":{"type":"string","format":"json"}}},"examples":{"Request Example":{"value":{"name":"My Menu Cycle Schedule","start_date":"2024-01-01","number_of_cycles":2,"duration_in_weeks":3,"repeat_every_in_weeks":4,"status":"Draft","description":"This is a sample menu cycle schedule.","custom_fields":{"My Custom Field Multi":["value 1","value 2"],"My Custom Field Single":"value","My Custom Field Text":"value"},"outlets":["000000000000000","111111111111111"],"courses":[{"index":0,"name":"My Course 1","planned_recipes":{"0":{"Monday":[{"recipe":"000000000000000","quantity_of_portions":1,"index":0}],"Tuesday":[{"recipe":"111111111111111","quantity_of_portions":1.5,"index":0}],"Wednesday":[{"recipe":"222222222222222","quantity_of_portions":3.2,"index":0}],"Thursday":[{"recipe":"333333333333333","quantity_of_portions":null,"index":0}],"Friday":[{"recipe":"444444444444444","quantity_of_portions":2.5,"index":0}],"Saturday":[{"recipe":"555555555555555","quantity_of_portions":2,"index":0}],"Sunday":[{"recipe":"666666666666666","quantity_of_portions":4.5,"index":0}]}}}]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"id":"010101010101010","name":"My Menu Cycle Schedule","start_date":"2024-01-01","end_date":"2024-02-18","number_of_cycles":2,"duration_in_weeks":3,"repeat_every_in_weeks":4,"status":"Draft","description":"This is a sample menu cycle schedule.","outlets":[{"id":"000000000000000","name":"outlet-0"},{"id":"111111111111111","name":"outlet-1"}],"outlet_specific":false,"courses_quantity":1,"planned_recipes_quantity":7,"created_at":"2024-01-01T00:00:00.000000+00:00","updated_at":"2024-01-01T00:00:00.000000+00:00","created_by":{"id":"0909090909090909090","email":"johndoe@email.com","full_name":"John Doe"},"last_modified_by":{"id":"0909090909090909090","email":"johndoe@email.com","full_name":"John Doe"},"instances":[{"id":"040404040404040","index":0,"start_date":"2024-01-01","end_date":"2024-01-21","courses":[{"id":"020202020202020","name":"My Course 1","index":0}]},{"id":"050505050505050","index":1,"start_date":"2024-01-29","end_date":"2024-02-18","courses":[{"id":"020202020202020","name":"My Course 1","index":0}]}],"custom_fields":{"My Custom Field Multi":["value 1","value 2"],"My Custom Field Single":"value","My Custom Field Text":"value"},"courses":[{"id":"020202020202020","name":"My Course 1","index":0,"planned_recipes":{"0":{"Monday":[{"recipe":{"id":"000000000000000","name":"recipe-0"},"quantity_of_portions":1,"id":"000000000000000","index":0}],"Tuesday":[{"recipe":{"id":"111111111111111","name":"recipe-1"},"quantity_of_portions":1.5,"id":"000000000000000","index":0}],"Wednesday":[{"recipe":{"id":"222222222222222","name":"recipe-2"},"quantity_of_portions":3.2,"id":"000000000000000","index":0}],"Thursday":[{"recipe":{"id":"333333333333333","name":"recipe-3"},"quantity_of_portions":null,"id":"000000000000000","index":0}],"Friday":[{"recipe":{"id":"444444444444444","name":"recipe-4"},"quantity_of_portions":2.5,"id":"000000000000000","index":0}],"Saturday":[{"recipe":{"id":"555555555555555","name":"recipe-5"},"quantity_of_portions":2,"id":"000000000000000","index":0}],"Sunday":[{"recipe":{"id":"666666666666666","name":"recipe-6"},"quantity_of_portions":4.5,"id":"000000000000000","index":0}]}}}]}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"010101010101010"},"name":{"type":"string","example":"My Menu Cycle Schedule"},"start_date":{"type":"string","example":"2024-01-01"},"end_date":{"type":"string","example":"2024-02-18"},"number_of_cycles":{"type":"integer","example":2,"default":0},"duration_in_weeks":{"type":"integer","example":3,"default":0},"repeat_every_in_weeks":{"type":"integer","example":4,"default":0},"status":{"type":"string","example":"Draft"},"description":{"type":"string","example":"This is a sample menu cycle schedule."},"outlets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"outlet-0"}}}},"outlet_specific":{"type":"boolean","example":false,"default":true},"courses_quantity":{"type":"integer","example":1,"default":0},"planned_recipes_quantity":{"type":"integer","example":7,"default":0},"created_at":{"type":"string","example":"2024-01-01T00:00:00.000000+00:00"},"updated_at":{"type":"string","example":"2024-01-01T00:00:00.000000+00:00"},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"0909090909090909090"},"email":{"type":"string","example":"johndoe@email.com"},"full_name":{"type":"string","example":"John Doe"}}},"last_modified_by":{"type":"object","properties":{"id":{"type":"string","example":"0909090909090909090"},"email":{"type":"string","example":"johndoe@email.com"},"full_name":{"type":"string","example":"John Doe"}}},"instances":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"040404040404040"},"index":{"type":"integer","example":0,"default":0},"start_date":{"type":"string","example":"2024-01-01"},"end_date":{"type":"string","example":"2024-01-21"},"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"020202020202020"},"name":{"type":"string","example":"My Course 1"},"index":{"type":"integer","example":0,"default":0}}}}}}},"custom_fields":{"type":"object","properties":{"My Custom Field Multi":{"type":"array","items":{"type":"string","example":"value 1"}},"My Custom Field Single":{"type":"string","example":"value"},"My Custom Field Text":{"type":"string","example":"value"}}},"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"020202020202020"},"name":{"type":"string","example":"My Course 1"},"index":{"type":"integer","example":0,"default":0},"planned_recipes":{"type":"object","properties":{"0":{"type":"object","properties":{"Monday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"recipe-0"}}},"quantity_of_portions":{"type":"integer","example":1,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Tuesday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"111111111111111"},"name":{"type":"string","example":"recipe-1"}}},"quantity_of_portions":{"type":"number","example":1.5,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Wednesday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"222222222222222"},"name":{"type":"string","example":"recipe-2"}}},"quantity_of_portions":{"type":"number","example":3.2,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Thursday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"333333333333333"},"name":{"type":"string","example":"recipe-3"}}},"quantity_of_portions":{},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Friday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"444444444444444"},"name":{"type":"string","example":"recipe-4"}}},"quantity_of_portions":{"type":"number","example":2.5,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Saturday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"555555555555555"},"name":{"type":"string","example":"recipe-5"}}},"quantity_of_portions":{"type":"integer","example":2,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Sunday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"666666666666666"},"name":{"type":"string","example":"recipe-6"}}},"quantity_of_portions":{"type":"number","example":4.5,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}}}}}}}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":{}}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/menu_planning/menu_cycle_schedule/{menu_cycle_schedule_id}/":{"get":{"summary":"Get Menu Cycle Schedule Details","description":"Returns details about a specific schedule.","operationId":"get-menu-cycle-schedule-details","parameters":[{"name":"menu_cycle_schedule_id","in":"path","description":"A Menu Cycle Schedule's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"id":"010101010101010","name":"My Menu Cycle Schedule","start_date":"2024-01-01","end_date":"2024-02-18","number_of_cycles":2,"duration_in_weeks":3,"repeat_every_in_weeks":4,"status":"Draft","description":"This is a sample menu cycle schedule.","outlets":[{"id":"000000000000000","name":"outlet-0"},{"id":"111111111111111","name":"outlet-1"}],"outlet_specific":false,"courses_quantity":1,"planned_recipes_quantity":7,"created_at":"2024-01-01T00:00:00.000000+00:00","updated_at":"2024-01-01T00:00:00.000000+00:00","created_by":{"id":"0909090909090909090","email":"johndoe@email.com","full_name":"John Doe"},"last_modified_by":{"id":"0909090909090909090","email":"johndoe@email.com","full_name":"John Doe"},"instances":[{"id":"040404040404040","index":0,"start_date":"2024-01-01","end_date":"2024-01-21","courses":[{"id":"020202020202020","name":"My Course 1","index":0}]},{"id":"050505050505050","index":1,"start_date":"2024-01-29","end_date":"2024-02-18","courses":[{"id":"020202020202020","name":"My Course 1","index":0}]}],"custom_fields":{"My Custom Field Multi":["value 1","value 2"],"My Custom Field Single":"value","My Custom Field Text":"value"},"courses":[{"id":"020202020202020","name":"My Course 1","index":0,"planned_recipes":{"0":{"Monday":[{"recipe":{"id":"000000000000000","name":"recipe-0"},"quantity_of_portions":1,"id":"000000000000000","index":0}],"Tuesday":[{"recipe":{"id":"111111111111111","name":"recipe-1"},"quantity_of_portions":1.5,"id":"000000000000000","index":0}],"Wednesday":[{"recipe":{"id":"222222222222222","name":"recipe-2"},"quantity_of_portions":3.2,"id":"000000000000000","index":0}],"Thursday":[{"recipe":{"id":"333333333333333","name":"recipe-3"},"quantity_of_portions":null,"id":"000000000000000","index":0}],"Friday":[{"recipe":{"id":"444444444444444","name":"recipe-4"},"quantity_of_portions":2.5,"id":"000000000000000","index":0}],"Saturday":[{"recipe":{"id":"555555555555555","name":"recipe-5"},"quantity_of_portions":2,"id":"000000000000000","index":0}],"Sunday":[{"recipe":{"id":"666666666666666","name":"recipe-6"},"quantity_of_portions":4.5,"id":"000000000000000","index":0}]}}}]}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"010101010101010"},"name":{"type":"string","example":"My Menu Cycle Schedule"},"start_date":{"type":"string","example":"2024-01-01"},"end_date":{"type":"string","example":"2024-02-18"},"number_of_cycles":{"type":"integer","example":2,"default":0},"duration_in_weeks":{"type":"integer","example":3,"default":0},"repeat_every_in_weeks":{"type":"integer","example":4,"default":0},"status":{"type":"string","example":"Draft"},"description":{"type":"string","example":"This is a sample menu cycle schedule."},"outlets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"outlet-0"}}}},"outlet_specific":{"type":"boolean","example":false,"default":true},"courses_quantity":{"type":"integer","example":1,"default":0},"planned_recipes_quantity":{"type":"integer","example":7,"default":0},"created_at":{"type":"string","example":"2024-01-01T00:00:00.000000+00:00"},"updated_at":{"type":"string","example":"2024-01-01T00:00:00.000000+00:00"},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"0909090909090909090"},"email":{"type":"string","example":"johndoe@email.com"},"full_name":{"type":"string","example":"John Doe"}}},"last_modified_by":{"type":"object","properties":{"id":{"type":"string","example":"0909090909090909090"},"email":{"type":"string","example":"johndoe@email.com"},"full_name":{"type":"string","example":"John Doe"}}},"instances":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"040404040404040"},"index":{"type":"integer","example":0,"default":0},"start_date":{"type":"string","example":"2024-01-01"},"end_date":{"type":"string","example":"2024-01-21"},"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"020202020202020"},"name":{"type":"string","example":"My Course 1"},"index":{"type":"integer","example":0,"default":0}}}}}}},"custom_fields":{"type":"object","properties":{"My Custom Field Multi":{"type":"array","items":{"type":"string","example":"value 1"}},"My Custom Field Single":{"type":"string","example":"value"},"My Custom Field Text":{"type":"string","example":"value"}}},"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"020202020202020"},"name":{"type":"string","example":"My Course 1"},"index":{"type":"integer","example":0,"default":0},"planned_recipes":{"type":"object","properties":{"0":{"type":"object","properties":{"Monday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"recipe-0"}}},"quantity_of_portions":{"type":"integer","example":1,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Tuesday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"111111111111111"},"name":{"type":"string","example":"recipe-1"}}},"quantity_of_portions":{"type":"number","example":1.5,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Wednesday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"222222222222222"},"name":{"type":"string","example":"recipe-2"}}},"quantity_of_portions":{"type":"number","example":3.2,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Thursday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"333333333333333"},"name":{"type":"string","example":"recipe-3"}}},"quantity_of_portions":{},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Friday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"444444444444444"},"name":{"type":"string","example":"recipe-4"}}},"quantity_of_portions":{"type":"number","example":2.5,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Saturday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"555555555555555"},"name":{"type":"string","example":"recipe-5"}}},"quantity_of_portions":{"type":"integer","example":2,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Sunday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"666666666666666"},"name":{"type":"string","example":"recipe-6"}}},"quantity_of_portions":{"type":"number","example":4.5,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}}}}}}}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":{}}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":{"message":"Resource not found"}}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false},"patch":{"summary":"Edit Menu Cycle Schedule","description":"Edits an existing menu cycle schedule.","operationId":"edit-menu-cycle-schedule","parameters":[{"name":"menu_cycle_schedule_id","in":"path","description":"A Menu Cycle Schedule's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the menu cycle schedule"},"start_date":{"type":"string","description":"The start date of the menu cycle schedule","format":"date"},"duration_in_weeks":{"type":"integer","description":"The duration of the menu cycle schedule in weeks. Must be between 1 and 15.","format":"int32"},"number_of_cycles":{"type":"integer","description":"The number of cycles in the menu cycle schedule. Must be between 1 and 100. It's required if `end_date` is not provided.","format":"int32"},"end_date":{"type":"string","description":"The end date of the menu cycle schedule. It's required if `number_of_cycles` is not provided.","format":"date"},"repeat_every_in_weeks":{"type":"integer","description":"The number of weeks between each cycle start date. If not provided, each cycle will start after the end of the previous cycle.","format":"int32"},"status":{"type":"string","description":"The status of the menu cycle schedule","default":"Live","enum":["Live","Draft","Inactive","Archived"]},"description":{"type":"string","description":"The description of the menu cycle schedule"},"outlets":{"type":"array","description":"A list of outlet IDs to be linked to the menu cycle schedule.","items":{"type":"string"}},"courses":{"type":"array","description":"The courses and planned recipes of the menu cycle schedule.","items":{"properties":{"index":{"type":"integer","format":"int32"},"name":{"type":"string","description":"The name of the course. It is required only if you are creating the course."},"planned_recipes":{"type":"object","description":"An object where each key is a week number (starting from 0) and each value is an object with weekday names as keys, containing arrays of planned recipes for that day.","additionalProperties":{"type":"object","properties":{"Monday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","description":"The recipe ID."},"quantity_of_portions":{"type":"number","description":"The quantity of portions for this recipe.","nullable":true},"index":{"type":"integer","minimum":0,"nullable":true,"description":"The position of the recipe within its group (week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0. If not provided, the backend will auto-calculate the next available index."}}}},"Tuesday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","description":"The recipe ID."},"quantity_of_portions":{"type":"number","description":"The quantity of portions for this recipe.","nullable":true},"index":{"type":"integer","minimum":0,"nullable":true,"description":"The position of the recipe within its group (week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0. If not provided, the backend will auto-calculate the next available index."}}}},"Wednesday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","description":"The recipe ID."},"quantity_of_portions":{"type":"number","description":"The quantity of portions for this recipe.","nullable":true},"index":{"type":"integer","minimum":0,"nullable":true,"description":"The position of the recipe within its group (week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0. If not provided, the backend will auto-calculate the next available index."}}}},"Thursday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","description":"The recipe ID."},"quantity_of_portions":{"type":"number","description":"The quantity of portions for this recipe.","nullable":true},"index":{"type":"integer","minimum":0,"nullable":true,"description":"The position of the recipe within its group (week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0. If not provided, the backend will auto-calculate the next available index."}}}},"Friday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","description":"The recipe ID."},"quantity_of_portions":{"type":"number","description":"The quantity of portions for this recipe.","nullable":true},"index":{"type":"integer","minimum":0,"nullable":true,"description":"The position of the recipe within its group (week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0. If not provided, the backend will auto-calculate the next available index."}}}},"Saturday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","description":"The recipe ID."},"quantity_of_portions":{"type":"number","description":"The quantity of portions for this recipe.","nullable":true},"index":{"type":"integer","minimum":0,"nullable":true,"description":"The position of the recipe within its group (week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0. If not provided, the backend will auto-calculate the next available index."}}}},"Sunday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","description":"The recipe ID."},"quantity_of_portions":{"type":"number","description":"The quantity of portions for this recipe.","nullable":true},"index":{"type":"integer","minimum":0,"nullable":true,"description":"The position of the recipe within its group (week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0. If not provided, the backend will auto-calculate the next available index."}}}}}}},"id":{"type":"string","description":"The ID of the course. It is required if you are updating the course."}},"required":["index","name"],"type":"object"}},"custom_fields":{"type":"string","format":"json"},"update_type":{"type":"string","default":"ALL","enum":["ALL","CURRENT","CURRENT_AND_FUTURE","FUTURE"]}}},"examples":{"Request Example":{"value":{"id":"010101010101010","name":"My Menu Cycle Schedule","start_date":"2024-01-01","end_date":"2024-02-18","number_of_cycles":2,"duration_in_weeks":3,"repeat_every_in_weeks":4,"status":"Draft","description":"This is a sample menu cycle schedule.","outlet_specific":false,"courses_quantity":1,"planned_recipes_quantity":0,"created_at":"2024-01-01T00:00:00.000000+00:00","updated_at":"2024-01-01T00:00:00.000000+00:00","created_by":"My User","custom_fields":{"My Custom Field Multi":["value 1","value 2"],"My Custom Field Single":"value","My Custom Field Text":"value"},"outlets":["000000000000000","111111111111111"],"courses":[{"index":0,"name":"My Course 1","planned_recipes":{"0":{"Monday":[{"recipe":"000000000000000","quantity_of_portions":1,"index":0}],"Tuesday":[{"recipe":"111111111111111","quantity_of_portions":1.5,"index":0}],"Wednesday":[{"recipe":"222222222222222","quantity_of_portions":3.2,"index":0}],"Thursday":[{"recipe":"333333333333333","quantity_of_portions":null,"index":0}],"Friday":[{"recipe":"444444444444444","quantity_of_portions":2.5,"index":0}],"Saturday":[{"recipe":"555555555555555","quantity_of_portions":2,"index":0}],"Sunday":[{"recipe":"666666666666666","quantity_of_portions":4.5,"index":0}]}}}]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"id":"010101010101010","name":"My Menu Cycle Schedule","start_date":"2024-01-01","end_date":"2024-02-18","number_of_cycles":2,"duration_in_weeks":3,"repeat_every_in_weeks":4,"status":"Draft","description":"This is a sample menu cycle schedule.","outlets":[{"id":"000000000000000","name":"outlet-0"},{"id":"111111111111111","name":"outlet-1"}],"outlet_specific":false,"courses_quantity":1,"planned_recipes_quantity":7,"created_at":"2024-01-01T00:00:00.000000+00:00","updated_at":"2024-01-01T00:00:00.000000+00:00","created_by":{"id":"0909090909090909090","email":"johndoe@email.com","full_name":"John Doe"},"last_modified_by":{"id":"0909090909090909090","email":"johndoe@email.com","full_name":"John Doe"},"instances":[{"id":"040404040404040","index":0,"start_date":"2024-01-01","end_date":"2024-01-21","courses":[{"id":"020202020202020","name":"My Course 1","index":0}]},{"id":"050505050505050","index":1,"start_date":"2024-01-29","end_date":"2024-02-18","courses":[{"id":"020202020202020","name":"My Course 1","index":0}]}],"custom_fields":{"My Custom Field Multi":["value 1","value 2"],"My Custom Field Single":"value","My Custom Field Text":"value"},"courses":[{"id":"020202020202020","name":"My Course 1","index":0,"planned_recipes":{"0":{"Monday":[{"recipe":{"id":"000000000000000","name":"recipe-0"},"quantity_of_portions":1,"id":"000000000000000","index":0}],"Tuesday":[{"recipe":{"id":"111111111111111","name":"recipe-1"},"quantity_of_portions":1.5,"id":"000000000000000","index":0}],"Wednesday":[{"recipe":{"id":"222222222222222","name":"recipe-2"},"quantity_of_portions":3.2,"id":"000000000000000","index":0}],"Thursday":[{"recipe":{"id":"333333333333333","name":"recipe-3"},"quantity_of_portions":null,"id":"000000000000000","index":0}],"Friday":[{"recipe":{"id":"444444444444444","name":"recipe-4"},"quantity_of_portions":2.5,"id":"000000000000000","index":0}],"Saturday":[{"recipe":{"id":"555555555555555","name":"recipe-5"},"quantity_of_portions":2,"id":"000000000000000","index":0}],"Sunday":[{"recipe":{"id":"666666666666666","name":"recipe-6"},"quantity_of_portions":4.5,"id":"000000000000000","index":0}]}}}]}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"010101010101010"},"name":{"type":"string","example":"My Menu Cycle Schedule"},"start_date":{"type":"string","example":"2024-01-01"},"end_date":{"type":"string","example":"2024-02-18"},"number_of_cycles":{"type":"integer","example":2,"default":0},"duration_in_weeks":{"type":"integer","example":3,"default":0},"repeat_every_in_weeks":{"type":"integer","example":4,"default":0},"status":{"type":"string","example":"Draft"},"description":{"type":"string","example":"This is a sample menu cycle schedule."},"outlets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"outlet-0"}}}},"outlet_specific":{"type":"boolean","example":false,"default":true},"courses_quantity":{"type":"integer","example":1,"default":0},"planned_recipes_quantity":{"type":"integer","example":7,"default":0},"created_at":{"type":"string","example":"2024-01-01T00:00:00.000000+00:00"},"updated_at":{"type":"string","example":"2024-01-01T00:00:00.000000+00:00"},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"0909090909090909090"},"email":{"type":"string","example":"johndoe@email.com"},"full_name":{"type":"string","example":"John Doe"}}},"last_modified_by":{"type":"object","properties":{"id":{"type":"string","example":"0909090909090909090"},"email":{"type":"string","example":"johndoe@email.com"},"full_name":{"type":"string","example":"John Doe"}}},"instances":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"040404040404040"},"index":{"type":"integer","example":0,"default":0},"start_date":{"type":"string","example":"2024-01-01"},"end_date":{"type":"string","example":"2024-01-21"},"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"020202020202020"},"name":{"type":"string","example":"My Course 1"},"index":{"type":"integer","example":0,"default":0}}}}}}},"custom_fields":{"type":"object","properties":{"My Custom Field Multi":{"type":"array","items":{"type":"string","example":"value 1"}},"My Custom Field Single":{"type":"string","example":"value"},"My Custom Field Text":{"type":"string","example":"value"}}},"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"020202020202020"},"name":{"type":"string","example":"My Course 1"},"index":{"type":"integer","example":0,"default":0},"planned_recipes":{"type":"object","properties":{"0":{"type":"object","properties":{"Monday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"recipe-0"}}},"quantity_of_portions":{"type":"integer","example":1,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Tuesday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"111111111111111"},"name":{"type":"string","example":"recipe-1"}}},"quantity_of_portions":{"type":"number","example":1.5,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Wednesday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"222222222222222"},"name":{"type":"string","example":"recipe-2"}}},"quantity_of_portions":{"type":"number","example":3.2,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Thursday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"333333333333333"},"name":{"type":"string","example":"recipe-3"}}},"quantity_of_portions":{},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Friday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"444444444444444"},"name":{"type":"string","example":"recipe-4"}}},"quantity_of_portions":{"type":"number","example":2.5,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Saturday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"555555555555555"},"name":{"type":"string","example":"recipe-5"}}},"quantity_of_portions":{"type":"integer","example":2,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Sunday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"666666666666666"},"name":{"type":"string","example":"recipe-6"}}},"quantity_of_portions":{"type":"number","example":4.5,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}}}}}}}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":{}}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":{"message":"Resource not found"}}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false},"delete":{"summary":"Delete Menu Cycle Schedule","description":"Deletes a menu cycle schedule.","operationId":"delete-menu-cycle-schedule","parameters":[{"name":"menu_cycle_schedule_id","in":"path","description":"A Menu Cycle Schedule's ID.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":{}}},"schema":{"type":"object","properties":{}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":{}}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":{"message":"Resource not found"}}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false}},"/menu_planning/menu_cycle_schedule/{menu_cycle_schedule_id}/copy/":{"post":{"summary":"Copy Menu Cycle Schedule","description":"Copies a schedule from an outlet to one or more other outlets.","operationId":"copy-menu-cycle-schedule","parameters":[{"name":"menu_cycle_schedule_id","in":"path","description":"A Menu Cycle Schedule's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["new_name","new_start_date"],"properties":{"new_name":{"type":"string","description":"The name of the new menu cycle schedule"},"new_start_date":{"type":"string","description":"The start date of the new menu cycle schedule"},"copy_quantities":{"type":"boolean","description":"If true, the quantities of the planned recipes will also be copied. If false, the quantities of the planned recipes will be set to null.","default":true},"new_outlets":{"type":"array","description":"A list of outlet IDs to be linked to the new menu cycle schedule.","items":{"type":"string"}}}},"examples":{"Request Example":{"value":{"new_name":"My Copied Menu Cycle Schedule","new_start_date":"2024-01-08","copy_quantities":true,"new_outlets":["222222222222222","333333333333333"]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"id":"020202020202020","name":"My Copied Menu Cycle Schedule","start_date":"2024-01-08","end_date":"2024-02-25","number_of_cycles":2,"duration_in_weeks":3,"repeat_every_in_weeks":4,"status":"Draft","description":"This is a sample menu cycle schedule.","outlets":[{"id":"222222222222222","name":"outlet-2"},{"id":"333333333333333","name":"outlet-3"}],"outlet_specific":false,"courses_quantity":1,"planned_recipes_quantity":7,"created_at":"2024-01-01T00:00:00.000000+00:00","updated_at":"2024-01-01T00:00:00.000000+00:00","created_by":{"id":"0909090909090909090","email":"johndoe@email.com","full_name":"John Doe"},"last_modified_by":{"id":"0909090909090909090","email":"johndoe@email.com","full_name":"John Doe"},"instances":[{"id":"040404040404040","index":0,"start_date":"2024-01-01","end_date":"2024-01-21","courses":[{"id":"020202020202020","name":"My Course 1","index":0}]},{"id":"050505050505050","index":1,"start_date":"2024-01-29","end_date":"2024-02-18","courses":[{"id":"020202020202020","name":"My Course 1","index":0}]}],"custom_fields":{"My Custom Field Multi":["value 1","value 2"],"My Custom Field Single":"value","My Custom Field Text":"value"},"courses":[{"id":"020202020202020","name":"My Course 1","index":0,"planned_recipes":{"0":{"Monday":[{"recipe":{"id":"000000000000000","name":"recipe-0"},"quantity_of_portions":1,"id":"000000000000000","index":0}],"Tuesday":[{"recipe":{"id":"111111111111111","name":"recipe-1"},"quantity_of_portions":1.5,"id":"000000000000000","index":0}],"Wednesday":[{"recipe":{"id":"222222222222222","name":"recipe-2"},"quantity_of_portions":3.2,"id":"000000000000000","index":0}],"Thursday":[{"recipe":{"id":"333333333333333","name":"recipe-3"},"quantity_of_portions":null,"id":"000000000000000","index":0}],"Friday":[{"recipe":{"id":"444444444444444","name":"recipe-4"},"quantity_of_portions":2.5,"id":"000000000000000","index":0}],"Saturday":[{"recipe":{"id":"555555555555555","name":"recipe-5"},"quantity_of_portions":2,"id":"000000000000000","index":0}],"Sunday":[{"recipe":{"id":"666666666666666","name":"recipe-6"},"quantity_of_portions":4.5,"id":"000000000000000","index":0}]}}}]}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"020202020202020"},"name":{"type":"string","example":"My Copied Menu Cycle Schedule"},"start_date":{"type":"string","example":"2024-01-08"},"end_date":{"type":"string","example":"2024-02-25"},"number_of_cycles":{"type":"integer","example":2,"default":0},"duration_in_weeks":{"type":"integer","example":3,"default":0},"repeat_every_in_weeks":{"type":"integer","example":4,"default":0},"status":{"type":"string","example":"Draft"},"description":{"type":"string","example":"This is a sample menu cycle schedule."},"outlets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"222222222222222"},"name":{"type":"string","example":"outlet-2"}}}},"outlet_specific":{"type":"boolean","example":false,"default":true},"courses_quantity":{"type":"integer","example":1,"default":0},"planned_recipes_quantity":{"type":"integer","example":7,"default":0},"created_at":{"type":"string","example":"2024-01-01T00:00:00.000000+00:00"},"updated_at":{"type":"string","example":"2024-01-01T00:00:00.000000+00:00"},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"0909090909090909090"},"email":{"type":"string","example":"johndoe@email.com"},"full_name":{"type":"string","example":"John Doe"}}},"last_modified_by":{"type":"object","properties":{"id":{"type":"string","example":"0909090909090909090"},"email":{"type":"string","example":"johndoe@email.com"},"full_name":{"type":"string","example":"John Doe"}}},"instances":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"040404040404040"},"index":{"type":"integer","example":0,"default":0},"start_date":{"type":"string","example":"2024-01-01"},"end_date":{"type":"string","example":"2024-01-21"},"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"020202020202020"},"name":{"type":"string","example":"My Course 1"},"index":{"type":"integer","example":0,"default":0}}}}}}},"custom_fields":{"type":"object","properties":{"My Custom Field Multi":{"type":"array","items":{"type":"string","example":"value 1"}},"My Custom Field Single":{"type":"string","example":"value"},"My Custom Field Text":{"type":"string","example":"value"}}},"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"020202020202020"},"name":{"type":"string","example":"My Course 1"},"index":{"type":"integer","example":0,"default":0},"planned_recipes":{"type":"object","properties":{"0":{"type":"object","properties":{"Monday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"recipe-0"}}},"quantity_of_portions":{"type":"integer","example":1,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Tuesday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"111111111111111"},"name":{"type":"string","example":"recipe-1"}}},"quantity_of_portions":{"type":"number","example":1.5,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Wednesday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"222222222222222"},"name":{"type":"string","example":"recipe-2"}}},"quantity_of_portions":{"type":"number","example":3.2,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Thursday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"333333333333333"},"name":{"type":"string","example":"recipe-3"}}},"quantity_of_portions":{},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Friday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"444444444444444"},"name":{"type":"string","example":"recipe-4"}}},"quantity_of_portions":{"type":"number","example":2.5,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Saturday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"555555555555555"},"name":{"type":"string","example":"recipe-5"}}},"quantity_of_portions":{"type":"integer","example":2,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"Sunday":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"666666666666666"},"name":{"type":"string","example":"recipe-6"}}},"quantity_of_portions":{"type":"number","example":4.5,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}}}}}}}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":{}}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":{"message":"Resource not found"}}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false}},"/menu_planning/menu_cycle_schedule/{menu_cycle_schedule_id}/bulk_copy/":{"post":{"summary":"Distribute Menu Cycle Schedule","description":"Creates copies of a menu cycle schedule on each outlet.","operationId":"distribute-menu-cycle-schedule","parameters":[{"name":"menu_cycle_schedule_id","in":"path","description":"A Menu Cycle Schedule's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"outlets":{"type":"array","description":"A list of outlet IDs.","items":{"type":"string"}},"copy_quantities":{"type":"boolean","description":"If true, the quantities of the planned recipes will also be copied. If false, the quantities of the planned recipes will be set to null."}}},"examples":{"Request Example":{"value":{"outlets":["000000000000000","111111111111111"],"copy_quantities":true}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":{"ids":[222222222222222,333333333333333]}}},"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"integer","example":222222222222222,"default":0}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":{}}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/menu_planning/menu_cycle_instance/{menu_cycle_instance_id}/":{"get":{"summary":"Get Menu Cycle Instance Details","description":"Returns details about a menu cycle instance.","operationId":"get-menu-cycle-instance-details","parameters":[{"name":"menu_cycle_instance_id","in":"path","description":"A Menu Cycle Instance's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"id":"000000000000000","start_date":"2024-01-01","end_date":"2024-01-07","courses":[{"id":"000000000000000","name":"My Course","index":0,"planned_recipes":{"2024-01-01":[{"recipe":{"id":"000000000000000","name":"recipe-0","internal_uid":"internal_uid-0"},"quantity_of_portions":2,"id":"000000000000000","index":0}],"2024-01-02":[{"recipe":{"id":"000000000000000","name":"recipe-0","internal_uid":"internal_uid-0"},"quantity_of_portions":1.5,"id":"000000000000000","index":0}],"2024-01-03":[{"recipe":{"id":"000000000000000","name":"recipe-0","internal_uid":"internal_uid-0"},"quantity_of_portions":3.1,"id":"000000000000000","index":0}],"2024-01-04":[{"recipe":{"id":"000000000000000","name":"recipe-0","internal_uid":"internal_uid-0"},"quantity_of_portions":3.5,"id":"000000000000000","index":0}],"2024-01-05":[{"recipe":{"id":"000000000000000","name":"recipe-0","internal_uid":"internal_uid-0"},"quantity_of_portions":1,"id":"000000000000000","index":0}],"2024-01-06":[{"recipe":{"id":"000000000000000","name":"recipe-0","internal_uid":"internal_uid-0"},"quantity_of_portions":2.5,"id":"000000000000000","index":0}],"2024-01-07":[{"recipe":{"id":"000000000000000","name":"recipe-0","internal_uid":"internal_uid-0"},"quantity_of_portions":1.5,"id":"000000000000000","index":0}]}}]}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"start_date":{"type":"string","example":"2024-01-01"},"end_date":{"type":"string","example":"2024-01-07"},"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"My Course"},"index":{"type":"integer","example":0,"default":0},"planned_recipes":{"type":"object","properties":{"2024-01-01":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"recipe-0"},"internal_uid":{"type":"string","example":"internal_uid-0"}}},"quantity_of_portions":{"type":"integer","example":2,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"2024-01-02":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"recipe-0"},"internal_uid":{"type":"string","example":"internal_uid-0"}}},"quantity_of_portions":{"type":"number","example":1.5,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"2024-01-03":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"recipe-0"},"internal_uid":{"type":"string","example":"internal_uid-0"}}},"quantity_of_portions":{"type":"number","example":3.1,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"2024-01-04":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"recipe-0"},"internal_uid":{"type":"string","example":"internal_uid-0"}}},"quantity_of_portions":{"type":"number","example":3.5,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"2024-01-05":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"recipe-0"},"internal_uid":{"type":"string","example":"internal_uid-0"}}},"quantity_of_portions":{"type":"integer","example":1,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"2024-01-06":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"recipe-0"},"internal_uid":{"type":"string","example":"internal_uid-0"}}},"quantity_of_portions":{"type":"number","example":2.5,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}},"2024-01-07":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"recipe-0"},"internal_uid":{"type":"string","example":"internal_uid-0"}}},"quantity_of_portions":{"type":"number","example":1.5,"default":0},"id":{"type":"string","example":"000000000000000"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."}}}}}}}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":{}}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":{"message":"Resource not found"}}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false},"delete":{"summary":"Delete Menu Cycle Instance","description":"Deletes a single menu cycle instance.","operationId":"delete-menu-cycle-instance","parameters":[{"name":"menu_cycle_instance_id","in":"path","description":"A Menu Cycle Instance's ID.","schema":{"type":"string"},"required":true},{"name":"delete_type","in":"query","description":"Use this query param to inform what instances you want to delete: only the one with the ID informed in the `menu_cycle_instance_id` path param (THIS), or also the future instances (THIS_AND_FUTURE).","schema":{"type":"string","enum":["THIS","THIS_AND_FUTURE"],"default":"THIS"}}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":""}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":{}}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":{"message":"Resource not found"}}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false},"patch":{"summary":"Edit Menu Cycle Instance","description":"Edits a menu cycle instance.","operationId":"edit-menu-cycle-instance","parameters":[{"name":"menu_cycle_instance_id","in":"path","description":"A Menu Cycle Instance's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"courses":{"type":"array","description":"The courses and planned recipes of the menu cycle instance.","items":{"properties":{"index":{"type":"integer","format":"int32"},"name":{"type":"string","description":"The name of the course. It is required only if you are creating the course."},"planned_recipes":{"type":"object","description":"An object where each key is a date (YYYY-MM-DD format) and each value is an array of planned recipes for that date.","additionalProperties":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","description":"The recipe details.","properties":{"id":{"type":"string","description":"The recipe ID."},"name":{"type":"string","description":"The recipe name."},"internal_uid":{"type":"string","description":"The recipe internal UID."}}},"quantity_of_portions":{"type":"number","description":"The quantity of portions for this recipe."},"id":{"type":"string","description":"The planned recipe ID."},"index":{"type":"integer","minimum":0,"nullable":true,"description":"The position of the recipe within its group (date and course). Must be unique within the group and form a continuous sequence starting from 0. If not provided, the backend will auto-calculate the next available index."}}}}},"id":{"type":"string","description":"The ID of the course. It is required if you are updating the course."}},"required":["index","name"],"type":"object"}}}},"examples":{"Request Example":{"value":{"courses":[{"id":"000000000000000","planned_recipes":{"2024-01-01":[{"recipe":{"id":"000000000000000","name":"recipe-0","internal_uid":"internal_uid-0"},"quantity_of_portions":2,"id":"000000000000000","index":0}],"2024-01-02":[{"recipe":{"id":"000000000000000","name":"recipe-0","internal_uid":"internal_uid-0"},"quantity_of_portions":1.5,"id":"000000000000000","index":0}],"2024-01-03":[{"recipe":{"id":"000000000000000","name":"recipe-0","internal_uid":"internal_uid-0"},"quantity_of_portions":3.1,"id":"000000000000000","index":0}],"2024-01-04":[{"recipe":{"id":"000000000000000","name":"recipe-0","internal_uid":"internal_uid-0"},"quantity_of_portions":3.5,"id":"000000000000000","index":0}],"2024-01-05":[{"recipe":{"id":"000000000000000","name":"recipe-0","internal_uid":"internal_uid-0"},"quantity_of_portions":1,"id":"000000000000000","index":0}],"2024-01-06":[{"recipe":{"id":"000000000000000","name":"recipe-0","internal_uid":"internal_uid-0"},"quantity_of_portions":2.5,"id":"000000000000000","index":0}],"2024-01-07":[{"recipe":{"id":"000000000000000","name":"recipe-0","internal_uid":"internal_uid-0"},"quantity_of_portions":1.5,"id":"000000000000000","index":0}]}}]}}}}}},"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":""}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":{}}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":{"message":"Resource not found"}}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false}},"/menu_planning/menu_cycle_instance/planned_recipes/calendar/":{"get":{"summary":"Planned Recipes Calendar View","description":"Returns a list of recipes by date according to the schedule.","operationId":"planned-recipes-calendar-view","parameters":[{"name":"search","in":"query","schema":{"type":"string"}},{"name":"number_of_recipes_per_day","in":"query","description":"The number of recipes to return per day.","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"from_date","in":"query","description":"Filter Planned Recipes that happens after the informed date.","required":true,"schema":{"type":"string","format":"date"}},{"name":"to_date","in":"query","description":"Filter Planned Recipes that happens before the informed date.","required":true,"schema":{"type":"string","format":"date"}},{"name":"menu_cycle_schedule__id","in":"query","description":"Filter Planned Recipes by Menu Cycle Schedule ID.","schema":{"type":"string"}},{"name":"menu_cycle_schedule__id__in","in":"query","description":"Filter on a list of Menu Cycle Schedule IDs (comma-separated). Gets planned recipes from any of the given schedules.","schema":{"type":"string","example":"726000520000007,126000330040002"}},{"name":"outlets__id","in":"query","description":"Filter Planned Recipes by outlet ID.","schema":{"type":"string"}},{"name":"outlets__id__in","in":"query","description":"Filter on a list of outlet IDs (comma-separated). Gets planned recipes from schedules linked to any outlet in the list.","schema":{"type":"string","example":"229000382030008,429000703080005"}},{"name":"course__id","in":"query","description":"Filter Planned Recipes by course ID.","schema":{"type":"string"}},{"name":"course__id__in","in":"query","description":"Filter on a list of course IDs (comma-separated). Gets planned recipes in any of the given courses.","schema":{"type":"string","example":"734000020080004,534000110090002"}},{"name":"recipe_category","in":"query","description":"Filter Planned Recipes by recipe category.","schema":{"type":"string"}},{"name":"recipe_category__in","in":"query","description":"Filter on any given recipe category (comma-separated). Values must match exactly, including case.","schema":{"type":"string","example":"Soups,Salads"}},{"name":"recipe_type","in":"query","description":"Filter Planned Recipes by recipe type.","schema":{"type":"string"}},{"name":"recipe_type__in","in":"query","description":"Filter on any given recipe type (comma-separated). Use the stored values, such as `starter` or `main_course`, which must match exactly.","schema":{"type":"string","example":"starter,main_course"}},{"name":"status","in":"query","description":"Filter Planned Recipes by the status of the Menu Cycle Schedule.","schema":{"type":"string","enum":["Live","Draft","Inactive","Archived"]}},{"name":"status__in","in":"query","description":"Filter on any given Menu Cycle Schedule status (comma-separated). Accepts `Live`, `Draft`, `Inactive` and `Archived`.","schema":{"type":"string","example":"Live,Draft"}},{"name":"custom_fields","in":"query","description":"Filter Planned Recipes by the custom fields of the Menu Cycle Schedules.","schema":{"type":"string"}},{"name":"recipe_custom_fields","in":"query","description":"Filter Planned Recipes by the custom fields of the Recipes.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"2025-06-15":{"total_count":6,"recipes":[{"id":"123456789012345","date":"2025-06-15","quantity_of_portions":2.5,"recipe":{"id":"987654321098765","name":"Summer Salad Delight","internal_uid":"internal_uid-12345","web_page":"https://api.apicbase.com/api/library/recipe/987654321098765/"},"course":{"id":"111222333444555","name":"Appetizer","index":0},"menu_cycle_instance":{"id":"555666777888999","menu_cycle_schedule":{"id":"444333222111000","name":"Summer Menu Schedule 2025","status":"Live","courses":[{"id":"111222333444555","name":"Appetizer","index":0},{"id":"999888777666555","name":"Main Course","index":1}],"outlet_specific":false,"linked_outlets_count":3},"start_date":"2025-06-15"}},{"id":"234567890123456","date":"2025-06-15","quantity_of_portions":1.5,"recipe":{"id":"876543210987654","name":"Grilled Salmon","internal_uid":"internal_uid-67890","web_page":"https://api.apicbase.com/api/library/recipe/876543210987654/"},"course":{"id":"999888777666555","name":"Main Course","index":1},"menu_cycle_instance":{"id":"555666777888999","menu_cycle_schedule":{"id":"444333222111000","name":"Summer Menu Schedule 2025","status":"Live","courses":[{"id":"111222333444555","name":"Appetizer","index":0},{"id":"999888777666555","name":"Main Course","index":1}],"outlet_specific":false,"linked_outlets_count":3},"start_date":"2025-06-15"}}]},"2025-06-16":{"total_count":5,"recipes":[{"id":"345678901234567","date":"2025-06-16","quantity_of_portions":2,"recipe":{"id":"765432109876543","name":"Vegetable Soup","internal_uid":"internal_uid-24680","web_page":"https://api.apicbase.com/api/library/recipe/765432109876543/"},"course":{"id":"888777666555444","name":"Starter","index":0},"menu_cycle_instance":{"id":"777888999000111","menu_cycle_schedule":{"id":"333222111000999","name":"Daily Special Menu","status":"Live","courses":[{"id":"888777666555444","name":"Starter","index":0}],"outlet_specific":false,"linked_outlets_count":2},"start_date":"2025-06-01"}},{"id":"456789012345678","date":"2025-06-16","quantity_of_portions":2,"recipe":{"id":"654321098765432","name":"Vegetable Soup","internal_uid":"internal_uid-13579","web_page":"https://api.apicbase.com/api/library/recipe/654321098765432/"},"course":{"id":"777666555444333","name":"Starter","index":0},"menu_cycle_instance":{"id":"666777888999000","menu_cycle_schedule":{"id":"222111000999888","name":"Weekend Menu","status":"Live","courses":[{"id":"777666555444333","name":"Starter","index":0}],"outlet_specific":false,"linked_outlets_count":1},"start_date":"2025-06-01"}}]}}}},"schema":{"type":"object","properties":{"2025-06-15":{"type":"object","properties":{"total_count":{"type":"integer","example":6,"default":0},"recipes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"123456789012345"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."},"date":{"type":"string","example":"2025-06-15"},"quantity_of_portions":{"type":"number","example":2.5,"default":0},"recipe":{"type":"object","properties":{"id":{"type":"string","example":"987654321098765"},"name":{"type":"string","example":"Summer Salad Delight"},"internal_uid":{"type":"string","example":"internal_uid-12345"},"web_page":{"type":"string","example":"https://api.apicbase.com/api/library/recipe/987654321098765/"}}},"course":{"type":"object","properties":{"id":{"type":"string","example":"111222333444555"},"name":{"type":"string","example":"Appetizer"},"index":{"type":"integer","example":0,"default":0}}},"menu_cycle_instance":{"type":"object","properties":{"id":{"type":"string","example":"555666777888999"},"menu_cycle_schedule":{"type":"object","properties":{"id":{"type":"string","example":"444333222111000"},"name":{"type":"string","example":"Summer Menu Schedule 2025"},"status":{"type":"string","example":"Live"},"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"111222333444555"},"name":{"type":"string","example":"Appetizer"},"index":{"type":"integer","example":0,"default":0}}}},"outlet_specific":{"type":"boolean","example":false,"default":true},"linked_outlets_count":{"type":"integer","example":3,"default":0}}},"start_date":{"type":"string","example":"2025-06-15"}}}}}}}},"2025-06-16":{"type":"object","properties":{"total_count":{"type":"integer","example":5,"default":0},"recipes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"345678901234567"},"index":{"type":"integer","example":0,"nullable":true,"description":"The position of the recipe within its group (date and course for instances, week/weekday/course for schedules). Must be unique within the group and form a continuous sequence starting from 0 (e.g., 0, 1, 2, ...)."},"date":{"type":"string","example":"2025-06-16"},"quantity_of_portions":{"type":"integer","example":2,"default":0},"recipe":{"type":"object","properties":{"id":{"type":"string","example":"765432109876543"},"name":{"type":"string","example":"Vegetable Soup"},"internal_uid":{"type":"string","example":"internal_uid-24680"},"web_page":{"type":"string","example":"https://api.apicbase.com/api/library/recipe/765432109876543/"}}},"course":{"type":"object","properties":{"id":{"type":"string","example":"888777666555444"},"name":{"type":"string","example":"Starter"},"index":{"type":"integer","example":0,"default":0}}},"menu_cycle_instance":{"type":"object","properties":{"id":{"type":"string","example":"777888999000111"},"menu_cycle_schedule":{"type":"object","properties":{"id":{"type":"string","example":"333222111000999"},"name":{"type":"string","example":"Daily Special Menu"},"status":{"type":"string","example":"Live"},"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"888777666555444"},"name":{"type":"string","example":"Starter"},"index":{"type":"integer","example":0,"default":0}}}},"outlet_specific":{"type":"boolean","example":false,"default":true},"linked_outlets_count":{"type":"integer","example":2,"default":0}}},"start_date":{"type":"string","example":"2025-06-01"}}}}}}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":{}}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/production_plan/":{"get":{"summary":"Get Production Plans","description":"Returns a list of production plans.","operationId":"get-production-plans","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32","default":1}},{"name":"page_size","in":"query","description":"The number of items to return per page. The maximum is 200.","schema":{"type":"integer","format":"int32","default":10}},{"name":"ordering","in":"query","description":"Allow to order the production plans in the result. The possible values are: id, name, production_plan_number. You can also reverse order by prepending \"-\" to the value.","schema":{"type":"string"}},{"name":"search","in":"query","description":"Allow to search for production plans. The inputted value will be searched in the following fields: name, production_plan_number.","schema":{"type":"string"}},{"name":"outlet_id","in":"query","description":"Filter on an outlet ID.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"count\": 85,\n\t\"next\": \"https://api.apicbase.com/api/v2/production_plan/?outlet_id=000000000000000&page=2\",\n\t\"previous\": null,\n\t\"results\": [\n\t\t{\n\t\t\t\"id\": \"000000000000000\",\n\t\t\t\"name\": \"Sample Production Plan\",\n\t\t\t\"production_plan_number\": \"00000000-0000\",\n\t\t\t\"outlet\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"outlet-0000\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"000000000000000\",\n\t\t\t\"name\": \"Sample Production Plan\",\n\t\t\t\"production_plan_number\": \"00000000-0000\",\n\t\t\t\"outlet\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"outlet-0000\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"000000000000000\",\n\t\t\t\"name\": \"Sample Production Plan\",\n\t\t\t\"production_plan_number\": \"00000000-0000\",\n\t\t\t\"outlet\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"outlet-0000\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"000000000000000\",\n\t\t\t\"name\": \"Sample Production Plan\",\n\t\t\t\"production_plan_number\": \"00000000-0000\",\n\t\t\t\"outlet\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"outlet-0000\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"000000000000000\",\n\t\t\t\"name\": \"Sample Production Plan\",\n\t\t\t\"production_plan_number\": \"00000000-0000\",\n\t\t\t\"outlet\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"outlet-0000\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"000000000000000\",\n\t\t\t\"name\": \"Sample Production Plan\",\n\t\t\t\"production_plan_number\": \"00000000-0000\",\n\t\t\t\"outlet\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"outlet-0000\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"000000000000000\",\n\t\t\t\"name\": \"Sample Production Plan\",\n\t\t\t\"production_plan_number\": \"00000000-0000\",\n\t\t\t\"outlet\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"outlet-0000\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"000000000000000\",\n\t\t\t\"name\": \"Sample Production Plan\",\n\t\t\t\"production_plan_number\": \"00000000-0000\",\n\t\t\t\"outlet\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"outlet-0000\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"000000000000000\",\n\t\t\t\"name\": \"Sample Production Plan\",\n\t\t\t\"production_plan_number\": \"00000000-0000\",\n\t\t\t\"outlet\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"outlet-0000\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"000000000000000\",\n\t\t\t\"name\": \"Sample Production Plan\",\n\t\t\t\"production_plan_number\": \"00000000-0000\",\n\t\t\t\"outlet\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"outlet-0000\"\n\t\t\t}\n\t\t}\n\t]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":85,"default":0},"next":{"type":"string","example":"https://api.apicbase.com/api/v2/production_plan/?outlet_id=000000000000000&page=2"},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"Sample Production Plan"},"production_plan_number":{"type":"string","example":"00000000-0000"},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"outlet-0000"}}}}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false},"post":{"summary":"Create Production Plan","description":"Creates a new instance of a production plan.","operationId":"create-production-plan","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["outlet_id","name","planned_to_start_at"],"properties":{"outlet_id":{"type":"string"},"name":{"type":"string","description":"The name of the production plan."},"planned_to_start_at":{"type":"string","description":"The date and time that the production plan is planned to start.","format":"date"},"consider_quantities_planned_on":{"type":"object","description":"If given, consider quantities of already planned items on the given dates","properties":{"start":{"type":"string","format":"date"},"end":{"type":"string","format":"date"}}},"tasks":{"type":"array","items":{"properties":{"name":{"type":"string"},"workstation":{"type":"array","default":[],"items":{"type":"string"}},"person_id":{"type":"string"},"quantity_to_produce":{"type":"object","required":["quantity","unit"],"properties":{"quantity":{"type":"number","format":"float"},"unit":{"type":"string"}}},"remarks":{"type":"string"},"item_id":{"type":"string"},"item_class":{"type":"string","enum":["recipe","custom"]},"stock_item_id":{"type":"string"}},"required":["item_id","item_class"],"type":"object"}}}},"examples":{"Request Example":{"value":{"outlet_id":"000000000000000","name":"Sample MEP","planned_to_start_at":"2024-10-04T14:00:00-00:00","consider_quantities_planned_on":{"start":"2024-10-03T14:00:00-00:00","end":"2024-11-05T14:00:00-00:00"},"tasks":[{"name":"my task","workstation":["Station1","Station2"],"person_id":"000000000000000","quantity_to_produce":{"quantity":4,"unit":"kg"},"remarks":"sample remakrs","item_id":"000000000000000","item_class":"recipe","stock_item_id":"000000000000000"}]}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"id\": \"000000000000000\",\n\t\"name\": \"Sample MEP\",\n\t\"outlet\": {\n\t\t\"id\": \"000000000000000\",\n\t\t\"name\": \"outlet-0000\"\n\t},\n\t\"production_runs\": [\n\t\t{\n\t\t\t\"planned_to_start_at\": \"2024-10-04T19:00:00+00:00\",\n\t\t\t\"start\": null,\n\t\t\t\"end\": null,\n\t\t\t\"state\": \"READY\"\n\t\t}\n\t],\n\t\"tasks\": [\n\t\t{\n\t\t\t\"id\": \"000000000000000\",\n\t\t\t\"name\": \"my task\",\n\t\t\t\"workstation\": [\n\t\t\t\t\"Station1\",\n\t\t\t\t\"Station2\"\n\t\t\t],\n\t\t\t\"person\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"Sample Person\"\n\t\t\t},\n\t\t\t\"quantity\": \"10.00\",\n\t\t\t\"unit\": \"kg\",\n\t\t\t\"remarks\": \"\",\n\t\t\t\"stock_item\": \"000000000000000\",\n\t\t\t\"item\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"recipe-000000\",\n        \"class\": \"recipe\"\n\t\t\t}\n\t\t}\n\t],\n\t\"url\": \"https://app.apicbase.com/mep/edit/0000\"\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"Sample MEP"},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"outlet-0000"}}},"production_runs":{"type":"array","items":{"type":"object","properties":{"planned_to_start_at":{"type":"string","example":"2024-10-04T19:00:00+00:00"},"start":{},"end":{},"state":{"type":"string","example":"READY"}}}},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"my task"},"workstation":{"type":"array","items":{"type":"string","example":"Station1"}},"person":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"Sample Person"}}},"quantity":{"type":"string","example":"10.00"},"unit":{"type":"string","example":"kg"},"remarks":{"type":"string","example":""},"stock_item":{"type":"string","example":"000000000000000"},"item":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"recipe-000000"},"class":{"type":"string","example":"recipe"}}}}}},"url":{"type":"string","example":"https://app.apicbase.com/mep/edit/0000"}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/production_plan/{production_plan_id}/":{"patch":{"summary":"Update Production Plan","description":"Edits an existing production plan.","operationId":"update-production-plan","parameters":[{"name":"production_plan_id","in":"path","description":"The ID of a production plan.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the production plan."},"consider_quantities_planned_on":{"type":"object","description":"If informed, the already planned items will be considered.","properties":{"start":{"type":"string","format":"date"},"end":{"type":"string","format":"date"}}},"tasks":{"type":"array","items":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"workstation":{"type":"array","default":[],"items":{"type":"string"}},"person_id":{"type":"string"},"quantity_to_produce":{"type":"object","required":["quantity","unit"],"properties":{"quantity":{"type":"number","format":"float"},"unit":{"type":"string"}}},"remarks":{"type":"string"},"item_id":{"type":"string"},"item_class":{"type":"string","enum":["recipe","custom"]},"stock_item_id":{"type":"string"}},"required":["item_id","item_class"],"type":"object"}},"accumulate_quantity":{"type":"boolean","description":"Whether to accumulate quantity on already existing items.","default":false},"keep_existing_tasks":{"type":"boolean","description":"Whether to keep existing tasks or overwrite all tasks.","default":false}}},"examples":{"Request Example":{"value":{"outlet_id":"000000000000000","name":"Sample MEP","accumulate_quantity":false,"keep_existing_tasks":false,"consider_quantities_planned_on":{"start":"2024-10-03T14:00:00-00:00","end":"2024-11-05T14:00:00-00:00"},"tasks":[{"name":"my task","workstation":["Station1","Station2"],"person_id":"000000000000000","quantity_to_produce":{"quantity":4,"unit":"kg"},"remarks":"sample remakrs","item_id":"000000000000000","item_class":"recipe","stock_item_id":"000000000000000"}]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"id\": \"000000000000000\",\n\t\"name\": \"Sample MEP\",\n\t\"outlet\": {\n\t\t\"id\": \"000000000000000\",\n\t\t\"name\": \"outlet-0000\"\n\t},\n\t\"production_runs\": [\n\t\t{\n\t\t\t\"planned_to_start_at\": \"2024-10-04T19:00:00+00:00\",\n\t\t\t\"start\": null,\n\t\t\t\"end\": null,\n\t\t\t\"state\": \"READY\"\n\t\t}\n\t],\n\t\"tasks\": [\n\t\t{\n\t\t\t\"id\": \"000000000000000\",\n\t\t\t\"name\": \"my task\",\n\t\t\t\"workstation\": [\n\t\t\t\t\"Station1\",\n\t\t\t\t\"Station2\"\n\t\t\t],\n\t\t\t\"person\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"Sample Person\"\n\t\t\t},\n\t\t\t\"quantity\": \"10.00\",\n\t\t\t\"unit\": \"kg\",\n\t\t\t\"remarks\": \"\",\n\t\t\t\"stock_item\": \"000000000000000\",\n\t\t\t\"item\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"recipe-000000\"\n\t\t\t}\n\t\t}\n\t],\n\t\"url\": \"https://app.apicbase.com/mep/edit/0000\"\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"Sample MEP"},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"outlet-0000"}}},"production_runs":{"type":"array","items":{"type":"object","properties":{"planned_to_start_at":{"type":"string","example":"2024-10-04T19:00:00+00:00"},"start":{},"end":{},"state":{"type":"string","example":"READY"}}}},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"my task"},"workstation":{"type":"array","items":{"type":"string","example":"Station1"}},"person":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"Sample Person"}}},"quantity":{"type":"string","example":"10.00"},"unit":{"type":"string","example":"kg"},"remarks":{"type":"string","example":""},"stock_item":{"type":"string","example":"000000000000000"},"item":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"recipe-000000"}}}}}},"url":{"type":"string","example":"https://app.apicbase.com/mep/edit/0000"}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false},"get":{"summary":"Get Production Plan Details","description":"Returns information about a specific production plan.","operationId":"get-production-plan-details","parameters":[{"name":"production_plan_id","in":"path","description":"The ID of a production plan.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"id\": \"000000000000000\",\n\t\"name\": \"Sample MEP\",\n\t\"outlet\": {\n\t\t\"id\": \"000000000000000\",\n\t\t\"name\": \"outlet-0000\"\n\t},\n\t\"production_runs\": [\n\t\t{\n\t\t\t\"planned_to_start_at\": \"2000-01-01T00:00:00+00:00\",\n\t\t\t\"start\": null,\n\t\t\t\"end\": null,\n\t\t\t\"state\": \"READY\"\n\t\t}\n\t],\n\t\"tasks\": [\n\t\t{\n\t\t\t\"id\": \"000000000000000\",\n\t\t\t\"name\": \"\",\n\t\t\t\"workstation\": [\n\t\t\t\t\"Workstation 1\"\n\t\t\t],\n\t\t\t\"person\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"Sample Person\"\n\t\t\t},\n\t\t\t\"quantity\": \"66.00\",\n\t\t\t\"unit\": \"kg\",\n\t\t\t\"remarks\": \"Sample remarks\",\n\t\t\t\"stock_item\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"recipe-0000 Pak (1 kg)\",\n\t\t\t\t\"portion\": {\n\t\t\t\t\t\"quantity\": \"1.00\",\n\t\t\t\t\t\"unit\": \"kg\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"item\": {\n\t\t\t\t\"id\": \"000000000000000\",\n\t\t\t\t\"name\": \"recipe-0000\"\n\t\t\t}\n\t\t}\n\t],\n\t\"url\": \"https://app.apicbase.com/mep/edit/0000\"\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"Sample MEP"},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"outlet-0000"}}},"production_runs":{"type":"array","items":{"type":"object","properties":{"planned_to_start_at":{"type":"string","example":"2000-01-01T00:00:00+00:00"},"start":{},"end":{},"state":{"type":"string","example":"READY"}}}},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":""},"workstation":{"type":"array","items":{"type":"string","example":"Workstation 1"}},"person":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"Sample Person"}}},"quantity":{"type":"string","example":"66.00"},"unit":{"type":"string","example":"kg"},"remarks":{"type":"string","example":"Sample remarks"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"recipe-0000 Pak (1 kg)"},"portion":{"type":"object","properties":{"quantity":{"type":"string","example":"1.00"},"unit":{"type":"string","example":"kg"}}}}},"item":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"recipe-0000"}}}}}},"url":{"type":"string","example":"https://app.apicbase.com/mep/edit/0000"}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false},"delete":{"summary":"Delete Production Plan","description":"Deletes a production plan.","operationId":"delete-production-plan","parameters":[{"name":"production_plan_id","in":"path","description":"The ID of the production plan to delete.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"Production plan deleted."},"404":{"description":"Production plan not found."}},"deprecated":false}},"/production_plan/{plan_id}/tasks/":{"get":{"summary":"List Plan Tasks","description":"Returns a paginated list of all merged tasks in a production plan, including sub-tasks and origins.","operationId":"list-plan-tasks","parameters":[{"name":"plan_id","in":"path","description":"The ID of the production plan.","schema":{"type":"string"},"required":true},{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32","default":1}},{"name":"page_size","in":"query","description":"The number of items to return per page.","schema":{"type":"integer","format":"int32","default":10}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"count":1,"next":null,"previous":null,"results":[{"id":"67890","name":"Tomato Soup","workstation":["Kitchen A"],"person":{"id":"333","name":"John Doe"},"quantity":"10.00","unit":"kg","remarks":null,"stock_item":{"id":"222","name":"Tomato Soup Pack"},"item":{"id":"111","name":"Tomato Soup"},"sub_tasks":[{"id":"99999","quantity":"10.00","unit":"kg","origin":[{"id":"111","item":{"id":"111","name":"Tomato Soup"}}]}]}]}}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":2},"next":{"type":"string","nullable":true},"previous":{"type":"string","nullable":true},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"67890","description":"The ID of the merged task."},"name":{"type":"string","example":"Tomato Soup","description":"The task name."},"workstation":{"type":"array","nullable":true,"items":{"type":"string"},"description":"List of assigned workstation names."},"person":{"type":"object","nullable":true,"description":"The assigned person.","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"quantity":{"type":"string","example":"10.00","description":"Total quantity to produce."},"unit":{"type":"string","example":"kg","description":"Unit of measurement."},"remarks":{"type":"string","nullable":true,"description":"Optional remarks."},"stock_item":{"type":"object","nullable":true,"description":"The associated stock item.","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"item":{"type":"object","description":"The recipe or ingredient item.","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"sub_tasks":{"type":"array","description":"List of sub-tasks.","items":{"type":"object","properties":{"id":{"type":"string"},"quantity":{"type":"string"},"unit":{"type":"string"},"origin":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}}}}}}}}}}}}},"deprecated":false}},"/production_plan/{plan_id}/tasks/{task_id}/":{"get":{"summary":"Get Plan Task","description":"Retrieves a single merged task with nested sub-tasks and origins.","operationId":"get-plan-task","parameters":[{"name":"plan_id","in":"path","description":"The ID of the production plan.","schema":{"type":"string"},"required":true},{"name":"task_id","in":"path","description":"The ID of the task.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"id":"67890","name":"Tomato Soup","workstation":["Kitchen A"],"person":{"id":"333","name":"John Doe"},"quantity":"10.00","unit":"kg","remarks":null,"stock_item":{"id":"222","name":"Tomato Soup Pack"},"item":{"id":"111","name":"Tomato Soup"},"sub_tasks":[{"id":"99999","quantity":"10.00","unit":"kg","origin":[{"id":"111","item":{"id":"111","name":"Tomato Soup"}}]}]}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"67890"},"name":{"type":"string","example":"Tomato Soup"},"workstation":{"type":"array","nullable":true,"items":{"type":"string"}},"person":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"quantity":{"type":"string","example":"10.00"},"unit":{"type":"string","example":"kg"},"remarks":{"type":"string","nullable":true},"stock_item":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"sub_tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"quantity":{"type":"string"},"unit":{"type":"string"},"origin":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}}}}}}}}},"404":{"description":"Task not found."}},"deprecated":false},"delete":{"summary":"Delete Plan Task","description":"Deletes a task from the production plan. Remaining tasks are automatically reordered.","operationId":"delete-plan-task","parameters":[{"name":"plan_id","in":"path","description":"The ID of the production plan.","schema":{"type":"string"},"required":true},{"name":"task_id","in":"path","description":"The ID of the task to delete.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"Task deleted. Remaining tasks are automatically reordered."},"404":{"description":"Task not found."}},"deprecated":false}},"/production_plan/{plan_id}/tasks/bulk/":{"post":{"summary":"Bulk Upsert Plan Tasks","description":"Create new tasks, update existing tasks, or both in a single request. If a task object includes an `id`, it is treated as an update; otherwise, it is treated as a create.","operationId":"bulk-upsert-plan-tasks","parameters":[{"name":"plan_id","in":"path","description":"The ID of the production plan.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["tasks"],"properties":{"tasks":{"type":"array","description":"Array of task objects to create or update.","items":{"type":"object","properties":{"id":{"type":"string","description":"The task ID. Include to update an existing task; omit to create a new one."},"name":{"type":"string","description":"The task name. Required for create."},"item_id":{"type":"integer","description":"The ID of the recipe. Required for create."},"item_class":{"type":"string","description":"The type of item. Required for create.","enum":["recipe"]},"stock_item_id":{"type":"integer","description":"The stock item ID. Required for create."},"quantity_to_produce":{"type":"object","description":"The quantity to produce.","properties":{"quantity":{"type":"number"},"unit":{"type":"string"}}},"workstation":{"type":"array","items":{"type":"string"},"description":"List of workstation names."},"person_id":{"type":"integer","description":"The ID of the person to assign."},"remarks":{"type":"string","description":"Optional remarks."},"sub_tasks":{"type":"array","description":"Sub-tasks to create. Only used when creating a new task.","items":{"type":"object","properties":{"quantity_to_produce":{"type":"object","properties":{"quantity":{"type":"number"},"unit":{"type":"string"}}},"origin":{"type":"array","items":{"type":"object","properties":{"item_id":{"type":"integer"},"item_class":{"type":"string"}}}}}}}}}}}},"examples":{"Create":{"value":{"tasks":[{"name":"Tomato Soup","item_id":111,"item_class":"recipe","stock_item_id":222,"quantity_to_produce":{"quantity":10,"unit":"kg"},"sub_tasks":[{"quantity_to_produce":{"quantity":10,"unit":"kg"},"origin":[{"item_id":111,"item_class":"recipe"}]}]}]}},"Update":{"value":{"tasks":[{"id":"67890","quantity_to_produce":{"quantity":20,"unit":"kg"},"workstation":["Kitchen A"],"person_id":333,"remarks":"Updated remark"}]}}}}}},"responses":{"200":{"description":"Returns the affected tasks.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workstation":{"type":"array","nullable":true,"items":{"type":"string"}},"person":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"quantity":{"type":"string"},"unit":{"type":"string"},"remarks":{"type":"string","nullable":true},"stock_item":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"sub_tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"quantity":{"type":"string"},"unit":{"type":"string"},"origin":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}}}}}}}}}},"400":{"description":"Invalid request body."}},"deprecated":false}},"/production_plan/{plan_id}/tasks/reorder/":{"post":{"summary":"Reorder Plan Tasks","description":"Reorders tasks in a production plan. The `task_order` array must contain all task IDs in the desired order.","operationId":"reorder-plan-tasks","parameters":[{"name":"plan_id","in":"path","description":"The ID of the production plan.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["task_order"],"properties":{"task_order":{"type":"array","description":"Array of all task IDs in the desired order.","items":{"type":"string"}}}},"examples":{"Request Example":{"value":{"task_order":["67890","67891","67892"]}}}}}},"responses":{"200":{"description":"Tasks reordered successfully."},"400":{"description":"Invalid task order — must include all task IDs."}},"deprecated":false}},"/production_plan/{plan_id}/tasks/reset/":{"post":{"summary":"Reset Plan Tasks","description":"Deletes all tasks from the production plan.","operationId":"reset-plan-tasks","parameters":[{"name":"plan_id","in":"path","description":"The ID of the production plan.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"All tasks deleted."}},"deprecated":false}},"/production_plan/{plan_id}/tasks/{task_id}/sub_tasks/{sub_task_id}/":{"patch":{"summary":"Update Plan Sub-Task","description":"Updates a sub-task's quantity and unit. Returns the parent merged task with recalculated totals.","operationId":"update-plan-sub-task","parameters":[{"name":"plan_id","in":"path","description":"The ID of the production plan.","schema":{"type":"string"},"required":true},{"name":"task_id","in":"path","description":"The ID of the parent task.","schema":{"type":"string"},"required":true},{"name":"sub_task_id","in":"path","description":"The ID of the sub-task.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"quantity":{"type":"string","description":"The new quantity as a decimal string."},"unit":{"type":"string","description":"The unit of measurement."}}},"examples":{"Request Example":{"value":{"quantity":"5.00","unit":"kg"}}}}}},"responses":{"200":{"description":"Returns the parent merged task with recalculated totals.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workstation":{"type":"array","nullable":true,"items":{"type":"string"}},"person":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"quantity":{"type":"string"},"unit":{"type":"string"},"remarks":{"type":"string","nullable":true},"stock_item":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"sub_tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"quantity":{"type":"string"},"unit":{"type":"string"},"origin":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}}}}}}}}},"404":{"description":"Sub-task not found."}},"deprecated":false},"delete":{"summary":"Delete Plan Sub-Task","description":"Deletes a sub-task. Returns the updated parent task (200), or 204 if the parent task was also deleted because this was its last sub-task.","operationId":"delete-plan-sub-task","parameters":[{"name":"plan_id","in":"path","description":"The ID of the production plan.","schema":{"type":"string"},"required":true},{"name":"task_id","in":"path","description":"The ID of the parent task.","schema":{"type":"string"},"required":true},{"name":"sub_task_id","in":"path","description":"The ID of the sub-task to delete.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Sub-task deleted. Returns the updated parent task.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workstation":{"type":"array","nullable":true,"items":{"type":"string"}},"person":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"quantity":{"type":"string"},"unit":{"type":"string"},"remarks":{"type":"string","nullable":true},"stock_item":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"sub_tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"quantity":{"type":"string"},"unit":{"type":"string"},"origin":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}}}}}}}}},"204":{"description":"Sub-task and parent task both deleted (was the last sub-task)."},"404":{"description":"Sub-task not found."}},"deprecated":false}},"/production_plan/custom_tasks/":{"post":{"summary":"Create Custom Task","description":"","operationId":"create-custom-task","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["outlet_id","text"],"properties":{"outlet_id":{"type":"string"},"text":{"type":"string"}}},"examples":{"Request Example":{"value":{"outlet_id":529100044450000,"text":"My Sample Custom Task"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"title":"My Sample Custom Task","id":"235000310370002","outlet":{"id":"529100044450000","name":"My Sample Outlet"}}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"535000738260002"},"text":{"type":"string","example":"My Sample Custom Task"},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"529100044450000"},"name":{"type":"string","example":"My Sample Outlet"}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false},"get":{"summary":"Get Custom Tasks","description":"","operationId":"get-custom-tasks","parameters":[{"name":"outlet_id","in":"query","schema":{"type":"string"}},{"name":"search","in":"query","description":"search by the `text` field.","schema":{"type":"string"}},{"name":"ordering","in":"query","schema":{"type":"string","enum":["text","-text"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"count":2,"next":null,"previous":null,"results":[{"id":"635000787230003","title":"My Sample Custom Task","outlet":{"id":"529100044450000","name":"My Sample Outlet"}},{"id":"335000828270001","title":"My Sample Custom Task 2","outlet":{"id":"529100044450000","name":"My Sample Outlet"}}]}}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":2,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"635000787230003"},"text":{"type":"string","example":"My Sample Custom Task"},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"529100044450000"},"name":{"type":"string","example":"My Sample Outlet"}}}}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/production_plan/custom_tasks/{custom_task_id}/":{"patch":{"summary":"Update Custom Task","description":"","operationId":"update-custom-task","parameters":[{"name":"custom_task_id","in":"path","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"outlet_id":{"type":"string"},"text":{"type":"string"}}},"examples":{"Request Example":{"value":{"outlet_id":529100044450000,"text":"My Sample Custom Task Updated"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"title":"My Sample Custom Task Updated","id":"235000310370002","outlet":{"id":"529100044450000","name":"My Sample Outlet"}}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"535000738260002"},"text":{"type":"string","example":"My Sample Custom Task Updated"},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"529100044450000"},"name":{"type":"string","example":"My Sample Outlet"}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/production_plan/custom_tasks/taskable/":{},"/production_plan/{plan_id}/duplicate/":{"post":{"summary":"Duplicate Production Plan","description":"Creates a deep copy of a production plan including all of its tasks. The new plan starts with no production runs.","operationId":"duplicate-production-plan","parameters":[{"name":"plan_id","in":"path","description":"The ID of the production plan to duplicate.","schema":{"type":"string"},"required":true}],"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","description":"The newly created plan. Same shape as `Get Production Plan Details`, except `production_runs` is always empty — a duplicate starts with no production runs.","properties":{"id":{"type":"string","example":"000000000000124"},"name":{"type":"string","example":"Weekly prep (copy)"},"production_plan_number":{"type":"string","example":"PPL-124"},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"000000000000000"},"name":{"type":"string","example":"Main kitchen"}}},"production_runs":{"type":"array","description":"Always empty for a duplicated plan.","items":{"type":"object"}},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000200"},"name":{"type":"string","example":"Make Béchamel"},"workstation":{"type":"array","items":{"type":"string"},"example":["Sauce station"]},"person":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"000000000000050"},"name":{"type":"string","example":"Jane Doe"}}},"quantity":{"type":"string","example":"10.00"},"unit":{"type":"string","example":"kg"},"remarks":{"type":"string","example":""},"stock_item":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"000000000000020"},"name":{"type":"string","example":"Béchamel sauce"},"portion":{"type":"object","properties":{"quantity":{"type":"string","example":"1.00"},"unit":{"type":"string","example":"kg"}}},"is_base_stock_item":{"type":"boolean","example":false}}},"item":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"000000000000030"},"name":{"type":"string","example":"Béchamel sauce"},"class":{"type":"string","enum":["recipe","custom","menu","incoming_order","incoming_order_package"],"example":"recipe"}}},"sub_tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000300"},"quantity":{"type":"string","example":"10.00"},"unit":{"type":"string","example":"kg"},"origin":{"type":"array","items":{"type":"object"}}}}},"foreseen_time_minutes":{"type":"integer","example":30}}}},"url":{"type":"string","example":"https://app.apicbase.com/mep/edit/0124"}}},"examples":{"Result":{"value":{"id":"000000000000124","name":"Weekly prep (copy)","production_plan_number":"PPL-124","outlet":{"id":"000000000000000","name":"Main kitchen"},"production_runs":[],"tasks":[{"id":"000000000000200","name":"Make Béchamel","workstation":["Sauce station"],"person":{"id":"000000000000050","name":"Jane Doe"},"quantity":"10.00","unit":"kg","remarks":"","stock_item":{"id":"000000000000020","name":"Béchamel sauce","portion":{"quantity":"1.00","unit":"kg"},"is_base_stock_item":false},"item":{"id":"000000000000030","name":"Béchamel sauce","class":"recipe"},"sub_tasks":[],"foreseen_time_minutes":30}],"url":"https://app.apicbase.com/mep/edit/0124"}}}}}},"403":{"description":"The user does not have permission to create production plans."},"404":{"description":"Production plan not found."}},"deprecated":false}},"/compliance/tasks/ccps/":{"get":{"summary":"Get Critical Control Points","description":"Returns the library's critical control points (CCPs), newest first.","operationId":"get-ccps","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32","default":1}},{"name":"page_size","in":"query","description":"The number of items to return per page. The maximum is 200.","schema":{"type":"integer","format":"int32","default":10}},{"name":"ordering","in":"query","description":"Order the results. The possible values are: name, code, type, created, modified. You can reverse the order by prepending \"-\" to the value.","schema":{"type":"string"}},{"name":"name","in":"query","description":"Filter on the CCP name (case-insensitive, partial match).","schema":{"type":"string"}},{"name":"code","in":"query","description":"Filter on the CCP code","schema":{"type":"string"}},{"name":"type","in":"query","description":"Filter on the CCP type ID. See [CCP types](https://developers.apicbase.com/docs/compliance-task-reference-values#ccp-types). The set is open: new values may be added without it counting as a breaking change.","schema":{"type":"integer","enum":[1,2,3,4,5,6,7,8,9,10,11]}},{"name":"mitigation_policy","in":"query","description":"Filter on the mitigation policy. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy).","schema":{"type":"integer","enum":[0,1,2]}},{"name":"supervisor","in":"query","description":"Filter on the ID of the supervisor user.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"count":2,"next":null,"previous":null,"results":[{"id":"100000000000002","name":"Freezer #2","code":"CCP-02","description":"Freezer storage temperature control","type":2,"supervisor":null,"mitigation_policy":0,"created":"2026-07-01T09:30:00Z","modified":"2026-07-01T09:30:00Z"},{"id":"100000000000001","name":"Fridge #1","code":"CCP-01","description":"Storage temperature control","type":2,"supervisor":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"mitigation_policy":2,"created":null,"modified":null}]}}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":2,"description":"The total number of critical control points."},"next":{"type":"string","nullable":true,"description":"The URL of the next page, or null on the last page."},"previous":{"type":"string","nullable":true,"description":"The URL of the previous page, or null on the first page."},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000001","description":"The ID of the critical control point."},"name":{"type":"string","example":"Fridge #1","description":"The name of the critical control point."},"code":{"type":"string","example":"CCP-01","description":"A short code identifying the CCP. Can be empty."},"description":{"type":"string","example":"Storage temperature control","description":"The description of the CCP. Can be empty."},"type":{"type":"integer","example":2,"description":"The CCP type. See [CCP types](https://developers.apicbase.com/docs/compliance-task-reference-values#ccp-types). The set is open: new values may be added without it counting as a breaking change."},"supervisor":{"type":"object","nullable":true,"description":"The user supervising this CCP.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"mitigation_policy":{"type":"integer","enum":[0,1,2],"example":2,"description":"Whether a corrective action is required when a related task fails. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy)."},"created":{"type":"string","format":"date-time","nullable":true,"example":"2026-07-01T09:30:00Z","description":"When the CCP was created."},"modified":{"type":"string","format":"date-time","nullable":true,"example":"2026-07-01T09:30:00Z","description":"When the CCP was last modified."}}},"description":"The array of results for the current page."}}}}}},"400":{"description":"Invalid filter or pagination parameters."},"403":{"description":"User lacks permission to view the tasks dashboard."}},"deprecated":false},"post":{"summary":"Create Critical Control Point","description":"Creates a critical control point (CCP) in the library.","operationId":"create-ccp","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","type"],"properties":{"name":{"type":"string","maxLength":150,"example":"Fridge #1","description":"The name of the critical control point."},"code":{"type":"string","maxLength":15,"example":"CCP-01","description":"A short code identifying the CCP. Can be empty."},"description":{"type":"string","example":"Storage temperature control","description":"The description of the CCP. Defaults to an empty string."},"type":{"type":"integer","enum":[1,2,3,4,5,6,7,8,9,10,11],"example":2,"description":"The CCP type. See [CCP types](https://developers.apicbase.com/docs/compliance-task-reference-values#ccp-types). The set is open: new values may be added without it counting as a breaking change."},"supervisor":{"type":"string","nullable":true,"example":"100000000000045","description":"The ID of the user supervising this CCP."},"mitigation_policy":{"type":"integer","enum":[0,1,2],"example":2,"description":"Whether a corrective action is required when a related task fails. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy). Defaults to 0."}}},"examples":{"Request Example":{"value":{"name":"Fridge #1","code":"CCP-01","description":"Storage temperature control","type":2,"supervisor":"100000000000045","mitigation_policy":2}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":{"id":"100000000000001","name":"Fridge #1","code":"CCP-01","description":"Storage temperature control","type":2,"supervisor":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"mitigation_policy":2,"created":"2026-07-01T09:30:00Z","modified":"2026-07-02T10:15:00Z"}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"100000000000001","description":"The ID of the critical control point."},"name":{"type":"string","example":"Fridge #1","description":"The name of the critical control point."},"code":{"type":"string","example":"CCP-01","description":"A short code identifying the CCP. Can be empty."},"description":{"type":"string","example":"Storage temperature control","description":"The description of the CCP. Can be empty."},"type":{"type":"integer","example":2,"description":"The CCP type. See [CCP types](https://developers.apicbase.com/docs/compliance-task-reference-values#ccp-types). The set is open: new values may be added without it counting as a breaking change."},"supervisor":{"type":"object","nullable":true,"description":"The user supervising this CCP.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"mitigation_policy":{"type":"integer","enum":[0,1,2],"example":2,"description":"Whether a corrective action is required when a related task fails. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy)."},"created":{"type":"string","format":"date-time","nullable":true,"example":"2026-07-01T09:30:00Z","description":"When the CCP was created."},"modified":{"type":"string","format":"date-time","nullable":true,"example":"2026-07-02T10:15:00Z","description":"When the CCP was last modified."}}}}}},"400":{"description":"Bad request — the payload failed validation.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"examples":{"missing_field":{"summary":"A required field was left out","value":{"name":["This field is required."]}},"supervisor_is_an_outlet_user":{"summary":"An outlet user cannot supervise a CCP","value":{"supervisor":["An outlet user cannot be a supervisor."]}}}}}},"403":{"description":"Forbidden — the Tasks module is off, or the user lacks the permission needed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"module_disabled":{"summary":"The Tasks module is not enabled for the library","value":{"detail":"Your library does not have Compliance Tasks module active."}},"no_permission":{"summary":"The user lacks the permission this endpoint needs","value":{"message":"You have no permission to perform that action. If you think you should be allowed please contact your library admin"}}}}}}},"deprecated":false}},"/compliance/tasks/ccps/{ccp_id}/":{"get":{"summary":"Get Critical Control Point Details","description":"Returns information about a specific critical control point.","operationId":"get-ccp-details","parameters":[{"name":"ccp_id","in":"path","description":"The ID of the critical control point.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"id":"100000000000001","name":"Fridge #1","code":"CCP-01","description":"Storage temperature control","type":2,"supervisor":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"mitigation_policy":2,"created":"2026-07-01T09:30:00Z","modified":"2026-07-02T10:15:00Z"}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"100000000000001","description":"The ID of the critical control point."},"name":{"type":"string","example":"Fridge #1","description":"The name of the critical control point."},"code":{"type":"string","example":"CCP-01","description":"A short code identifying the CCP. Can be empty."},"description":{"type":"string","example":"Storage temperature control","description":"The description of the CCP. Can be empty."},"type":{"type":"integer","example":2,"description":"The CCP type. See [CCP types](https://developers.apicbase.com/docs/compliance-task-reference-values#ccp-types). The set is open: new values may be added without it counting as a breaking change."},"supervisor":{"type":"object","nullable":true,"description":"The user supervising this CCP.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"mitigation_policy":{"type":"integer","enum":[0,1,2],"example":2,"description":"Whether a corrective action is required when a related task fails. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy)."},"created":{"type":"string","format":"date-time","nullable":true,"example":"2026-07-01T09:30:00Z","description":"When the CCP was created."},"modified":{"type":"string","format":"date-time","nullable":true,"example":"2026-07-02T10:15:00Z","description":"When the CCP was last modified."}}}}}},"403":{"description":"User lacks permission to view the tasks dashboard."},"404":{"description":"CCP not found."}},"deprecated":false},"patch":{"summary":"Update Critical Control Point","description":"Edits an existing critical control point. Only the fields present in the payload are changed.","operationId":"update-ccp","parameters":[{"name":"ccp_id","in":"path","description":"The ID of the critical control point.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":150,"example":"Fridge #1","description":"The name of the critical control point."},"code":{"type":"string","maxLength":15,"example":"CCP-01","description":"A short code identifying the CCP. Can be empty."},"description":{"type":"string","example":"Storage temperature control","description":"The description of the CCP."},"type":{"type":"integer","enum":[1,2,3,4,5,6,7,8,9,10,11],"example":2,"description":"The CCP type. See [CCP types](https://developers.apicbase.com/docs/compliance-task-reference-values#ccp-types). The set is open: new values may be added without it counting as a breaking change."},"supervisor":{"type":"string","nullable":true,"example":"100000000000045","description":"The ID of the user supervising this CCP."},"mitigation_policy":{"type":"integer","enum":[0,1,2],"example":2,"description":"Whether a corrective action is required when a related task fails. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy)."}}},"examples":{"Request Example":{"value":{"name":"Fridge #1 (main kitchen)","mitigation_policy":2}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"id":"100000000000001","name":"Fridge #1","code":"CCP-01","description":"Storage temperature control","type":2,"supervisor":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"mitigation_policy":2,"created":"2026-07-01T09:30:00Z","modified":"2026-07-02T10:15:00Z"}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"100000000000001","description":"The ID of the critical control point."},"name":{"type":"string","example":"Fridge #1","description":"The name of the critical control point."},"code":{"type":"string","example":"CCP-01","description":"A short code identifying the CCP. Can be empty."},"description":{"type":"string","example":"Storage temperature control","description":"The description of the CCP. Can be empty."},"type":{"type":"integer","example":2,"description":"The CCP type. See [CCP types](https://developers.apicbase.com/docs/compliance-task-reference-values#ccp-types). The set is open: new values may be added without it counting as a breaking change."},"supervisor":{"type":"object","nullable":true,"description":"The user supervising this CCP.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"mitigation_policy":{"type":"integer","enum":[0,1,2],"example":2,"description":"Whether a corrective action is required when a related task fails. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy)."},"created":{"type":"string","format":"date-time","nullable":true,"example":"2026-07-01T09:30:00Z","description":"When the CCP was created."},"modified":{"type":"string","format":"date-time","nullable":true,"example":"2026-07-02T10:15:00Z","description":"When the CCP was last modified."}}}}}},"400":{"description":"Bad request — the payload failed validation.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"examples":{"type_unknown":{"summary":"A value outside the fixed set","value":{"type":["\"999\" is not a valid choice."]}},"supervisor_is_an_outlet_user":{"summary":"An outlet user cannot supervise a CCP","value":{"supervisor":["An outlet user cannot be a supervisor."]}}}}}},"403":{"description":"Forbidden — the Tasks module is off, or the user lacks the permission needed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"module_disabled":{"summary":"The Tasks module is not enabled for the library","value":{"detail":"Your library does not have Compliance Tasks module active."}},"no_permission":{"summary":"The user lacks the permission this endpoint needs","value":{"message":"You have no permission to perform that action. If you think you should be allowed please contact your library admin"}}}}}},"404":{"description":"CCP not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}},"examples":{"not_found":{"summary":"No CCP of the library under this id","value":{"message":"CCP with id 100000000000999 does not exist"}}}}}}},"deprecated":false},"delete":{"summary":"Delete Critical Control Point","description":"Deletes a critical control point. A CCP that is still linked to a task template cannot be deleted.","operationId":"delete-ccp","parameters":[{"name":"ccp_id","in":"path","description":"The ID of the critical control point.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"CCP deleted."},"403":{"description":"Forbidden — the Tasks module is off, or the user lacks the permission needed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"module_disabled":{"summary":"The Tasks module is not enabled for the library","value":{"detail":"Your library does not have Compliance Tasks module active."}},"no_permission":{"summary":"The user lacks the permission this endpoint needs","value":{"message":"You have no permission to perform that action. If you think you should be allowed please contact your library admin"}}}}}},"404":{"description":"CCP not found.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}},"examples":{"not_found":{"summary":"No CCP of the library under this id — note the key is `detail` here, not `message` as on the other methods","value":{"detail":"CCP with id 100000000000999 does not exist"}}}}}},"409":{"description":"Conflict — the CCP is still in use.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}},"examples":{"ccp_in_use":{"summary":"A task template is built on this CCP","value":{"message":"This critical control point is used by one or more tasks and cannot be deleted."}}}}}}},"deprecated":false}},"/compliance/tasks/":{"get":{"summary":"Get Task Templates","description":"Returns the compliance task templates visible to the user, newest first. Library users see all templates of the library; outlet users see only the templates of the outlets they are connected to.","operationId":"get-task-templates","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32","default":1}},{"name":"page_size","in":"query","description":"The number of items to return per page. The maximum is 200.","schema":{"type":"integer","format":"int32","default":10}},{"name":"ordering","in":"query","description":"Order the results. The possible values are: name, type, assignee, ccp__name, created, modified. You can reverse the order by prepending \"-\" to the value.","schema":{"type":"string"}},{"name":"name","in":"query","description":"Filter on the template name (case-insensitive, partial match).","schema":{"type":"string"}},{"name":"outlet","in":"query","description":"Filter on the ID of an outlet the template is scheduled in.","schema":{"type":"string"}},{"name":"assignee","in":"query","description":"Filter on the ID of the assigned user.","schema":{"type":"string"}},{"name":"ccp","in":"query","description":"Filter on the ID of the linked critical control point.","schema":{"type":"string"}},{"name":"type","in":"query","description":"Filter on the template type slug. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types). The set is open: new values may be added without it counting as a breaking change.","schema":{"type":"string","enum":["temperature_check","checklist_task","general_task","cleaning_sanitation","order","count","packaging","maintenance","waste_management","pest_control","facility_management","stock_management","chemical_control","training","traceability_recall"]}},{"name":"active","in":"query","description":"Filter on whether the template's schedule is active.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"count":3,"next":null,"previous":null,"results":[{"id":"100000000000010","name":"Fridge temperature control","type":"temperature_check","assignee":null,"type_specific":{"ccp":{"id":"100000000000001","name":"Fridge #1","code":"CCP-01"},"temperatures":[{"key":"t1","title":"Freezer","min_temperature":-22,"max_temperature":-18},{"key":"t2","title":"Cooler","min_temperature":2,"max_temperature":7}]},"description":"Morning check","outlets":[{"id":"100000000000003","name":"Kitchen Antwerp","url":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000003/"},{"id":"100000000000004","name":"Kitchen Ghent","url":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000004/"}],"prevent_early_execution":true,"active":true,"recurrence":{"frequency":"weekly","start_date":"2026-06-01","end_date":null,"start_time":"08:00","interval":1,"weekdays":["Monday","Wednesday","Friday"],"day_of_month":null,"month_of_year":null},"attachments":[{"id":"100000000000061","file":{"url":"https://storage.apicbase.com/task_files/instruction.pdf","name":"instruction.pdf"}}],"created":"2026-06-01T08:00:00Z","modified":"2026-06-15T12:30:00Z"},{"id":"100000000000011","name":"Closing checklist","type":"checklist_task","assignee":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"type_specific":{"ccp":{"id":"100000000000002","name":"Kitchen close","code":"CCP-07"},"checklist":["Check the door seal","Wipe down the shelves","Empty the waste bins"]},"description":"Run through every item before locking up","outlets":[{"id":"100000000000003","name":"Kitchen Antwerp","url":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000003/"}],"prevent_early_execution":false,"active":true,"recurrence":{"frequency":"daily","start_date":"2026-06-01","end_date":"2026-12-31","start_time":"22:00","interval":1,"weekdays":null,"day_of_month":null,"month_of_year":null},"attachments":[],"created":"2026-06-02T09:10:00Z","modified":"2026-06-02T09:10:00Z"},{"id":"100000000000012","name":"Monthly team briefing","type":"general_task","assignee":null,"type_specific":{},"description":"","outlets":[{"id":"100000000000004","name":"Kitchen Ghent","url":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000004/"}],"prevent_early_execution":false,"active":false,"recurrence":{"frequency":"monthly","start_date":"2026-01-01","end_date":null,"start_time":"09:00","interval":1,"weekdays":null,"day_of_month":1,"month_of_year":null},"attachments":[],"created":"2026-01-05T11:00:00Z","modified":"2026-05-20T15:45:00Z"}]}}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":1,"description":"The total number of task templates."},"next":{"type":"string","nullable":true,"description":"The URL of the next page, or null on the last page."},"previous":{"type":"string","nullable":true,"description":"The URL of the previous page, or null on the first page."},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000010","description":"The ID of the task template."},"name":{"type":"string","example":"Fridge temperature control","description":"The name of the task template."},"type":{"type":"string","example":"temperature_check","description":"The template type slug. Determines the contents of type_specific. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types). The set is open: new values may be added without it counting as a breaking change."},"assignee":{"type":"object","nullable":true,"description":"The user the task is assigned to.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"type_specific":{"type":"object","description":"Type-dependent template definitions. The keys present depend on the template type. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types).","properties":{"ccp":{"type":"object","description":"The linked critical control point. Present for every template type except `general_task`, `order` and `count`.","properties":{"id":{"type":"string","example":"100000000000001","description":"The ID of the critical control point."},"name":{"type":"string","example":"Fridge #1","description":"The name of the critical control point (CCP)."},"code":{"type":"string","example":"CCP-01","description":"A short code identifying the CCP. Can be empty."}}},"temperatures":{"type":"array","description":"Temperature check definitions. Present for temperature_check templates only.","items":{"type":"object","properties":{"key":{"type":"string","example":"t1","description":"The internal key used to match entered values against this definition."},"title":{"type":"string","example":"Freezer","description":"The label of the temperature measurement point."},"min_temperature":{"type":"number","example":-22,"description":"The lowest allowed temperature for the measurement."},"max_temperature":{"type":"number","example":-18,"description":"The highest allowed temperature for the measurement."}}}},"checklist":{"type":"array","description":"The checklist item labels. Present for checklist_task templates only.","items":{"type":"string","example":"Check the door seal"}}}},"description":{"type":"string","example":"Morning check","description":"The description of the task template. Can be empty."},"outlets":{"type":"array","description":"The outlets the template is scheduled in.","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000003","description":"The ID of the outlet."},"name":{"type":"string","example":"Kitchen Antwerp","description":"The name of the outlet."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000003/","description":"The URL of the outlet's detail endpoint."}}}},"prevent_early_execution":{"type":"boolean","example":true,"description":"Whether the task cannot be completed before its scheduled day."},"active":{"type":"boolean","example":true,"description":"Whether the template's schedule is enabled."},"recurrence":{"type":"object","description":"The template's schedule. All keys are always present; keys that do not apply to the frequency are null.","properties":{"frequency":{"type":"string","enum":["once","daily","weekly","monthly","yearly"],"example":"weekly","description":"How often the task repeats. See [Recurrence](https://developers.apicbase.com/docs/compliance-task-reference-values#recurrence)."},"start_date":{"type":"string","format":"date","example":"2026-06-01","description":"The first day of the schedule, in ISO 8601 `YYYY-MM-DD` format."},"end_date":{"type":"string","format":"date","nullable":true,"description":"The last day of the schedule, or null when it repeats indefinitely. Always null for frequency once."},"start_time":{"type":"string","nullable":true,"example":"08:00","description":"The time of day the task is due, in `HH:MM` format."},"interval":{"type":"integer","nullable":true,"example":1,"description":"The repeat interval, e.g. 2 with frequency weekly means every two weeks."},"weekdays":{"type":"array","nullable":true,"description":"The days of the week the task repeats on. Only set for frequency weekly, null otherwise.","items":{"type":"string","enum":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"example":"Monday"}},"day_of_month":{"type":"integer","nullable":true,"description":"The day of the month the task repeats on. Only set for frequency monthly and yearly, null otherwise."},"month_of_year":{"type":"integer","nullable":true,"description":"The month the task repeats in (1-12). Only set for frequency yearly, null otherwise."}}},"attachments":{"type":"array","description":"Instruction files attached to the template.","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000061","description":"The ID of the attachment."},"file":{"type":"object","properties":{"url":{"type":"string","example":"https://storage.apicbase.com/task_files/instruction.pdf","description":"The download URL of the attachment file."},"name":{"type":"string","example":"instruction.pdf","description":"The file name of the attachment."}},"description":"The attached file, with its name and download URL."}}}},"created":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-01T08:00:00Z","description":"When the template was created."},"modified":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-15T12:30:00Z","description":"When the template was last modified."}}},"description":"The array of results for the current page."}}}}}},"400":{"description":"Invalid filter or pagination parameters."},"403":{"description":"User lacks permission to view the tasks dashboard."}},"deprecated":false},"post":{"summary":"Create Task Template","description":"Creates a compliance task template and schedules it in every listed outlet.","operationId":"create-task-template","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","type","outlets","recurrence"],"properties":{"name":{"type":"string","maxLength":150,"example":"Fridge temperature control","description":"The name of the task template."},"description":{"type":"string","example":"Morning check","description":"The description of the task template. Defaults to an empty string."},"type":{"type":"string","enum":["temperature_check","checklist_task","general_task","cleaning_sanitation","order","count","packaging","maintenance","waste_management","pest_control","facility_management","stock_management","chemical_control","training","traceability_recall"],"example":"temperature_check","description":"The template type slug. It decides which keys `type_specific` holds. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types). The set is open: new values may be added without it counting as a breaking change."},"outlets":{"type":"array","minItems":1,"description":"The IDs of the outlets to schedule the task in. An outlet may not be listed twice. Outlet users can only list outlets they are connected to; the outlets of the template they have no access to are kept as they are.","items":{"type":"string","example":"100000000000003"}},"assignee":{"type":"string","nullable":true,"example":"100000000000045","description":"The ID of the user the task is assigned to. Only accepted when the task is scheduled in a single outlet — a template spanning several outlets cannot carry an assignee. An outlet user has to have access to that outlet."},"prevent_early_execution":{"type":"boolean","example":true,"description":"Whether the task cannot be completed before its scheduled day. Defaults to true."},"active":{"type":"boolean","example":true,"description":"Whether the schedule is enabled. Defaults to true."},"recurrence":{"type":"object","required":["frequency","start_date","start_time"],"description":"The schedule of the template. It is written as a whole: a request that touches it carries every key its frequency requires.","properties":{"frequency":{"type":"string","enum":["once","daily","weekly","monthly","yearly"],"example":"weekly","description":"How often the task repeats. It decides which of the other keys apply. See [Recurrence](https://developers.apicbase.com/docs/compliance-task-reference-values#recurrence)."},"start_date":{"type":"string","format":"date","example":"2026-09-01","description":"The first day of the schedule, in ISO 8601 `YYYY-MM-DD` format. It may not be earlier than yesterday (UTC)."},"start_time":{"type":"string","example":"08:00","description":"The time of day the task is due, in `HH:MM` format."},"end_date":{"type":"string","format":"date","nullable":true,"example":"2026-12-31","description":"The last day of the schedule, or null to repeat indefinitely. Not applicable to frequency once."},"interval":{"type":"integer","minimum":1,"nullable":true,"example":2,"description":"The repeat interval, e.g. 2 with frequency weekly means every two weeks. Frequencies once and daily accept only 1. Defaults to 1."},"weekdays":{"type":"array","nullable":true,"minItems":1,"description":"The days of the week the task repeats on. Required for frequency weekly, not applicable to the others.","items":{"type":"string","enum":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"example":"Monday"}},"day_of_month":{"type":"integer","minimum":1,"maximum":31,"nullable":true,"example":1,"description":"The day of the month the task repeats on. Required for frequencies monthly and yearly, not applicable to the others."},"month_of_year":{"type":"integer","minimum":1,"maximum":12,"nullable":true,"example":3,"description":"The month the task repeats in. Required for frequency yearly, not applicable to the others."}}},"type_specific":{"type":"object","description":"The type-dependent definitions of the template. Which keys apply — and which of them are required — is decided by `type`. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types).","properties":{"ccp":{"type":"string","example":"100000000000001","description":"The ID of the critical control point to link. Required for every type except general_task, order and count, which accept no ccp at all."},"temperatures":{"type":"array","minItems":1,"description":"The temperature ranges to measure. Required for temperature_check templates, not applicable to the other types.","items":{"type":"object","required":["key","title","min_temperature","max_temperature"],"properties":{"key":{"type":"string","maxLength":150,"example":"t1","description":"The key entered values are matched against this range by."},"title":{"type":"string","maxLength":150,"example":"Freezer","description":"The label of the measurement point."},"min_temperature":{"type":"number","example":-22,"description":"The lowest allowed temperature. It may not be greater than max_temperature."},"max_temperature":{"type":"number","example":-18,"description":"The highest allowed temperature."}}}},"checklist":{"type":"array","minItems":1,"description":"The checklist item labels. Required for checklist_task templates, not applicable to the other types.","items":{"type":"string","maxLength":255,"example":"Check the door seal"}}}}}},"examples":{"Request Example":{"value":{"name":"Fridge temperature control","description":"Morning check","type":"temperature_check","outlets":["100000000000003","100000000000004"],"assignee":"100000000000045","prevent_early_execution":true,"active":true,"recurrence":{"frequency":"weekly","start_date":"2026-09-01","start_time":"08:00","interval":1,"weekdays":["Monday","Wednesday","Friday"]},"type_specific":{"ccp":"100000000000001","temperatures":[{"key":"t1","title":"Freezer","min_temperature":-22,"max_temperature":-18},{"key":"t2","title":"Cooler","min_temperature":2,"max_temperature":7}]}}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":{"id":"100000000000010","name":"Fridge temperature control","type":"temperature_check","assignee":null,"type_specific":{"ccp":{"id":"100000000000001","name":"Fridge #1","code":"CCP-01"},"temperatures":[{"key":"t1","title":"Freezer","min_temperature":-22,"max_temperature":-18},{"key":"t2","title":"Cooler","min_temperature":2,"max_temperature":7}]},"description":"Morning check","outlets":[{"id":"100000000000003","name":"Kitchen Antwerp","url":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000003/"},{"id":"100000000000004","name":"Kitchen Ghent","url":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000004/"}],"prevent_early_execution":true,"active":true,"recurrence":{"frequency":"weekly","start_date":"2026-06-01","end_date":null,"start_time":"08:00","interval":1,"weekdays":["Monday","Wednesday","Friday"],"day_of_month":null,"month_of_year":null},"attachments":[{"id":"100000000000061","file":{"url":"https://storage.apicbase.com/task_files/instruction.pdf","name":"instruction.pdf"}}],"created":"2026-06-01T08:00:00Z","modified":"2026-06-15T12:30:00Z"}},"Checklist task":{"value":{"id":"100000000000011","name":"Closing checklist","type":"checklist_task","assignee":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"type_specific":{"ccp":{"id":"100000000000002","name":"Kitchen close","code":"CCP-07"},"checklist":["Check the door seal","Wipe down the shelves","Empty the waste bins"]},"description":"Run through every item before locking up","outlets":[{"id":"100000000000003","name":"Kitchen Antwerp","url":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000003/"}],"prevent_early_execution":false,"active":true,"recurrence":{"frequency":"daily","start_date":"2026-06-01","end_date":"2026-12-31","start_time":"22:00","interval":1,"weekdays":null,"day_of_month":null,"month_of_year":null},"attachments":[],"created":"2026-06-02T09:10:00Z","modified":"2026-06-02T09:10:00Z"}},"General task":{"value":{"id":"100000000000012","name":"Monthly team briefing","type":"general_task","assignee":null,"type_specific":{},"description":"","outlets":[{"id":"100000000000004","name":"Kitchen Ghent","url":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000004/"}],"prevent_early_execution":false,"active":false,"recurrence":{"frequency":"monthly","start_date":"2026-01-01","end_date":null,"start_time":"09:00","interval":1,"weekdays":null,"day_of_month":1,"month_of_year":null},"attachments":[],"created":"2026-01-05T11:00:00Z","modified":"2026-05-20T15:45:00Z"}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"100000000000010","description":"The ID of the task template."},"name":{"type":"string","example":"Fridge temperature control","description":"The name of the task template."},"type":{"type":"string","example":"temperature_check","description":"The template type slug. Determines the contents of type_specific. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types). The set is open: new values may be added without it counting as a breaking change."},"assignee":{"type":"object","nullable":true,"description":"The user the task is assigned to.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"type_specific":{"type":"object","description":"Type-dependent template definitions. The keys present depend on the template type. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types).","properties":{"ccp":{"type":"object","description":"The linked critical control point. Present for every template type except `general_task`, `order` and `count`.","properties":{"id":{"type":"string","example":"100000000000001","description":"The ID of the critical control point."},"name":{"type":"string","example":"Fridge #1","description":"The name of the critical control point (CCP)."},"code":{"type":"string","example":"CCP-01","description":"A short code identifying the CCP. Can be empty."}}},"temperatures":{"type":"array","description":"Temperature check definitions. Present for temperature_check templates only.","items":{"type":"object","properties":{"key":{"type":"string","example":"t1","description":"The internal key used to match entered values against this definition."},"title":{"type":"string","example":"Freezer","description":"The label of the temperature measurement point."},"min_temperature":{"type":"number","example":-22,"description":"The lowest allowed temperature for the measurement."},"max_temperature":{"type":"number","example":-18,"description":"The highest allowed temperature for the measurement."}}}},"checklist":{"type":"array","description":"The checklist item labels. Present for checklist_task templates only.","items":{"type":"string","example":"Check the door seal"}}}},"description":{"type":"string","example":"Morning check","description":"The description of the task template. Can be empty."},"outlets":{"type":"array","description":"The outlets the template is scheduled in.","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000003","description":"The ID of the outlet."},"name":{"type":"string","example":"Kitchen Antwerp","description":"The name of the outlet."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000003/","description":"The URL of the outlet's detail endpoint."}}}},"prevent_early_execution":{"type":"boolean","example":true,"description":"Whether the task cannot be completed before its scheduled day."},"active":{"type":"boolean","example":true,"description":"Whether the template's schedule is enabled."},"recurrence":{"type":"object","description":"The template's schedule. All keys are always present; keys that do not apply to the frequency are null.","properties":{"frequency":{"type":"string","enum":["once","daily","weekly","monthly","yearly"],"example":"weekly","description":"How often the task repeats. See [Recurrence](https://developers.apicbase.com/docs/compliance-task-reference-values#recurrence)."},"start_date":{"type":"string","format":"date","example":"2026-06-01","description":"The first day of the schedule, in ISO 8601 `YYYY-MM-DD` format."},"end_date":{"type":"string","format":"date","nullable":true,"description":"The last day of the schedule, or null when it repeats indefinitely. Always null for frequency once."},"start_time":{"type":"string","nullable":true,"example":"08:00","description":"The time of day the task is due, in `HH:MM` format."},"interval":{"type":"integer","nullable":true,"example":1,"description":"The repeat interval, e.g. 2 with frequency weekly means every two weeks."},"weekdays":{"type":"array","nullable":true,"description":"The days of the week the task repeats on. Only set for frequency weekly, null otherwise.","items":{"type":"string","enum":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"example":"Monday"}},"day_of_month":{"type":"integer","nullable":true,"description":"The day of the month the task repeats on. Only set for frequency monthly and yearly, null otherwise."},"month_of_year":{"type":"integer","nullable":true,"description":"The month the task repeats in (1-12). Only set for frequency yearly, null otherwise."}}},"attachments":{"type":"array","description":"Instruction files attached to the template.","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000061","description":"The ID of the attachment."},"file":{"type":"object","properties":{"url":{"type":"string","example":"https://storage.apicbase.com/task_files/instruction.pdf","description":"The download URL of the attachment file."},"name":{"type":"string","example":"instruction.pdf","description":"The file name of the attachment."}},"description":"The attached file, with its name and download URL."}}}},"created":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-01T08:00:00Z","description":"When the template was created."},"modified":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-15T12:30:00Z","description":"When the template was last modified."}}}}}},"400":{"description":"Bad request — the payload failed validation, or a schedule rule refused it.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"string"}}],"description":"Field errors are keyed by field name, nested for `recurrence` and `type_specific`. A rule the write service refuses comes back as a bare list of messages instead."},"examples":{"missing_field":{"summary":"A required field was left out","value":{"name":["This field is required."]}},"unknown_outlet":{"summary":"An error on one element of a list, keyed by its index","value":{"outlets":{"0":["Invalid id \"100000000000999\" - outlet does not exist."]}}},"type_specific_not_applicable":{"summary":"Data the template type does not carry","value":{"type_specific":{"checklist":"Not applicable to this task type."}}},"end_date_before_the_start":{"summary":"A rule refused by the write service, returned as a bare list","value":["End date must be greater than or equal to start date"]}}}}},"403":{"description":"Forbidden — the Tasks module is off, or the user cannot manage compliance tasks.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"module_disabled":{"summary":"The Tasks module is not enabled for the library","value":{"detail":"Your library does not have Compliance Tasks module active."}},"no_task_permission":{"summary":"The user may not manage compliance tasks (per outlet for an outlet user)","value":{"message":"You have no permission to perform that action. If you think you should be allowed please contact your library admin"}}}}}}},"deprecated":false}},"/compliance/tasks/{template_id}/":{"get":{"summary":"Get Task Template Details","description":"Returns information about a specific compliance task template, in its current version.","operationId":"get-task-template-details","parameters":[{"name":"template_id","in":"path","description":"The ID of the task template.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"id":"100000000000010","name":"Fridge temperature control","type":"temperature_check","assignee":null,"type_specific":{"ccp":{"id":"100000000000001","name":"Fridge #1","code":"CCP-01"},"temperatures":[{"key":"t1","title":"Freezer","min_temperature":-22,"max_temperature":-18},{"key":"t2","title":"Cooler","min_temperature":2,"max_temperature":7}]},"description":"Morning check","outlets":[{"id":"100000000000003","name":"Kitchen Antwerp","url":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000003/"},{"id":"100000000000004","name":"Kitchen Ghent","url":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000004/"}],"prevent_early_execution":true,"active":true,"recurrence":{"frequency":"weekly","start_date":"2026-06-01","end_date":null,"start_time":"08:00","interval":1,"weekdays":["Monday","Wednesday","Friday"],"day_of_month":null,"month_of_year":null},"attachments":[{"id":"100000000000061","file":{"url":"https://storage.apicbase.com/task_files/instruction.pdf","name":"instruction.pdf"}}],"created":"2026-06-01T08:00:00Z","modified":"2026-06-15T12:30:00Z"}},"Checklist task":{"value":{"id":"100000000000011","name":"Closing checklist","type":"checklist_task","assignee":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"type_specific":{"ccp":{"id":"100000000000002","name":"Kitchen close","code":"CCP-07"},"checklist":["Check the door seal","Wipe down the shelves","Empty the waste bins"]},"description":"Run through every item before locking up","outlets":[{"id":"100000000000003","name":"Kitchen Antwerp","url":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000003/"}],"prevent_early_execution":false,"active":true,"recurrence":{"frequency":"daily","start_date":"2026-06-01","end_date":"2026-12-31","start_time":"22:00","interval":1,"weekdays":null,"day_of_month":null,"month_of_year":null},"attachments":[],"created":"2026-06-02T09:10:00Z","modified":"2026-06-02T09:10:00Z"}},"General task":{"value":{"id":"100000000000012","name":"Monthly team briefing","type":"general_task","assignee":null,"type_specific":{},"description":"","outlets":[{"id":"100000000000004","name":"Kitchen Ghent","url":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000004/"}],"prevent_early_execution":false,"active":false,"recurrence":{"frequency":"monthly","start_date":"2026-01-01","end_date":null,"start_time":"09:00","interval":1,"weekdays":null,"day_of_month":1,"month_of_year":null},"attachments":[],"created":"2026-01-05T11:00:00Z","modified":"2026-05-20T15:45:00Z"}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"100000000000010","description":"The ID of the task template."},"name":{"type":"string","example":"Fridge temperature control","description":"The name of the task template."},"type":{"type":"string","example":"temperature_check","description":"The template type slug. Determines the contents of type_specific. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types). The set is open: new values may be added without it counting as a breaking change."},"assignee":{"type":"object","nullable":true,"description":"The user the task is assigned to.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"type_specific":{"type":"object","description":"Type-dependent template definitions. The keys present depend on the template type. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types).","properties":{"ccp":{"type":"object","description":"The linked critical control point. Present for every template type except `general_task`, `order` and `count`.","properties":{"id":{"type":"string","example":"100000000000001","description":"The ID of the critical control point."},"name":{"type":"string","example":"Fridge #1","description":"The name of the critical control point (CCP)."},"code":{"type":"string","example":"CCP-01","description":"A short code identifying the CCP. Can be empty."}}},"temperatures":{"type":"array","description":"Temperature check definitions. Present for temperature_check templates only.","items":{"type":"object","properties":{"key":{"type":"string","example":"t1","description":"The internal key used to match entered values against this definition."},"title":{"type":"string","example":"Freezer","description":"The label of the temperature measurement point."},"min_temperature":{"type":"number","example":-22,"description":"The lowest allowed temperature for the measurement."},"max_temperature":{"type":"number","example":-18,"description":"The highest allowed temperature for the measurement."}}}},"checklist":{"type":"array","description":"The checklist item labels. Present for checklist_task templates only.","items":{"type":"string","example":"Check the door seal"}}}},"description":{"type":"string","example":"Morning check","description":"The description of the task template. Can be empty."},"outlets":{"type":"array","description":"The outlets the template is scheduled in.","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000003","description":"The ID of the outlet."},"name":{"type":"string","example":"Kitchen Antwerp","description":"The name of the outlet."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000003/","description":"The URL of the outlet's detail endpoint."}}}},"prevent_early_execution":{"type":"boolean","example":true,"description":"Whether the task cannot be completed before its scheduled day."},"active":{"type":"boolean","example":true,"description":"Whether the template's schedule is enabled."},"recurrence":{"type":"object","description":"The template's schedule. All keys are always present; keys that do not apply to the frequency are null.","properties":{"frequency":{"type":"string","enum":["once","daily","weekly","monthly","yearly"],"example":"weekly","description":"How often the task repeats. See [Recurrence](https://developers.apicbase.com/docs/compliance-task-reference-values#recurrence)."},"start_date":{"type":"string","format":"date","example":"2026-06-01","description":"The first day of the schedule, in ISO 8601 `YYYY-MM-DD` format."},"end_date":{"type":"string","format":"date","nullable":true,"description":"The last day of the schedule, or null when it repeats indefinitely. Always null for frequency once."},"start_time":{"type":"string","nullable":true,"example":"08:00","description":"The time of day the task is due, in `HH:MM` format."},"interval":{"type":"integer","nullable":true,"example":1,"description":"The repeat interval, e.g. 2 with frequency weekly means every two weeks."},"weekdays":{"type":"array","nullable":true,"description":"The days of the week the task repeats on. Only set for frequency weekly, null otherwise.","items":{"type":"string","enum":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"example":"Monday"}},"day_of_month":{"type":"integer","nullable":true,"description":"The day of the month the task repeats on. Only set for frequency monthly and yearly, null otherwise."},"month_of_year":{"type":"integer","nullable":true,"description":"The month the task repeats in (1-12). Only set for frequency yearly, null otherwise."}}},"attachments":{"type":"array","description":"Instruction files attached to the template.","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000061","description":"The ID of the attachment."},"file":{"type":"object","properties":{"url":{"type":"string","example":"https://storage.apicbase.com/task_files/instruction.pdf","description":"The download URL of the attachment file."},"name":{"type":"string","example":"instruction.pdf","description":"The file name of the attachment."}},"description":"The attached file, with its name and download URL."}}}},"created":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-01T08:00:00Z","description":"When the template was created."},"modified":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-15T12:30:00Z","description":"When the template was last modified."}}}}}},"403":{"description":"User lacks permission to view the tasks dashboard."},"404":{"description":"Template not found."}},"deprecated":false},"patch":{"summary":"Update Task Template","description":"Edits an existing compliance task template. A field left out keeps the value the template already holds; the schedule is the exception and is rewritten as a whole.","operationId":"update-task-template","parameters":[{"name":"template_id","in":"path","description":"The ID of the task template.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":150,"example":"Fridge temperature control","description":"The name of the task template."},"description":{"type":"string","example":"Morning check","description":"The description of the task template."},"outlets":{"type":"array","minItems":1,"description":"The IDs of the outlets to schedule the task in. Outlet users can only list outlets they are connected to; the outlets of the template they have no access to are kept as they are.","items":{"type":"string","example":"100000000000003"}},"assignee":{"type":"string","nullable":true,"example":"100000000000045","description":"The ID of the user the task is assigned to. Only accepted when the task is scheduled in a single outlet — a template spanning several outlets cannot carry an assignee. An outlet user has to have access to that outlet."},"prevent_early_execution":{"type":"boolean","example":true,"description":"Whether the task cannot be completed before its scheduled day."},"active":{"type":"boolean","example":true,"description":"Whether the schedule is enabled."},"recurrence":{"type":"object","required":["frequency"],"description":"The schedule of the template. It is written as a whole: a request that touches it carries every key its frequency requires.","properties":{"frequency":{"type":"string","enum":["once","daily","weekly","monthly","yearly"],"example":"weekly","description":"How often the task repeats. It decides which of the other keys apply. See [Recurrence](https://developers.apicbase.com/docs/compliance-task-reference-values#recurrence)."},"start_date":{"type":"string","format":"date","example":"2026-09-01","description":"The first day of the schedule, in ISO 8601 `YYYY-MM-DD` format. Left out, the schedule being replaced keeps its start date. It can only be moved while the template is inactive, or while its current start date is still today or later — once an active template's schedule has begun, its start date is fixed. Where moving it is allowed, the new date may not be in the past."},"start_time":{"type":"string","example":"08:00","description":"The time of day the task is due, in `HH:MM` format. Left out, the schedule being replaced keeps its start time."},"end_date":{"type":"string","format":"date","nullable":true,"example":"2026-12-31","description":"The last day of the schedule, or null to repeat indefinitely. Not applicable to frequency once."},"interval":{"type":"integer","minimum":1,"nullable":true,"example":2,"description":"The repeat interval, e.g. 2 with frequency weekly means every two weeks. Frequencies once and daily accept only 1. Defaults to 1."},"weekdays":{"type":"array","nullable":true,"minItems":1,"description":"The days of the week the task repeats on. Required for frequency weekly, not applicable to the others.","items":{"type":"string","enum":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"example":"Monday"}},"day_of_month":{"type":"integer","minimum":1,"maximum":31,"nullable":true,"example":1,"description":"The day of the month the task repeats on. Required for frequencies monthly and yearly, not applicable to the others."},"month_of_year":{"type":"integer","minimum":1,"maximum":12,"nullable":true,"example":3,"description":"The month the task repeats in. Required for frequency yearly, not applicable to the others."}}},"type_specific":{"type":"object","description":"The type-dependent definitions of the template. Which keys apply — and which of them are required — is decided by `type`. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types).","properties":{"ccp":{"type":"string","example":"100000000000001","description":"The ID of the critical control point to link. Required for every type except general_task, order and count, which accept no ccp at all."},"temperatures":{"type":"array","minItems":1,"description":"The temperature ranges to measure. Required for temperature_check templates, not applicable to the other types.","items":{"type":"object","required":["key","title","min_temperature","max_temperature"],"properties":{"key":{"type":"string","maxLength":150,"example":"t1","description":"The key entered values are matched against this range by."},"title":{"type":"string","maxLength":150,"example":"Freezer","description":"The label of the measurement point."},"min_temperature":{"type":"number","example":-22,"description":"The lowest allowed temperature. It may not be greater than max_temperature."},"max_temperature":{"type":"number","example":-18,"description":"The highest allowed temperature."}}}},"checklist":{"type":"array","minItems":1,"description":"The checklist item labels. Required for checklist_task templates, not applicable to the other types.","items":{"type":"string","maxLength":255,"example":"Check the door seal"}}}}}},"examples":{"Request Example":{"value":{"name":"Fridge temperature control (morning)","assignee":null,"recurrence":{"frequency":"weekly","interval":1,"weekdays":["Monday","Thursday"]}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"id":"100000000000010","name":"Fridge temperature control","type":"temperature_check","assignee":null,"type_specific":{"ccp":{"id":"100000000000001","name":"Fridge #1","code":"CCP-01"},"temperatures":[{"key":"t1","title":"Freezer","min_temperature":-22,"max_temperature":-18},{"key":"t2","title":"Cooler","min_temperature":2,"max_temperature":7}]},"description":"Morning check","outlets":[{"id":"100000000000003","name":"Kitchen Antwerp","url":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000003/"},{"id":"100000000000004","name":"Kitchen Ghent","url":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000004/"}],"prevent_early_execution":true,"active":true,"recurrence":{"frequency":"weekly","start_date":"2026-06-01","end_date":null,"start_time":"08:00","interval":1,"weekdays":["Monday","Wednesday","Friday"],"day_of_month":null,"month_of_year":null},"attachments":[{"id":"100000000000061","file":{"url":"https://storage.apicbase.com/task_files/instruction.pdf","name":"instruction.pdf"}}],"created":"2026-06-01T08:00:00Z","modified":"2026-06-15T12:30:00Z"}},"Checklist task":{"value":{"id":"100000000000011","name":"Closing checklist","type":"checklist_task","assignee":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"type_specific":{"ccp":{"id":"100000000000002","name":"Kitchen close","code":"CCP-07"},"checklist":["Check the door seal","Wipe down the shelves","Empty the waste bins"]},"description":"Run through every item before locking up","outlets":[{"id":"100000000000003","name":"Kitchen Antwerp","url":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000003/"}],"prevent_early_execution":false,"active":true,"recurrence":{"frequency":"daily","start_date":"2026-06-01","end_date":"2026-12-31","start_time":"22:00","interval":1,"weekdays":null,"day_of_month":null,"month_of_year":null},"attachments":[],"created":"2026-06-02T09:10:00Z","modified":"2026-06-02T09:10:00Z"}},"General task":{"value":{"id":"100000000000012","name":"Monthly team briefing","type":"general_task","assignee":null,"type_specific":{},"description":"","outlets":[{"id":"100000000000004","name":"Kitchen Ghent","url":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000004/"}],"prevent_early_execution":false,"active":false,"recurrence":{"frequency":"monthly","start_date":"2026-01-01","end_date":null,"start_time":"09:00","interval":1,"weekdays":null,"day_of_month":1,"month_of_year":null},"attachments":[],"created":"2026-01-05T11:00:00Z","modified":"2026-05-20T15:45:00Z"}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"100000000000010","description":"The ID of the task template."},"name":{"type":"string","example":"Fridge temperature control","description":"The name of the task template."},"type":{"type":"string","example":"temperature_check","description":"The template type slug. Determines the contents of type_specific. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types). The set is open: new values may be added without it counting as a breaking change."},"assignee":{"type":"object","nullable":true,"description":"The user the task is assigned to.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"type_specific":{"type":"object","description":"Type-dependent template definitions. The keys present depend on the template type. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types).","properties":{"ccp":{"type":"object","description":"The linked critical control point. Present for every template type except `general_task`, `order` and `count`.","properties":{"id":{"type":"string","example":"100000000000001","description":"The ID of the critical control point."},"name":{"type":"string","example":"Fridge #1","description":"The name of the critical control point (CCP)."},"code":{"type":"string","example":"CCP-01","description":"A short code identifying the CCP. Can be empty."}}},"temperatures":{"type":"array","description":"Temperature check definitions. Present for temperature_check templates only.","items":{"type":"object","properties":{"key":{"type":"string","example":"t1","description":"The internal key used to match entered values against this definition."},"title":{"type":"string","example":"Freezer","description":"The label of the temperature measurement point."},"min_temperature":{"type":"number","example":-22,"description":"The lowest allowed temperature for the measurement."},"max_temperature":{"type":"number","example":-18,"description":"The highest allowed temperature for the measurement."}}}},"checklist":{"type":"array","description":"The checklist item labels. Present for checklist_task templates only.","items":{"type":"string","example":"Check the door seal"}}}},"description":{"type":"string","example":"Morning check","description":"The description of the task template. Can be empty."},"outlets":{"type":"array","description":"The outlets the template is scheduled in.","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000003","description":"The ID of the outlet."},"name":{"type":"string","example":"Kitchen Antwerp","description":"The name of the outlet."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/100000000000003/","description":"The URL of the outlet's detail endpoint."}}}},"prevent_early_execution":{"type":"boolean","example":true,"description":"Whether the task cannot be completed before its scheduled day."},"active":{"type":"boolean","example":true,"description":"Whether the template's schedule is enabled."},"recurrence":{"type":"object","description":"The template's schedule. All keys are always present; keys that do not apply to the frequency are null.","properties":{"frequency":{"type":"string","enum":["once","daily","weekly","monthly","yearly"],"example":"weekly","description":"How often the task repeats. See [Recurrence](https://developers.apicbase.com/docs/compliance-task-reference-values#recurrence)."},"start_date":{"type":"string","format":"date","example":"2026-06-01","description":"The first day of the schedule, in ISO 8601 `YYYY-MM-DD` format."},"end_date":{"type":"string","format":"date","nullable":true,"description":"The last day of the schedule, or null when it repeats indefinitely. Always null for frequency once."},"start_time":{"type":"string","nullable":true,"example":"08:00","description":"The time of day the task is due, in `HH:MM` format."},"interval":{"type":"integer","nullable":true,"example":1,"description":"The repeat interval, e.g. 2 with frequency weekly means every two weeks."},"weekdays":{"type":"array","nullable":true,"description":"The days of the week the task repeats on. Only set for frequency weekly, null otherwise.","items":{"type":"string","enum":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"example":"Monday"}},"day_of_month":{"type":"integer","nullable":true,"description":"The day of the month the task repeats on. Only set for frequency monthly and yearly, null otherwise."},"month_of_year":{"type":"integer","nullable":true,"description":"The month the task repeats in (1-12). Only set for frequency yearly, null otherwise."}}},"attachments":{"type":"array","description":"Instruction files attached to the template.","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000061","description":"The ID of the attachment."},"file":{"type":"object","properties":{"url":{"type":"string","example":"https://storage.apicbase.com/task_files/instruction.pdf","description":"The download URL of the attachment file."},"name":{"type":"string","example":"instruction.pdf","description":"The file name of the attachment."}},"description":"The attached file, with its name and download URL."}}}},"created":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-01T08:00:00Z","description":"When the template was created."},"modified":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-15T12:30:00Z","description":"When the template was last modified."}}}}}},"400":{"description":"Bad request — the payload failed validation, or a schedule rule refused it.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"string"}}],"description":"Field errors are keyed by field name, nested for `recurrence` and `type_specific`. A rule the write service refuses comes back as a bare list of messages instead."},"examples":{"type_changed":{"summary":"The task type of an existing template cannot change","value":{"type":["The task type of an existing template cannot be changed."]}},"start_date_of_a_running_schedule":{"summary":"The start date of an active template that has already begun is fixed","value":{"recurrence":{"start_date":["Cannot change start date for an active template."]}}},"end_date_before_the_start":{"summary":"A rule refused by the write service, returned as a bare list","value":["End date must be greater than or equal to start date"]}}}}},"403":{"description":"Forbidden — the Tasks module is off, or the user cannot manage compliance tasks.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"module_disabled":{"summary":"The Tasks module is not enabled for the library","value":{"detail":"Your library does not have Compliance Tasks module active."}},"no_task_permission":{"summary":"The user may not manage compliance tasks (per outlet for an outlet user)","value":{"message":"You have no permission to perform that action. If you think you should be allowed please contact your library admin"}}}}}},"404":{"description":"Template not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}},"examples":{"not_found":{"summary":"No current version under this id","value":{"message":"Template not found."}}}}}},"409":{"description":"Conflict — another request holds the lock on the template's schedule.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}},"examples":{"schedule_locked":{"summary":"The schedule is being written by another request","value":{"detail":"This task is currently being modified. Please try again."}}}}}}},"deprecated":false}},"/compliance/tasks/{template_id}/attachments/":{"post":{"summary":"Add Task Template Attachment","description":"Attaches an instruction file to a compliance task template. Writes a new version of the template; the template's own ID does not change, and neither do the IDs of the attachments it already carries.","operationId":"add-task-template-attachment","parameters":[{"name":"template_id","in":"path","description":"The ID of the task template.","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"The file to attach. At most 4 MB, and one of the accepted types: PDF, Word, Excel, plain text, CSV or an image."}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":{"id":"100000000000061","file":{"url":"https://storage.apicbase.com/task_files/instruction.pdf","name":"instruction.pdf"}}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"100000000000061","description":"The ID of the attachment."},"file":{"type":"object","description":"The attached file, with its name and download URL.","properties":{"url":{"type":"string","example":"https://storage.apicbase.com/task_files/instruction.pdf","description":"The download URL of the attachment file."},"name":{"type":"string","example":"instruction.pdf","description":"The file name of the attachment."}}}}}}}},"400":{"description":"Bad request — the uploaded file was refused.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Field errors keyed by field name."},"examples":{"no_file":{"summary":"The request carries no file part","value":{"file":["No file was submitted."]}},"too_large":{"summary":"The file is over the 4 MB limit","value":{"file":["The file cannot be larger than 4 MB."]}},"extension_not_allowed":{"summary":"The file type is not one of the accepted ones — the message itself lists them","value":{"file":["File extension “exe” is not allowed."]}}}}}},"403":{"description":"Forbidden — the Tasks module is off, or the user lacks the permission needed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"module_disabled":{"summary":"The Tasks module is not enabled for the library","value":{"detail":"Your library does not have Compliance Tasks module active."}},"no_permission":{"summary":"The user may not manage compliance tasks (per outlet for an outlet user)","value":{"message":"You have no permission to perform that action. If you think you should be allowed please contact your library admin"}}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"template_not_found":{"summary":"No current version under this id","value":{"message":"Template not found."}}}}}},"409":{"description":"Conflict — another request is writing the same task.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"description":"Nothing is written, so the same request can simply be sent again."},"examples":{"locked":{"summary":"The template's schedule is being written by another request","value":{"detail":"This task is currently being modified. Please try again."}}}}}}},"deprecated":false}},"/compliance/tasks/{template_id}/attachments/{attachment_id}/":{"delete":{"summary":"Delete Task Template Attachment","description":"Detaches an instruction file from a compliance task template. Writes a new version of the template. The file itself is kept, so the versions that carried it — and the occurrences completed under them — keep their link to it.","operationId":"delete-task-template-attachment","parameters":[{"name":"template_id","in":"path","description":"The ID of the task template.","schema":{"type":"string"},"required":true},{"name":"attachment_id","in":"path","description":"The ID of the attachment, as returned in the `attachments` list.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"Attachment detached."},"403":{"description":"Forbidden — the Tasks module is off, or the user lacks the permission needed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"module_disabled":{"summary":"The Tasks module is not enabled for the library","value":{"detail":"Your library does not have Compliance Tasks module active."}},"no_permission":{"summary":"The user may not manage compliance tasks (per outlet for an outlet user)","value":{"message":"You have no permission to perform that action. If you think you should be allowed please contact your library admin"}}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"template_not_found":{"summary":"No current version under this id","value":{"message":"Template not found."}},"attachment_not_found":{"summary":"The attachment is not one of this template's — an attachment of another task is not found here either","value":{"detail":"Attachment not found."}}}}}},"409":{"description":"Conflict — another request is writing the same task.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"description":"Nothing is written, so the same request can simply be sent again."},"examples":{"locked":{"summary":"The template's schedule is being written by another request","value":{"detail":"This task is currently being modified. Please try again."}}}}}}},"deprecated":false}},"/compliance/tasks/custom_fields/":{"get":{"summary":"Get Task Custom Fields","description":"Returns the library's custom field definitions for compliance tasks. The list is bounded by the library's configuration and is not paginated.","operationId":"get-task-custom-fields","responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":[{"slug":"responsible_shift","name":"Shift","type":"choices","required":true,"options":["Morning","Afternoon","Night"]},{"slug":"thermometer_id","name":"Thermometer","type":"text","required":false,"options":null},{"slug":"affected_areas","name":"Affected areas","type":"multi","required":false,"options":[]}]}},"schema":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","example":"responsible_shift","description":"The machine-readable key of the custom field. An occurrence reports and accepts its values under this key."},"name":{"type":"string","example":"Shift","description":"The display name of the custom field."},"type":{"type":"string","enum":["choices","multi","text","long_text"],"example":"choices","description":"The field type. See [Custom field types](https://developers.apicbase.com/docs/compliance-task-reference-values#custom-field-types)."},"required":{"type":"boolean","example":true,"description":"Whether the field has to be filled in to complete an occurrence."},"options":{"type":"array","nullable":true,"description":"The allowed values of a choices or multi field, empty when none were configured. Null for the field types that carry no option list.","items":{"type":"string","example":"Morning"}}}}}}}},"403":{"description":"User lacks permission to view the tasks dashboard."}},"deprecated":false}},"/compliance/tasks/outlets/{outlet_id}/calendar/":{"get":{"summary":"Get Outlet Tasks Calendar","description":"Returns a flat list of an outlet's task occurrences over a date range. Without parameters the range covers the previous, current and next month. The range is capped at 3 months.","operationId":"get-outlet-tasks-calendar","parameters":[{"name":"outlet_id","in":"path","description":"The ID of the outlet.","schema":{"type":"string"},"required":true},{"name":"start","in":"query","description":"The first day of the range (YYYY-MM-DD, inclusive). Required when end is given.","schema":{"type":"string","format":"date"}},{"name":"end","in":"query","description":"The last day of the range (YYYY-MM-DD, inclusive). Defaults to start + 3 months. Must not be earlier than start or more than 3 months after it.","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":[{"occurrence_id":"AgBa8xB6_FkAWvMQerlFC0nP","begin":"2026-06-24T08:00:00","template":{"id":"100000000000010","name":"Fridge temperature control","type":"temperature_check","assignee":null,"type_specific":{"ccp":{"id":"100000000000001","name":"Fridge #1","code":"CCP-01"}}},"awaiting_update":false,"completion":{"result":"ok","submitted_at":"2026-06-24T08:15:00Z","done_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"submitted_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"remarks":"All within range","has_attachments":true,"mitigation_skipped":false,"had_corrective_action":false}},{"occurrence_id":"AgBa8xB7_FkAWvMQerlFC0nQ","begin":"2026-06-26T08:00:00","template":{"id":"100000000000010","name":"Fridge temperature control","type":"temperature_check","assignee":null,"type_specific":{"ccp":{"id":"100000000000001","name":"Fridge #1","code":"CCP-01"}}},"awaiting_update":false,"completion":{"result":null,"submitted_at":null,"done_by":null,"submitted_by":null,"remarks":"","has_attachments":false,"mitigation_skipped":false,"had_corrective_action":false}},{"occurrence_id":"AgBa8xC1_FkAWvMQerlFC0nR","begin":"2026-06-24T22:00:00","template":{"id":"100000000000011","name":"Closing checklist","type":"checklist_task","assignee":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"type_specific":{"ccp":{"id":"100000000000002","name":"Kitchen close","code":"CCP-07"}}},"awaiting_update":false,"completion":{"result":"nok","submitted_at":"2026-06-24T22:20:00Z","done_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"submitted_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"remarks":"Waste bins left for the morning shift","has_attachments":false,"mitigation_skipped":false,"had_corrective_action":false}}]}},"schema":{"type":"array","items":{"type":"object","properties":{"occurrence_id":{"type":"string","example":"AgBa8xB6_FkAWvMQerlFC0nP","description":"The opaque token identifying this occurrence. Pass it to the occurrence endpoints; do not parse it."},"begin":{"type":"string","example":"2026-06-24T08:00:00","description":"When the occurrence is scheduled, in `YYYY-MM-DDTHH:MM:SS` format. This is a wall-clock time in the outlet's own timezone and carries no offset: read it as-is, the way the user sees it in the app. Do not convert it."},"template":{"type":"object","description":"A compact reference to the occurrence's task template.","properties":{"id":{"type":"string","example":"100000000000010","description":"The ID of the task template."},"name":{"type":"string","example":"Fridge temperature control","description":"The name of the task template."},"type":{"type":"string","example":"temperature_check","description":"The template type slug. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types). The set is open: new values may be added without it counting as a breaking change."},"assignee":{"type":"object","nullable":true,"description":"The user the task is assigned to.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"type_specific":{"type":"object","description":"Contains the linked `ccp` object, except for the `general_task`, `order` and `count` types, which return an empty object. The other type-specific keys are not part of the calendar response; see [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types).","properties":{"ccp":{"type":"object","description":"The linked critical control point. Present for every template type except `general_task`, `order` and `count`.","properties":{"id":{"type":"string","example":"100000000000001","description":"The ID of the critical control point."},"name":{"type":"string","example":"Fridge #1","description":"The name of the critical control point (CCP)."},"code":{"type":"string","example":"CCP-01","description":"A short code identifying the CCP. Can be empty."}}}}}}},"awaiting_update":{"type":"boolean","example":false,"description":"True when the occurrence was completed with a NOK result, the CCP's mitigation policy requires a corrective action, and mitigation was not skipped."},"completion":{"type":"object","description":"The completion state. Always an object: all fields are empty or null while nothing has been recorded, partially filled once values are saved, filled once the task is resolved.","properties":{"result":{"type":"string","nullable":true,"enum":["ok","nok","not_applicable"],"example":"ok","description":"The outcome of the task: `ok` or `nok` once it is completed, `not_applicable` once it is marked not applicable, or null while it is neither. See [Completion result](https://developers.apicbase.com/docs/compliance-task-reference-values#completion-result)."},"submitted_at":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-24T08:15:00Z","description":"When the task was resolved — completed or marked not applicable — or null while it is neither."},"done_by":{"type":"object","nullable":true,"description":"The user recorded as the performer of the task.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"submitted_by":{"type":"object","nullable":true,"description":"The logged-in user who submitted the completion. Can differ from done_by when the performer was picked from a list.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"remarks":{"type":"string","example":"All within range","description":"Remarks entered on completion. Empty string when none."},"has_attachments":{"type":"boolean","example":true,"description":"Whether the completion has attachments. The attachment list itself is returned by the occurrence details endpoint."},"mitigation_skipped":{"type":"boolean","example":false,"description":"Whether the user explicitly skipped the corrective action for a failed (`nok`) check. Only ever true when the occurrence's mitigation_policy is 1 (optional); any other policy refuses the skip. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy)."},"had_corrective_action":{"type":"boolean","example":false,"description":"True when the task was completed with a NOK result and later corrected to OK."}}}}}}}}},"400":{"description":"Invalid date format, end earlier than start, end without start, or a range longer than 3 months."},"403":{"description":"User lacks permission to view the tasks dashboard."},"404":{"description":"Outlet not found."}},"deprecated":false}},"/compliance/tasks/occurrences/{occurrence_id}/":{"get":{"summary":"Get Task Occurrence Details","description":"Returns information about a specific task occurrence by the opaque occurrence_id obtained from the calendar endpoint.","operationId":"get-occurrence-details","parameters":[{"name":"occurrence_id","in":"path","description":"The opaque occurrence token from the calendar endpoint.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"occurrence_id":"AgBa8xB6_FkAWvMQerlFC0nP","begin":"2026-06-24T08:00:00","template":{"id":"100000000000010","name":"Fridge temperature control","type":"temperature_check","assignee":null,"type_specific":{"ccp":{"id":"100000000000001","name":"Fridge #1","code":"CCP-01"},"temperatures":[{"key":"t1","title":"Freezer","min_temperature":-22,"max_temperature":-18},{"key":"t2","title":"Cooler","min_temperature":2,"max_temperature":7}]},"description":"Morning check","prevent_early_execution":true,"active":true,"recurrence":{"frequency":"weekly","start_date":"2026-06-01","end_date":null,"start_time":"08:00","interval":1,"weekdays":["Monday","Wednesday","Friday"],"day_of_month":null,"month_of_year":null},"attachments":[{"id":"100000000000061","file":{"url":"https://storage.apicbase.com/task_files/instruction.pdf","name":"instruction.pdf"}}],"created":"2026-06-01T08:00:00Z","modified":"2026-06-15T12:30:00Z"},"awaiting_update":false,"mitigation_policy":2,"completion":{"result":"ok","submitted_at":"2026-06-24T08:15:00Z","done_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"submitted_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"remarks":"All within range","has_attachments":true,"mitigation_skipped":false,"had_corrective_action":false},"attachments":[{"id":"100000000000077","file":{"url":"https://storage.apicbase.com/task_files/photo.jpg","name":"photo.jpg"}}],"type_specific":{"temperatures":[{"key":"t1","title":"Freezer","value":-19.5},{"key":"t2","title":"Cooler","value":4.5}]},"custom_fields":[{"slug":"responsible_shift","name":"Shift","required":true,"value":"Morning"},{"slug":"thermometer_id","name":"Thermometer","required":false,"value":"TH-12"}],"history":[{"result":"nok","submitted_at":"2026-06-24T07:50:00Z","done_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"remarks":"Freezer above range, called maintenance","mitigation_skipped":false,"type_specific":{"temperatures":[{"key":"t1","title":"Freezer","value":-12.4},{"key":"t2","title":"Cooler","value":4.5}]}}]}},"Checklist task":{"value":{"occurrence_id":"AgBa8xC1_FkAWvMQerlFC0nR","begin":"2026-06-24T22:00:00","template":{"id":"100000000000011","name":"Closing checklist","type":"checklist_task","assignee":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"type_specific":{"ccp":{"id":"100000000000002","name":"Kitchen close","code":"CCP-07"},"checklist":["Check the door seal","Wipe down the shelves","Empty the waste bins"]},"description":"Run through every item before locking up","prevent_early_execution":false,"active":true,"recurrence":{"frequency":"daily","start_date":"2026-06-01","end_date":"2026-12-31","start_time":"22:00","interval":1,"weekdays":null,"day_of_month":null,"month_of_year":null},"attachments":[],"created":"2026-06-02T09:10:00Z","modified":"2026-06-02T09:10:00Z"},"awaiting_update":false,"mitigation_policy":2,"completion":{"result":"nok","submitted_at":"2026-06-24T22:20:00Z","done_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"submitted_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"remarks":"Waste bins left for the morning shift","has_attachments":false,"mitigation_skipped":false,"had_corrective_action":false},"attachments":[],"type_specific":{"checklist":["Check the door seal","Wipe down the shelves"]},"custom_fields":[],"history":[]}},"General task":{"value":{"occurrence_id":"AgBa8xC2_FkAWvMQerlFC0nS","begin":"2026-07-01T09:00:00","template":{"id":"100000000000012","name":"Monthly team briefing","type":"general_task","assignee":null,"type_specific":{},"description":"","prevent_early_execution":false,"active":false,"recurrence":{"frequency":"monthly","start_date":"2026-01-01","end_date":null,"start_time":"09:00","interval":1,"weekdays":null,"day_of_month":1,"month_of_year":null},"attachments":[],"created":"2026-01-05T11:00:00Z","modified":"2026-05-20T15:45:00Z"},"awaiting_update":false,"mitigation_policy":null,"completion":{"result":null,"submitted_at":null,"done_by":null,"submitted_by":null,"remarks":"","has_attachments":false,"mitigation_skipped":false,"had_corrective_action":false},"attachments":[],"type_specific":{},"custom_fields":[],"history":[]}}},"schema":{"type":"object","properties":{"occurrence_id":{"type":"string","example":"AgBa8xB6_FkAWvMQerlFC0nP","description":"The opaque token identifying this occurrence. Do not parse it."},"begin":{"type":"string","example":"2026-06-24T08:00:00","description":"When the occurrence is scheduled, in `YYYY-MM-DDTHH:MM:SS` format. This is a wall-clock time in the outlet's own timezone and carries no offset: read it as-is, the way the user sees it in the app. Do not convert it."},"template":{"type":"object","description":"The occurrence's task template, in the same shape as the template details endpoint but without the outlets list (an occurrence is bound to a single outlet).","properties":{"id":{"type":"string","example":"100000000000010","description":"The ID of the task template."},"name":{"type":"string","example":"Fridge temperature control","description":"The name of the task template."},"type":{"type":"string","example":"temperature_check","description":"The template type slug. Determines the contents of type_specific. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types). The set is open: new values may be added without it counting as a breaking change."},"assignee":{"type":"object","nullable":true,"description":"The user the task is assigned to.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"type_specific":{"type":"object","description":"Type-dependent template definitions. The keys present depend on the template type. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types).","properties":{"ccp":{"type":"object","description":"The linked critical control point. Present for every template type except `general_task`, `order` and `count`.","properties":{"id":{"type":"string","example":"100000000000001","description":"The ID of the critical control point."},"name":{"type":"string","example":"Fridge #1","description":"The name of the critical control point (CCP)."},"code":{"type":"string","example":"CCP-01","description":"A short code identifying the CCP. Can be empty."}}},"temperatures":{"type":"array","description":"Temperature check definitions. Present for temperature_check templates only.","items":{"type":"object","properties":{"key":{"type":"string","example":"t1","description":"The internal key used to match entered values against this definition."},"title":{"type":"string","example":"Freezer","description":"The label of the temperature measurement point."},"min_temperature":{"type":"number","example":-22,"description":"The lowest allowed temperature for the measurement."},"max_temperature":{"type":"number","example":-18,"description":"The highest allowed temperature for the measurement."}}}},"checklist":{"type":"array","description":"The checklist item labels. Present for checklist_task templates only.","items":{"type":"string","example":"Check the door seal"}}}},"description":{"type":"string","example":"Morning check","description":"The description of the task template. Can be empty."},"prevent_early_execution":{"type":"boolean","example":true,"description":"Whether the task cannot be completed before its scheduled day."},"active":{"type":"boolean","example":true,"description":"Whether the template's schedule is enabled."},"recurrence":{"type":"object","description":"The template's schedule. All keys are always present; keys that do not apply to the frequency are null.","properties":{"frequency":{"type":"string","enum":["once","daily","weekly","monthly","yearly"],"example":"weekly","description":"How often the task repeats. See [Recurrence](https://developers.apicbase.com/docs/compliance-task-reference-values#recurrence)."},"start_date":{"type":"string","format":"date","example":"2026-06-01","description":"The first day of the schedule, in ISO 8601 `YYYY-MM-DD` format."},"end_date":{"type":"string","format":"date","nullable":true,"description":"The last day of the schedule, or null when it repeats indefinitely. Always null for frequency once."},"start_time":{"type":"string","nullable":true,"example":"08:00","description":"The time of day the task is due, in `HH:MM` format."},"interval":{"type":"integer","nullable":true,"example":1,"description":"The repeat interval, e.g. 2 with frequency weekly means every two weeks."},"weekdays":{"type":"array","nullable":true,"description":"The days of the week the task repeats on. Only set for frequency weekly, null otherwise.","items":{"type":"string","enum":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"example":"Monday"}},"day_of_month":{"type":"integer","nullable":true,"description":"The day of the month the task repeats on. Only set for frequency monthly and yearly, null otherwise."},"month_of_year":{"type":"integer","nullable":true,"description":"The month the task repeats in (1-12). Only set for frequency yearly, null otherwise."}}},"attachments":{"type":"array","description":"Instruction files attached to the template.","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000061","description":"The ID of the attachment."},"file":{"type":"object","properties":{"url":{"type":"string","example":"https://storage.apicbase.com/task_files/instruction.pdf","description":"The download URL of the attachment file."},"name":{"type":"string","example":"instruction.pdf","description":"The file name of the attachment."}},"description":"The attached file, with its name and download URL."}}}},"created":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-01T08:00:00Z","description":"When the template was created."},"modified":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-15T12:30:00Z","description":"When the template was last modified."}}},"awaiting_update":{"type":"boolean","example":false,"description":"True when the occurrence was completed with a NOK result, the CCP's mitigation policy requires a corrective action, and mitigation was not skipped."},"mitigation_policy":{"type":"integer","enum":[0,1,2],"nullable":true,"example":2,"description":"Whether a corrective action is asked for when this occurrence fails. Taken from the linked CCP, and frozen once the occurrence is completed, so it can differ from the CCP's current policy. Null for a task type that carries no CCP. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy)."},"completion":{"type":"object","description":"The completion state. Always an object: all fields are empty or null while nothing has been recorded, partially filled once values are saved, filled once the task is resolved.","properties":{"result":{"type":"string","nullable":true,"enum":["ok","nok","not_applicable"],"example":"ok","description":"The outcome of the task: `ok` or `nok` once it is completed, `not_applicable` once it is marked not applicable, or null while it is neither. See [Completion result](https://developers.apicbase.com/docs/compliance-task-reference-values#completion-result)."},"submitted_at":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-24T08:15:00Z","description":"When the task was resolved — completed or marked not applicable — or null while it is neither."},"done_by":{"type":"object","nullable":true,"description":"The user recorded as the performer of the task.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"submitted_by":{"type":"object","nullable":true,"description":"The logged-in user who submitted the completion. Can differ from done_by when the performer was picked from a list.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"remarks":{"type":"string","example":"All within range","description":"Remarks entered on completion. Empty string when none."},"has_attachments":{"type":"boolean","example":true,"description":"Whether the completion has attachments. The attachment list itself is in the top-level attachments field."},"mitigation_skipped":{"type":"boolean","example":false,"description":"Whether the user explicitly skipped the corrective action for a failed (`nok`) check. Only ever true when the occurrence's mitigation_policy is 1 (optional); any other policy refuses the skip. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy)."},"had_corrective_action":{"type":"boolean","example":false,"description":"True when the task was completed with a NOK result and later corrected to OK."}}},"attachments":{"type":"array","description":"Files attached to the task (photos, documents)","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000077","description":"The ID of the attachment."},"file":{"type":"object","properties":{"url":{"type":"string","example":"https://storage.apicbase.com/task_files/photo.jpg","description":"The download URL of the attachment file."},"name":{"type":"string","example":"photo.jpg","description":"The file name of the attachment."}},"description":"The attached file, with its name and download URL."}}}},"type_specific":{"type":"object","description":"The values entered on completion, matching the template type. temperature_check: temperatures as {key, title, value}; checklist_task: the labels of the checked items; empty object for other types or while nothing was entered.","properties":{"temperatures":{"type":"array","description":"The entered temperature values. Present for temperature_check templates only.","items":{"type":"object","properties":{"key":{"type":"string","example":"t1","description":"The key of the matching definition in template.type_specific.temperatures."},"title":{"type":"string","example":"Freezer","description":"The label of the measured temperature point."},"value":{"type":"number","example":-19.5,"description":"The measured temperature."}}}},"checklist":{"type":"array","description":"The labels of the checked items. Present for checklist_task templates only.","items":{"type":"string","example":"Check the door seal"}}}},"custom_fields":{"type":"array","description":"The library's configurable task fields with the values entered for this occurrence.","items":{"type":"object","properties":{"slug":{"type":"string","example":"responsible_shift","description":"The machine-readable key of the custom field."},"name":{"type":"string","example":"Shift","description":"The display name of the custom field."},"required":{"type":"boolean","example":true,"description":"Whether the field has to be filled in to complete the occurrence."},"value":{"type":"string","nullable":true,"example":"Morning","description":"The entered value, or null when not filled in."}}}},"history":{"type":"array","description":"Previous versions of the completion, newest first, up to 50 entries. The current version is in completion. Empty when the occurrence was never re-submitted.","items":{"type":"object","properties":{"result":{"type":"string","nullable":true,"enum":["ok","nok","not_applicable"],"example":"nok","description":"The outcome of that version of the task, `ok`, `nok` or `not_applicable`, or null while it was neither completed nor marked not applicable."},"submitted_at":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-24T07:50:00Z","description":"When that version was resolved, in ISO 8601 format, or null while it was neither completed nor marked not applicable."},"done_by":{"type":"object","nullable":true,"description":"The user recorded as the performer of this version.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"remarks":{"type":"string","example":"Freezer above range, called maintenance","description":"Remarks recorded on that version. Can be empty."},"mitigation_skipped":{"type":"boolean","example":false,"description":"Whether the user explicitly skipped the corrective action for that version's failed (`nok`) check. Only ever true when the mitigation_policy in force for that version was 1 (optional)."},"type_specific":{"type":"object","description":"The values entered in this version, in the same shape as the occurrence-level type_specific.","properties":{"temperatures":{"type":"array","description":"The temperature values entered in this version. Present for temperature_check templates only.","items":{"type":"object","properties":{"key":{"type":"string","example":"t1","description":"The key of the matching definition in template.type_specific.temperatures."},"title":{"type":"string","example":"Freezer","description":"The label of the measured temperature point."},"value":{"type":"number","example":-12.4,"description":"The measured temperature."}}}},"checklist":{"type":"array","description":"The labels of the items checked in this version. Present for checklist_task templates only.","items":{"type":"string","example":"Check the door seal"}}}}}}}}}}}},"403":{"description":"User lacks permission to view the tasks dashboard."},"404":{"description":"Occurrence not found."}},"deprecated":false},"patch":{"summary":"Save Task Occurrence","description":"Saves values on one task occurrence without resolving it. Only the fields present in the payload are written. Completing an occurrence and marking it not applicable are separate endpoints. On an occurrence that is already completed or marked not applicable this endpoint still accepts `remarks`, `done_by` and `custom_fields`, but refuses `type_specific`: the recorded measurement is edited through [Complete Task Occurrence](https://developers.apicbase.com/reference/complete-occurrence).","operationId":"save-occurrence","parameters":[{"name":"occurrence_id","in":"path","description":"The opaque occurrence token from the calendar endpoint.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"remarks":{"type":"string","example":"Cooler was 1 degree over, door left open.","description":"The remarks entered on the occurrence."},"done_by":{"type":"string","nullable":true,"example":"100000000000045","description":"The ID of the user who performed the task, reported back as completion.done_by. Has to be a user of the library with access to the occurrence's outlet. Left out, it is not changed."},"type_specific":{"type":"object","description":"The values entered for the occurrence's own task type, one key per type. Refused on an occurrence that is already completed or marked not applicable. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types).","properties":{"temperatures":{"type":"array","description":"The measured temperatures of a temperature_check occurrence. Merged per measurement.","items":{"type":"object","required":["key","value"],"properties":{"key":{"type":"string","example":"t1","description":"The key of the template temperature this measurement belongs to."},"value":{"type":"number","nullable":true,"example":-19.5,"description":"The measured temperature, as a number — a numeric string is rejected. Null clears the measurement."}}}},"checklist":{"type":"array","description":"The labels of the checked items of a checklist_task occurrence. Replaced as a whole, not merged. A label the task does not define is rejected.","items":{"type":"string","example":"Check the door seal"}}}},"custom_fields":{"type":"object","description":"The values of the library's task custom fields, keyed by field slug. A slug the library does not define is rejected; a `choices` field takes one of its configured options and a `multi` field a list of them.","additionalProperties":true,"example":{"responsible_shift":"Morning","thermometer_id":"TH-12"}}}},"examples":{"Request Example":{"value":{"remarks":"Cooler was 1 degree over, door left open.","done_by":"100000000000045","type_specific":{"temperatures":[{"key":"t1","value":-19.5},{"key":"t2","value":4.5}]},"custom_fields":{"responsible_shift":"Morning"}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"occurrence_id":"AgBa8xB6_FkAWvMQerlFC0nP","begin":"2026-06-24T08:00:00","template":{"id":"100000000000010","name":"Fridge temperature control","type":"temperature_check","assignee":null,"type_specific":{"ccp":{"id":"100000000000001","name":"Fridge #1","code":"CCP-01"},"temperatures":[{"key":"t1","title":"Freezer","min_temperature":-22,"max_temperature":-18},{"key":"t2","title":"Cooler","min_temperature":2,"max_temperature":7}]},"description":"Morning check","prevent_early_execution":true,"active":true,"recurrence":{"frequency":"weekly","start_date":"2026-06-01","end_date":null,"start_time":"08:00","interval":1,"weekdays":["Monday","Wednesday","Friday"],"day_of_month":null,"month_of_year":null},"attachments":[{"id":"100000000000061","file":{"url":"https://storage.apicbase.com/task_files/instruction.pdf","name":"instruction.pdf"}}],"created":"2026-06-01T08:00:00Z","modified":"2026-06-15T12:30:00Z"},"awaiting_update":false,"mitigation_policy":2,"completion":{"result":"ok","submitted_at":"2026-06-24T08:15:00Z","done_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"submitted_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"remarks":"All within range","has_attachments":true,"mitigation_skipped":false,"had_corrective_action":false},"attachments":[{"id":"100000000000077","file":{"url":"https://storage.apicbase.com/task_files/photo.jpg","name":"photo.jpg"}}],"type_specific":{"temperatures":[{"key":"t1","title":"Freezer","value":-19.5},{"key":"t2","title":"Cooler","value":4.5}]},"custom_fields":[{"slug":"responsible_shift","name":"Shift","required":true,"value":"Morning"},{"slug":"thermometer_id","name":"Thermometer","required":false,"value":"TH-12"}],"history":[{"result":"nok","submitted_at":"2026-06-24T07:50:00Z","done_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"remarks":"Freezer above range, called maintenance","mitigation_skipped":false,"type_specific":{"temperatures":[{"key":"t1","title":"Freezer","value":-12.4},{"key":"t2","title":"Cooler","value":4.5}]}}]}},"Checklist task":{"value":{"occurrence_id":"AgBa8xC1_FkAWvMQerlFC0nR","begin":"2026-06-24T22:00:00","template":{"id":"100000000000011","name":"Closing checklist","type":"checklist_task","assignee":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"type_specific":{"ccp":{"id":"100000000000002","name":"Kitchen close","code":"CCP-07"},"checklist":["Check the door seal","Wipe down the shelves","Empty the waste bins"]},"description":"Run through every item before locking up","prevent_early_execution":false,"active":true,"recurrence":{"frequency":"daily","start_date":"2026-06-01","end_date":"2026-12-31","start_time":"22:00","interval":1,"weekdays":null,"day_of_month":null,"month_of_year":null},"attachments":[],"created":"2026-06-02T09:10:00Z","modified":"2026-06-02T09:10:00Z"},"awaiting_update":false,"mitigation_policy":2,"completion":{"result":"nok","submitted_at":"2026-06-24T22:20:00Z","done_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"submitted_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"remarks":"Waste bins left for the morning shift","has_attachments":false,"mitigation_skipped":false,"had_corrective_action":false},"attachments":[],"type_specific":{"checklist":["Check the door seal","Wipe down the shelves"]},"custom_fields":[],"history":[]}},"General task":{"value":{"occurrence_id":"AgBa8xC2_FkAWvMQerlFC0nS","begin":"2026-07-01T09:00:00","template":{"id":"100000000000012","name":"Monthly team briefing","type":"general_task","assignee":null,"type_specific":{},"description":"","prevent_early_execution":false,"active":false,"recurrence":{"frequency":"monthly","start_date":"2026-01-01","end_date":null,"start_time":"09:00","interval":1,"weekdays":null,"day_of_month":1,"month_of_year":null},"attachments":[],"created":"2026-01-05T11:00:00Z","modified":"2026-05-20T15:45:00Z"},"awaiting_update":false,"mitigation_policy":null,"completion":{"result":null,"submitted_at":null,"done_by":null,"submitted_by":null,"remarks":"","has_attachments":false,"mitigation_skipped":false,"had_corrective_action":false},"attachments":[],"type_specific":{},"custom_fields":[],"history":[]}}},"schema":{"type":"object","properties":{"occurrence_id":{"type":"string","example":"AgBa8xB6_FkAWvMQerlFC0nP","description":"The opaque token identifying this occurrence. Do not parse it."},"begin":{"type":"string","example":"2026-06-24T08:00:00","description":"When the occurrence is scheduled, in `YYYY-MM-DDTHH:MM:SS` format. This is a wall-clock time in the outlet's own timezone and carries no offset: read it as-is, the way the user sees it in the app. Do not convert it."},"template":{"type":"object","description":"The occurrence's task template, in the same shape as the template details endpoint but without the outlets list (an occurrence is bound to a single outlet).","properties":{"id":{"type":"string","example":"100000000000010","description":"The ID of the task template."},"name":{"type":"string","example":"Fridge temperature control","description":"The name of the task template."},"type":{"type":"string","example":"temperature_check","description":"The template type slug. Determines the contents of type_specific. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types). The set is open: new values may be added without it counting as a breaking change."},"assignee":{"type":"object","nullable":true,"description":"The user the task is assigned to.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"type_specific":{"type":"object","description":"Type-dependent template definitions. The keys present depend on the template type. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types).","properties":{"ccp":{"type":"object","description":"The linked critical control point. Present for every template type except `general_task`, `order` and `count`.","properties":{"id":{"type":"string","example":"100000000000001","description":"The ID of the critical control point."},"name":{"type":"string","example":"Fridge #1","description":"The name of the critical control point (CCP)."},"code":{"type":"string","example":"CCP-01","description":"A short code identifying the CCP. Can be empty."}}},"temperatures":{"type":"array","description":"Temperature check definitions. Present for temperature_check templates only.","items":{"type":"object","properties":{"key":{"type":"string","example":"t1","description":"The internal key used to match entered values against this definition."},"title":{"type":"string","example":"Freezer","description":"The label of the temperature measurement point."},"min_temperature":{"type":"number","example":-22,"description":"The lowest allowed temperature for the measurement."},"max_temperature":{"type":"number","example":-18,"description":"The highest allowed temperature for the measurement."}}}},"checklist":{"type":"array","description":"The checklist item labels. Present for checklist_task templates only.","items":{"type":"string","example":"Check the door seal"}}}},"description":{"type":"string","example":"Morning check","description":"The description of the task template. Can be empty."},"prevent_early_execution":{"type":"boolean","example":true,"description":"Whether the task cannot be completed before its scheduled day."},"active":{"type":"boolean","example":true,"description":"Whether the template's schedule is enabled."},"recurrence":{"type":"object","description":"The template's schedule. All keys are always present; keys that do not apply to the frequency are null.","properties":{"frequency":{"type":"string","enum":["once","daily","weekly","monthly","yearly"],"example":"weekly","description":"How often the task repeats. See [Recurrence](https://developers.apicbase.com/docs/compliance-task-reference-values#recurrence)."},"start_date":{"type":"string","format":"date","example":"2026-06-01","description":"The first day of the schedule, in ISO 8601 `YYYY-MM-DD` format."},"end_date":{"type":"string","format":"date","nullable":true,"description":"The last day of the schedule, or null when it repeats indefinitely. Always null for frequency once."},"start_time":{"type":"string","nullable":true,"example":"08:00","description":"The time of day the task is due, in `HH:MM` format."},"interval":{"type":"integer","nullable":true,"example":1,"description":"The repeat interval, e.g. 2 with frequency weekly means every two weeks."},"weekdays":{"type":"array","nullable":true,"description":"The days of the week the task repeats on. Only set for frequency weekly, null otherwise.","items":{"type":"string","enum":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"example":"Monday"}},"day_of_month":{"type":"integer","nullable":true,"description":"The day of the month the task repeats on. Only set for frequency monthly and yearly, null otherwise."},"month_of_year":{"type":"integer","nullable":true,"description":"The month the task repeats in (1-12). Only set for frequency yearly, null otherwise."}}},"attachments":{"type":"array","description":"Instruction files attached to the template.","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000061","description":"The ID of the attachment."},"file":{"type":"object","properties":{"url":{"type":"string","example":"https://storage.apicbase.com/task_files/instruction.pdf","description":"The download URL of the attachment file."},"name":{"type":"string","example":"instruction.pdf","description":"The file name of the attachment."}},"description":"The attached file, with its name and download URL."}}}},"created":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-01T08:00:00Z","description":"When the template was created."},"modified":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-15T12:30:00Z","description":"When the template was last modified."}}},"awaiting_update":{"type":"boolean","example":false,"description":"True when the occurrence was completed with a NOK result, the CCP's mitigation policy requires a corrective action, and mitigation was not skipped."},"mitigation_policy":{"type":"integer","enum":[0,1,2],"nullable":true,"example":2,"description":"Whether a corrective action is asked for when this occurrence fails. Taken from the linked CCP, and frozen once the occurrence is completed, so it can differ from the CCP's current policy. Null for a task type that carries no CCP. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy)."},"completion":{"type":"object","description":"The completion state. Always an object: all fields are empty or null while nothing has been recorded, partially filled once values are saved, filled once the task is resolved.","properties":{"result":{"type":"string","nullable":true,"enum":["ok","nok","not_applicable"],"example":"ok","description":"The outcome of the task: `ok` or `nok` once it is completed, `not_applicable` once it is marked not applicable, or null while it is neither. See [Completion result](https://developers.apicbase.com/docs/compliance-task-reference-values#completion-result)."},"submitted_at":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-24T08:15:00Z","description":"When the task was resolved — completed or marked not applicable — or null while it is neither."},"done_by":{"type":"object","nullable":true,"description":"The user recorded as the performer of the task.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"submitted_by":{"type":"object","nullable":true,"description":"The logged-in user who submitted the completion. Can differ from done_by when the performer was picked from a list.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"remarks":{"type":"string","example":"All within range","description":"Remarks entered on completion. Empty string when none."},"has_attachments":{"type":"boolean","example":true,"description":"Whether the completion has attachments. The attachment list itself is in the top-level attachments field."},"mitigation_skipped":{"type":"boolean","example":false,"description":"Whether the user explicitly skipped the corrective action for a failed (`nok`) check. Only ever true when the occurrence's mitigation_policy is 1 (optional); any other policy refuses the skip. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy)."},"had_corrective_action":{"type":"boolean","example":false,"description":"True when the task was completed with a NOK result and later corrected to OK."}}},"attachments":{"type":"array","description":"Files attached to the task (photos, documents)","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000077","description":"The ID of the attachment."},"file":{"type":"object","properties":{"url":{"type":"string","example":"https://storage.apicbase.com/task_files/photo.jpg","description":"The download URL of the attachment file."},"name":{"type":"string","example":"photo.jpg","description":"The file name of the attachment."}},"description":"The attached file, with its name and download URL."}}}},"type_specific":{"type":"object","description":"The values entered on completion, matching the template type. temperature_check: temperatures as {key, title, value}; checklist_task: the labels of the checked items; empty object for other types or while nothing was entered.","properties":{"temperatures":{"type":"array","description":"The entered temperature values. Present for temperature_check templates only.","items":{"type":"object","properties":{"key":{"type":"string","example":"t1","description":"The key of the matching definition in template.type_specific.temperatures."},"title":{"type":"string","example":"Freezer","description":"The label of the measured temperature point."},"value":{"type":"number","nullable":true,"example":-19.5,"description":"The measured temperature, or null while it was not entered."}}}},"checklist":{"type":"array","description":"The labels of the checked items. Present for checklist_task templates only.","items":{"type":"string","example":"Check the door seal"}}}},"custom_fields":{"type":"array","description":"The library's configurable task fields with the values entered for this occurrence.","items":{"type":"object","properties":{"slug":{"type":"string","example":"responsible_shift","description":"The machine-readable key of the custom field."},"name":{"type":"string","example":"Shift","description":"The display name of the custom field."},"required":{"type":"boolean","example":true,"description":"Whether the field has to be filled in to complete the occurrence."},"value":{"type":"string","nullable":true,"example":"Morning","description":"The entered value, or null when not filled in."}}}},"history":{"type":"array","description":"Previous versions of the completion, newest first, up to 50 entries. The current version is in completion. Empty when the occurrence was never re-submitted.","items":{"type":"object","properties":{"result":{"type":"string","nullable":true,"enum":["ok","nok","not_applicable"],"example":"nok","description":"The outcome of that version of the task, `ok`, `nok` or `not_applicable`, or null while it was neither completed nor marked not applicable."},"submitted_at":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-24T07:50:00Z","description":"When that version was resolved, in ISO 8601 format, or null while it was neither completed nor marked not applicable."},"done_by":{"type":"object","nullable":true,"description":"The user recorded as the performer of this version.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"remarks":{"type":"string","example":"Freezer above range, called maintenance","description":"Remarks recorded on that version. Can be empty."},"mitigation_skipped":{"type":"boolean","example":false,"description":"Whether the user explicitly skipped the corrective action for that version's failed (`nok`) check. Only ever true when the mitigation_policy in force for that version was 1 (optional)."},"type_specific":{"type":"object","description":"The values entered in this version, in the same shape as the occurrence-level type_specific.","properties":{"temperatures":{"type":"array","description":"The temperature values entered in this version. Present for temperature_check templates only.","items":{"type":"object","properties":{"key":{"type":"string","example":"t1","description":"The key of the matching definition in template.type_specific.temperatures."},"title":{"type":"string","example":"Freezer","description":"The label of the measured temperature point."},"value":{"type":"number","nullable":true,"example":-12.4,"description":"The measured temperature, or null while it was not entered."}}}},"checklist":{"type":"array","description":"The labels of the items checked in this version. Present for checklist_task templates only.","items":{"type":"string","example":"Check the door seal"}}}}}}}}}}}},"400":{"description":"Bad request — the payload failed validation, or a save rule refused it.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Two forms. A field the serializer rejects comes back keyed by field name, nested under `type_specific` where it applies. A rule the save service refuses comes back as a single `message` instead."},"examples":{"done_by_unknown":{"summary":"The performer is not a user of the library","value":{"done_by":["Invalid id \"999999999999999\" - user does not exist."]}},"temperature_not_a_number":{"summary":"A measurement sent as something other than a number","value":{"type_specific":{"temperatures":[{"value":["A valid number is required."]}]}}},"temperatures_not_a_list":{"summary":"A key rejected as a whole, reported under non_field_errors","value":{"type_specific":{"temperatures":{"non_field_errors":["Expected a list of items but got type \"str\"."]}}}},"type_specific_on_a_resolved_occurrence":{"summary":"The measurement of a completed or not-applicable occurrence edited here instead of through the complete endpoint","value":{"message":"Editing the measurement of a resolved task is only allowed through the complete endpoint."}}}}}},"403":{"description":"Forbidden — the Tasks module is off, or the user lacks the permission needed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"module_disabled":{"summary":"The Tasks module is not enabled for the library","value":{"detail":"Your library does not have Compliance Tasks module active."}},"no_permission":{"summary":"The user lacks the permission this endpoint needs","value":{"message":"You have no permission to perform that action. If you think you should be allowed please contact your library admin"}},"completed_task_edit":{"summary":"A resolved occurrence edited without the permission to edit completed tasks — the same message as any other missing permission","value":{"message":"You have no permission to perform that action. If you think you should be allowed please contact your library admin"}}}}}},"404":{"description":"Occurrence not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}},"examples":{"not_found":{"summary":"Unknown, malformed or out-of-reach occurrence token — a foreign occurrence is a 404 so its existence is not leaked","value":{"message":"Occurrence not found."}}}}}},"409":{"description":"Conflict — another request is writing this day of the task.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"description":"The save is refused rather than queued behind the other request, and nothing is written, so the same request can simply be sent again."},"examples":{"day_locked":{"summary":"Another request is saving the same day of the same task in the same outlet","value":{"detail":"This task is currently being modified. Please try again."}}}}}}},"deprecated":false},"delete":{"summary":"Delete Task Occurrence","description":"Deletes the occurrence for its day: anything recorded against it is dropped and the day is excluded from the template's schedule. The template itself and its other days are untouched.","operationId":"delete-occurrence","parameters":[{"name":"occurrence_id","in":"path","description":"The opaque occurrence token from the calendar endpoint.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"Occurrence deleted."},"403":{"description":"Forbidden — the Tasks module is off, or the user lacks the permission needed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"module_disabled":{"summary":"The Tasks module is not enabled for the library","value":{"detail":"Your library does not have Compliance Tasks module active."}},"no_permission":{"summary":"The user lacks the permission this endpoint needs","value":{"message":"You have no permission to perform that action. If you think you should be allowed please contact your library admin"}}}}}},"404":{"description":"The occurrence is not there to delete.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}],"description":"A token that resolves to no occurrence at all comes back as `detail`. A day that still resolves through its own record, while no longer being an occurrence of the current schedule, comes back as `message`."},"examples":{"not_found":{"summary":"Unknown or malformed token, or a day that is no longer scheduled — note the key is `detail` here, not `message` as on PATCH","value":{"detail":"Occurrence not found."}},"day_no_longer_scheduled":{"summary":"The occurrence's own record still resolves the token, but its day is no longer an occurrence of the current schedule","value":{"message":"No occurrence found for this day."}}}}}},"409":{"description":"Conflict — the occurrence is already completed or marked not applicable and cannot be deleted.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"message":{"type":"string"}}},{"type":"object","properties":{"detail":{"type":"string"}}}],"description":"A rule the delete service refuses comes back as `message`. A lock held by another request comes back as `detail`, the shared shape of the concurrent-edit error."},"examples":{"already_completed":{"summary":"A resolved occurrence — completed or marked not applicable — is kept","value":{"message":"This task deletion is not allowed"}},"day_locked":{"summary":"Another request is writing the same day — note the key is `detail` here, not `message`","value":{"detail":"This task is currently being modified. Please try again."}}}}}}},"deprecated":false}},"/compliance/tasks/occurrences/{occurrence_id}/complete/":{"post":{"summary":"Complete Task Occurrence","description":"Completes one task occurrence, or re-records the values of one that is already completed. Only the fields present in the payload are written, and `completion.result` is recalculated from the values in force afterwards. This is also how an occurrence marked not applicable is brought back to a real result.","operationId":"complete-occurrence","parameters":[{"name":"occurrence_id","in":"path","description":"The opaque occurrence token from the calendar endpoint.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"remarks":{"type":"string","example":"Cooler was 1 degree over, door left open.","description":"The remarks entered on the occurrence."},"done_by":{"type":"string","nullable":true,"example":"100000000000045","description":"The ID of the user who performed the task, reported back as completion.done_by. Has to be a user of the library with access to the occurrence's outlet. Left out, it is not changed."},"type_specific":{"type":"object","description":"The values entered for the occurrence's own task type, one key per type. The result is recalculated from the values in force after the merge. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types).","properties":{"temperatures":{"type":"array","description":"The measured temperatures of a temperature_check occurrence. Merged per measurement.","items":{"type":"object","required":["key","value"],"properties":{"key":{"type":"string","example":"t1","description":"The key of the template temperature this measurement belongs to."},"value":{"type":"number","nullable":true,"example":-19.5,"description":"The measured temperature, as a number — a numeric string is rejected. Null clears the measurement."}}}},"checklist":{"type":"array","description":"The labels of the checked items of a checklist_task occurrence. Replaced as a whole, not merged. A label the task does not define is rejected.","items":{"type":"string","example":"Check the door seal"}}}},"custom_fields":{"type":"object","description":"The values of the library's task custom fields, keyed by field slug. A slug the library does not define is rejected; a `choices` field takes one of its configured options and a `multi` field a list of them.","additionalProperties":true,"example":{"responsible_shift":"Morning","thermometer_id":"TH-12"}},"mitigation_skipped":{"type":"boolean","example":false,"description":"True records that the corrective action for a failed (`nok`) check was deliberately skipped. Only accepted when the occurrence's mitigation_policy is 1 (optional). See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy)."}}},"examples":{"Request Example":{"value":{"remarks":"Cooler was 1 degree over, door left open.","done_by":"100000000000045","type_specific":{"temperatures":[{"key":"t1","value":-19.5},{"key":"t2","value":4.5}]},"custom_fields":{"responsible_shift":"Morning"}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"occurrence_id":"AgBa8xB6_FkAWvMQerlFC0nP","begin":"2026-06-24T08:00:00","template":{"id":"100000000000010","name":"Fridge temperature control","type":"temperature_check","assignee":null,"type_specific":{"ccp":{"id":"100000000000001","name":"Fridge #1","code":"CCP-01"},"temperatures":[{"key":"t1","title":"Freezer","min_temperature":-22,"max_temperature":-18},{"key":"t2","title":"Cooler","min_temperature":2,"max_temperature":7}]},"description":"Morning check","prevent_early_execution":true,"active":true,"recurrence":{"frequency":"weekly","start_date":"2026-06-01","end_date":null,"start_time":"08:00","interval":1,"weekdays":["Monday","Wednesday","Friday"],"day_of_month":null,"month_of_year":null},"attachments":[{"id":"100000000000061","file":{"url":"https://storage.apicbase.com/task_files/instruction.pdf","name":"instruction.pdf"}}],"created":"2026-06-01T08:00:00Z","modified":"2026-06-15T12:30:00Z"},"awaiting_update":false,"mitigation_policy":2,"completion":{"result":"ok","submitted_at":"2026-06-24T08:15:00Z","done_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"submitted_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"remarks":"All within range","has_attachments":true,"mitigation_skipped":false,"had_corrective_action":false},"attachments":[{"id":"100000000000077","file":{"url":"https://storage.apicbase.com/task_files/photo.jpg","name":"photo.jpg"}}],"type_specific":{"temperatures":[{"key":"t1","title":"Freezer","value":-19.5},{"key":"t2","title":"Cooler","value":4.5}]},"custom_fields":[{"slug":"responsible_shift","name":"Shift","required":true,"value":"Morning"},{"slug":"thermometer_id","name":"Thermometer","required":false,"value":"TH-12"}],"history":[{"result":"nok","submitted_at":"2026-06-24T07:50:00Z","done_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"remarks":"Freezer above range, called maintenance","mitigation_skipped":false,"type_specific":{"temperatures":[{"key":"t1","title":"Freezer","value":-12.4},{"key":"t2","title":"Cooler","value":4.5}]}}]}},"Checklist task":{"value":{"occurrence_id":"AgBa8xC1_FkAWvMQerlFC0nR","begin":"2026-06-24T22:00:00","template":{"id":"100000000000011","name":"Closing checklist","type":"checklist_task","assignee":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"type_specific":{"ccp":{"id":"100000000000002","name":"Kitchen close","code":"CCP-07"},"checklist":["Check the door seal","Wipe down the shelves","Empty the waste bins"]},"description":"Run through every item before locking up","prevent_early_execution":false,"active":true,"recurrence":{"frequency":"daily","start_date":"2026-06-01","end_date":"2026-12-31","start_time":"22:00","interval":1,"weekdays":null,"day_of_month":null,"month_of_year":null},"attachments":[],"created":"2026-06-02T09:10:00Z","modified":"2026-06-02T09:10:00Z"},"awaiting_update":false,"mitigation_policy":2,"completion":{"result":"nok","submitted_at":"2026-06-24T22:20:00Z","done_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"submitted_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"remarks":"Waste bins left for the morning shift","has_attachments":false,"mitigation_skipped":false,"had_corrective_action":false},"attachments":[],"type_specific":{"checklist":["Check the door seal","Wipe down the shelves"]},"custom_fields":[],"history":[]}},"General task":{"value":{"occurrence_id":"AgBa8xC2_FkAWvMQerlFC0nS","begin":"2026-07-01T09:00:00","template":{"id":"100000000000012","name":"Monthly team briefing","type":"general_task","assignee":null,"type_specific":{},"description":"","prevent_early_execution":false,"active":false,"recurrence":{"frequency":"monthly","start_date":"2026-01-01","end_date":null,"start_time":"09:00","interval":1,"weekdays":null,"day_of_month":1,"month_of_year":null},"attachments":[],"created":"2026-01-05T11:00:00Z","modified":"2026-05-20T15:45:00Z"},"awaiting_update":false,"mitigation_policy":null,"completion":{"result":null,"submitted_at":null,"done_by":null,"submitted_by":null,"remarks":"","has_attachments":false,"mitigation_skipped":false,"had_corrective_action":false},"attachments":[],"type_specific":{},"custom_fields":[],"history":[]}}},"schema":{"type":"object","properties":{"occurrence_id":{"type":"string","example":"AgBa8xB6_FkAWvMQerlFC0nP","description":"The opaque token identifying this occurrence. Do not parse it."},"begin":{"type":"string","example":"2026-06-24T08:00:00","description":"When the occurrence is scheduled, in `YYYY-MM-DDTHH:MM:SS` format. This is a wall-clock time in the outlet's own timezone and carries no offset: read it as-is, the way the user sees it in the app. Do not convert it."},"template":{"type":"object","description":"The occurrence's task template, in the same shape as the template details endpoint but without the outlets list (an occurrence is bound to a single outlet).","properties":{"id":{"type":"string","example":"100000000000010","description":"The ID of the task template."},"name":{"type":"string","example":"Fridge temperature control","description":"The name of the task template."},"type":{"type":"string","example":"temperature_check","description":"The template type slug. Determines the contents of type_specific. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types). The set is open: new values may be added without it counting as a breaking change."},"assignee":{"type":"object","nullable":true,"description":"The user the task is assigned to.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"type_specific":{"type":"object","description":"Type-dependent template definitions. The keys present depend on the template type. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types).","properties":{"ccp":{"type":"object","description":"The linked critical control point. Present for every template type except `general_task`, `order` and `count`.","properties":{"id":{"type":"string","example":"100000000000001","description":"The ID of the critical control point."},"name":{"type":"string","example":"Fridge #1","description":"The name of the critical control point (CCP)."},"code":{"type":"string","example":"CCP-01","description":"A short code identifying the CCP. Can be empty."}}},"temperatures":{"type":"array","description":"Temperature check definitions. Present for temperature_check templates only.","items":{"type":"object","properties":{"key":{"type":"string","example":"t1","description":"The internal key used to match entered values against this definition."},"title":{"type":"string","example":"Freezer","description":"The label of the temperature measurement point."},"min_temperature":{"type":"number","example":-22,"description":"The lowest allowed temperature for the measurement."},"max_temperature":{"type":"number","example":-18,"description":"The highest allowed temperature for the measurement."}}}},"checklist":{"type":"array","description":"The checklist item labels. Present for checklist_task templates only.","items":{"type":"string","example":"Check the door seal"}}}},"description":{"type":"string","example":"Morning check","description":"The description of the task template. Can be empty."},"prevent_early_execution":{"type":"boolean","example":true,"description":"Whether the task cannot be completed before its scheduled day."},"active":{"type":"boolean","example":true,"description":"Whether the template's schedule is enabled."},"recurrence":{"type":"object","description":"The template's schedule. All keys are always present; keys that do not apply to the frequency are null.","properties":{"frequency":{"type":"string","enum":["once","daily","weekly","monthly","yearly"],"example":"weekly","description":"How often the task repeats. See [Recurrence](https://developers.apicbase.com/docs/compliance-task-reference-values#recurrence)."},"start_date":{"type":"string","format":"date","example":"2026-06-01","description":"The first day of the schedule, in ISO 8601 `YYYY-MM-DD` format."},"end_date":{"type":"string","format":"date","nullable":true,"description":"The last day of the schedule, or null when it repeats indefinitely. Always null for frequency once."},"start_time":{"type":"string","nullable":true,"example":"08:00","description":"The time of day the task is due, in `HH:MM` format."},"interval":{"type":"integer","nullable":true,"example":1,"description":"The repeat interval, e.g. 2 with frequency weekly means every two weeks."},"weekdays":{"type":"array","nullable":true,"description":"The days of the week the task repeats on. Only set for frequency weekly, null otherwise.","items":{"type":"string","enum":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"example":"Monday"}},"day_of_month":{"type":"integer","nullable":true,"description":"The day of the month the task repeats on. Only set for frequency monthly and yearly, null otherwise."},"month_of_year":{"type":"integer","nullable":true,"description":"The month the task repeats in (1-12). Only set for frequency yearly, null otherwise."}}},"attachments":{"type":"array","description":"Instruction files attached to the template.","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000061","description":"The ID of the attachment."},"file":{"type":"object","properties":{"url":{"type":"string","example":"https://storage.apicbase.com/task_files/instruction.pdf","description":"The download URL of the attachment file."},"name":{"type":"string","example":"instruction.pdf","description":"The file name of the attachment."}},"description":"The attached file, with its name and download URL."}}}},"created":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-01T08:00:00Z","description":"When the template was created."},"modified":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-15T12:30:00Z","description":"When the template was last modified."}}},"awaiting_update":{"type":"boolean","example":false,"description":"True when the occurrence was completed with a NOK result, the CCP's mitigation policy requires a corrective action, and mitigation was not skipped."},"mitigation_policy":{"type":"integer","enum":[0,1,2],"nullable":true,"example":2,"description":"Whether a corrective action is asked for when this occurrence fails. Taken from the linked CCP, and frozen once the occurrence is completed, so it can differ from the CCP's current policy. Null for a task type that carries no CCP. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy)."},"completion":{"type":"object","description":"The completion state. Always an object: all fields are empty or null while nothing has been recorded, partially filled once values are saved, filled once the task is resolved.","properties":{"result":{"type":"string","nullable":true,"enum":["ok","nok","not_applicable"],"example":"ok","description":"The outcome of the task: `ok` or `nok` once it is completed, `not_applicable` once it is marked not applicable, or null while it is neither. See [Completion result](https://developers.apicbase.com/docs/compliance-task-reference-values#completion-result)."},"submitted_at":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-24T08:15:00Z","description":"When the task was resolved — completed or marked not applicable — or null while it is neither."},"done_by":{"type":"object","nullable":true,"description":"The user recorded as the performer of the task.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"submitted_by":{"type":"object","nullable":true,"description":"The logged-in user who submitted the completion. Can differ from done_by when the performer was picked from a list.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"remarks":{"type":"string","example":"All within range","description":"Remarks entered on completion. Empty string when none."},"has_attachments":{"type":"boolean","example":true,"description":"Whether the completion has attachments. The attachment list itself is in the top-level attachments field."},"mitigation_skipped":{"type":"boolean","example":false,"description":"Whether the user explicitly skipped the corrective action for a failed (`nok`) check. Only ever true when the occurrence's mitigation_policy is 1 (optional); any other policy refuses the skip. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy)."},"had_corrective_action":{"type":"boolean","example":false,"description":"True when the task was completed with a NOK result and later corrected to OK."}}},"attachments":{"type":"array","description":"Files attached to the task (photos, documents)","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000077","description":"The ID of the attachment."},"file":{"type":"object","properties":{"url":{"type":"string","example":"https://storage.apicbase.com/task_files/photo.jpg","description":"The download URL of the attachment file."},"name":{"type":"string","example":"photo.jpg","description":"The file name of the attachment."}},"description":"The attached file, with its name and download URL."}}}},"type_specific":{"type":"object","description":"The values entered on completion, matching the template type. temperature_check: temperatures as {key, title, value}; checklist_task: the labels of the checked items; empty object for other types or while nothing was entered.","properties":{"temperatures":{"type":"array","description":"The entered temperature values. Present for temperature_check templates only.","items":{"type":"object","properties":{"key":{"type":"string","example":"t1","description":"The key of the matching definition in template.type_specific.temperatures."},"title":{"type":"string","example":"Freezer","description":"The label of the measured temperature point."},"value":{"type":"number","nullable":true,"example":-19.5,"description":"The measured temperature, or null while it was not entered."}}}},"checklist":{"type":"array","description":"The labels of the checked items. Present for checklist_task templates only.","items":{"type":"string","example":"Check the door seal"}}}},"custom_fields":{"type":"array","description":"The library's configurable task fields with the values entered for this occurrence.","items":{"type":"object","properties":{"slug":{"type":"string","example":"responsible_shift","description":"The machine-readable key of the custom field."},"name":{"type":"string","example":"Shift","description":"The display name of the custom field."},"required":{"type":"boolean","example":true,"description":"Whether the field has to be filled in to complete the occurrence."},"value":{"type":"string","nullable":true,"example":"Morning","description":"The entered value, or null when not filled in."}}}},"history":{"type":"array","description":"Previous versions of the completion, newest first, up to 50 entries. The current version is in completion. Empty when the occurrence was never re-submitted.","items":{"type":"object","properties":{"result":{"type":"string","nullable":true,"enum":["ok","nok","not_applicable"],"example":"nok","description":"The outcome of that version of the task, `ok`, `nok` or `not_applicable`, or null while it was neither completed nor marked not applicable."},"submitted_at":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-24T07:50:00Z","description":"When that version was resolved, in ISO 8601 format, or null while it was neither completed nor marked not applicable."},"done_by":{"type":"object","nullable":true,"description":"The user recorded as the performer of this version.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"remarks":{"type":"string","example":"Freezer above range, called maintenance","description":"Remarks recorded on that version. Can be empty."},"mitigation_skipped":{"type":"boolean","example":false,"description":"Whether the user explicitly skipped the corrective action for that version's failed (`nok`) check. Only ever true when the mitigation_policy in force for that version was 1 (optional)."},"type_specific":{"type":"object","description":"The values entered in this version, in the same shape as the occurrence-level type_specific.","properties":{"temperatures":{"type":"array","description":"The temperature values entered in this version. Present for temperature_check templates only.","items":{"type":"object","properties":{"key":{"type":"string","example":"t1","description":"The key of the matching definition in template.type_specific.temperatures."},"title":{"type":"string","example":"Freezer","description":"The label of the measured temperature point."},"value":{"type":"number","nullable":true,"example":-12.4,"description":"The measured temperature, or null while it was not entered."}}}},"checklist":{"type":"array","description":"The labels of the items checked in this version. Present for checklist_task templates only.","items":{"type":"string","example":"Check the door seal"}}}}}}}}}}}},"400":{"description":"Bad request — the payload failed validation, or a save rule refused it.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Two forms. A field the serializer rejects comes back keyed by field name, nested under `type_specific` where it applies. A rule the save service refuses comes back as a single `message` instead."},"examples":{"done_by_unknown":{"summary":"The performer is not a user of the library","value":{"done_by":["Invalid id \"999999999999999\" - user does not exist."]}},"temperature_not_a_number":{"summary":"A measurement sent as something other than a number","value":{"type_specific":{"temperatures":[{"value":["A valid number is required."]}]}}},"value_missing":{"summary":"A value the task defines is still empty","value":{"message":"Fill in every value before completing the task: Freezer."}},"nok_without_remarks":{"summary":"The values put the result out of range and no remarks explain it","value":{"message":"Given temperature does not fall within the allowed range. Please fill in the remarks."}},"required_custom_field_missing":{"summary":"A custom field the library marks as required is not filled in","value":{"message":"Fill in the required fields: Shift."}},"before_the_scheduled_day":{"summary":"The template has prevent_early_execution set and the day has not come yet","value":{"message":"This task cannot be completed or marked as not applicable before its scheduled day."}},"mitigation_skip_not_allowed":{"summary":"The corrective action was skipped while the mitigation policy does not offer the choice","value":{"message":"Corrective action cannot be skipped for this task."}}}}}},"403":{"description":"Forbidden — the Tasks module is off, or the user lacks the permission needed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"module_disabled":{"summary":"The Tasks module is not enabled for the library","value":{"detail":"Your library does not have Compliance Tasks module active."}},"no_permission":{"summary":"The user lacks the permission this endpoint needs","value":{"message":"You have no permission to perform that action. If you think you should be allowed please contact your library admin"}},"completed_task_edit":{"summary":"A resolved occurrence edited without the permission to edit completed tasks — the same message as any other missing permission","value":{"message":"You have no permission to perform that action. If you think you should be allowed please contact your library admin"}}}}}},"404":{"description":"Occurrence not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}},"examples":{"not_found":{"summary":"Unknown, malformed or out-of-reach occurrence token — a foreign occurrence is a 404 so its existence is not leaked","value":{"message":"Occurrence not found."}}}}}},"409":{"description":"Conflict — another request is writing this day of the task.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"description":"The save is refused rather than queued behind the other request, and nothing is written, so the same request can simply be sent again."},"examples":{"day_locked":{"summary":"Another request is saving the same day of the same task in the same outlet","value":{"detail":"This task is currently being modified. Please try again."}}}}}}},"deprecated":false}},"/compliance/tasks/occurrences/{occurrence_id}/not_applicable/":{"post":{"summary":"Mark Task Occurrence Not Applicable","description":"Marks one task occurrence not applicable: the check could not be performed and should not count as missed. `completion.result` becomes `not_applicable`. Refused on an occurrence that is already completed or already marked not applicable — its remarks and custom fields are edited through [Save Task Occurrence](https://developers.apicbase.com/reference/save-occurrence), and a real measurement is recorded through [Complete Task Occurrence](https://developers.apicbase.com/reference/complete-occurrence).","operationId":"mark-occurrence-not-applicable","parameters":[{"name":"occurrence_id","in":"path","description":"The opaque occurrence token from the calendar endpoint.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"remarks":{"type":"string","example":"Fridge out of order, no deliveries today.","description":"Why the task could not be performed. Required: an occurrence carrying no remarks at all is refused."},"done_by":{"type":"string","nullable":true,"example":"100000000000045","description":"The ID of the user who performed the task, reported back as completion.done_by. Has to be a user of the library with access to the occurrence's outlet. Left out, it is not changed."},"type_specific":{"type":"object","description":"Values entered before the occurrence turned out not to be performable. Written as sent, but they do not produce a result. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types).","properties":{"temperatures":{"type":"array","description":"The measured temperatures of a temperature_check occurrence. Merged per measurement.","items":{"type":"object","required":["key","value"],"properties":{"key":{"type":"string","example":"t1","description":"The key of the template temperature this measurement belongs to."},"value":{"type":"number","nullable":true,"example":-19.5,"description":"The measured temperature, as a number — a numeric string is rejected. Null clears the measurement."}}}},"checklist":{"type":"array","description":"The labels of the checked items of a checklist_task occurrence. Replaced as a whole, not merged. A label the task does not define is rejected.","items":{"type":"string","example":"Check the door seal"}}}},"custom_fields":{"type":"object","description":"The values of the library's task custom fields, keyed by field slug. A slug the library does not define is rejected; a `choices` field takes one of its configured options and a `multi` field a list of them.","additionalProperties":true,"example":{"responsible_shift":"Morning","thermometer_id":"TH-12"}}}},"examples":{"Request Example":{"value":{"remarks":"Fridge out of order, no deliveries today.","done_by":"100000000000045"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"occurrence_id":"AgBa8xB6_FkAWvMQerlFC0nP","begin":"2026-06-24T08:00:00","template":{"id":"100000000000010","name":"Fridge temperature control","type":"temperature_check","assignee":null,"type_specific":{"ccp":{"id":"100000000000001","name":"Fridge #1","code":"CCP-01"},"temperatures":[{"key":"t1","title":"Freezer","min_temperature":-22,"max_temperature":-18},{"key":"t2","title":"Cooler","min_temperature":2,"max_temperature":7}]},"description":"Morning check","prevent_early_execution":true,"active":true,"recurrence":{"frequency":"weekly","start_date":"2026-06-01","end_date":null,"start_time":"08:00","interval":1,"weekdays":["Monday","Wednesday","Friday"],"day_of_month":null,"month_of_year":null},"attachments":[{"id":"100000000000061","file":{"url":"https://storage.apicbase.com/task_files/instruction.pdf","name":"instruction.pdf"}}],"created":"2026-06-01T08:00:00Z","modified":"2026-06-15T12:30:00Z"},"awaiting_update":false,"mitigation_policy":2,"completion":{"result":"not_applicable","submitted_at":"2026-06-24T08:15:00Z","done_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"submitted_by":{"id":"100000000000045","username":"chef@restaurant.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/"},"remarks":"Fridge out of order, no deliveries today.","has_attachments":false,"mitigation_skipped":false,"had_corrective_action":false},"attachments":[],"type_specific":{"temperatures":[{"key":"t1","title":"Freezer","value":null},{"key":"t2","title":"Cooler","value":null}]},"custom_fields":[{"slug":"responsible_shift","name":"Shift","required":true,"value":"Morning"},{"slug":"thermometer_id","name":"Thermometer","required":false,"value":"TH-12"}],"history":[]}}},"schema":{"type":"object","properties":{"occurrence_id":{"type":"string","example":"AgBa8xB6_FkAWvMQerlFC0nP","description":"The opaque token identifying this occurrence. Do not parse it."},"begin":{"type":"string","example":"2026-06-24T08:00:00","description":"When the occurrence is scheduled, in `YYYY-MM-DDTHH:MM:SS` format. This is a wall-clock time in the outlet's own timezone and carries no offset: read it as-is, the way the user sees it in the app. Do not convert it."},"template":{"type":"object","description":"The occurrence's task template, in the same shape as the template details endpoint but without the outlets list (an occurrence is bound to a single outlet).","properties":{"id":{"type":"string","example":"100000000000010","description":"The ID of the task template."},"name":{"type":"string","example":"Fridge temperature control","description":"The name of the task template."},"type":{"type":"string","example":"temperature_check","description":"The template type slug. Determines the contents of type_specific. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types). The set is open: new values may be added without it counting as a breaking change."},"assignee":{"type":"object","nullable":true,"description":"The user the task is assigned to.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"type_specific":{"type":"object","description":"Type-dependent template definitions. The keys present depend on the template type. See [Template types](https://developers.apicbase.com/docs/compliance-task-reference-values#template-types).","properties":{"ccp":{"type":"object","description":"The linked critical control point. Present for every template type except `general_task`, `order` and `count`.","properties":{"id":{"type":"string","example":"100000000000001","description":"The ID of the critical control point."},"name":{"type":"string","example":"Fridge #1","description":"The name of the critical control point (CCP)."},"code":{"type":"string","example":"CCP-01","description":"A short code identifying the CCP. Can be empty."}}},"temperatures":{"type":"array","description":"Temperature check definitions. Present for temperature_check templates only.","items":{"type":"object","properties":{"key":{"type":"string","example":"t1","description":"The internal key used to match entered values against this definition."},"title":{"type":"string","example":"Freezer","description":"The label of the temperature measurement point."},"min_temperature":{"type":"number","example":-22,"description":"The lowest allowed temperature for the measurement."},"max_temperature":{"type":"number","example":-18,"description":"The highest allowed temperature for the measurement."}}}},"checklist":{"type":"array","description":"The checklist item labels. Present for checklist_task templates only.","items":{"type":"string","example":"Check the door seal"}}}},"description":{"type":"string","example":"Morning check","description":"The description of the task template. Can be empty."},"prevent_early_execution":{"type":"boolean","example":true,"description":"Whether the task cannot be completed before its scheduled day."},"active":{"type":"boolean","example":true,"description":"Whether the template's schedule is enabled."},"recurrence":{"type":"object","description":"The template's schedule. All keys are always present; keys that do not apply to the frequency are null.","properties":{"frequency":{"type":"string","enum":["once","daily","weekly","monthly","yearly"],"example":"weekly","description":"How often the task repeats. See [Recurrence](https://developers.apicbase.com/docs/compliance-task-reference-values#recurrence)."},"start_date":{"type":"string","format":"date","example":"2026-06-01","description":"The first day of the schedule, in ISO 8601 `YYYY-MM-DD` format."},"end_date":{"type":"string","format":"date","nullable":true,"description":"The last day of the schedule, or null when it repeats indefinitely. Always null for frequency once."},"start_time":{"type":"string","nullable":true,"example":"08:00","description":"The time of day the task is due, in `HH:MM` format."},"interval":{"type":"integer","nullable":true,"example":1,"description":"The repeat interval, e.g. 2 with frequency weekly means every two weeks."},"weekdays":{"type":"array","nullable":true,"description":"The days of the week the task repeats on. Only set for frequency weekly, null otherwise.","items":{"type":"string","enum":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"example":"Monday"}},"day_of_month":{"type":"integer","nullable":true,"description":"The day of the month the task repeats on. Only set for frequency monthly and yearly, null otherwise."},"month_of_year":{"type":"integer","nullable":true,"description":"The month the task repeats in (1-12). Only set for frequency yearly, null otherwise."}}},"attachments":{"type":"array","description":"Instruction files attached to the template.","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000061","description":"The ID of the attachment."},"file":{"type":"object","properties":{"url":{"type":"string","example":"https://storage.apicbase.com/task_files/instruction.pdf","description":"The download URL of the attachment file."},"name":{"type":"string","example":"instruction.pdf","description":"The file name of the attachment."}},"description":"The attached file, with its name and download URL."}}}},"created":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-01T08:00:00Z","description":"When the template was created."},"modified":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-15T12:30:00Z","description":"When the template was last modified."}}},"awaiting_update":{"type":"boolean","example":false,"description":"True when the occurrence was completed with a NOK result, the CCP's mitigation policy requires a corrective action, and mitigation was not skipped."},"mitigation_policy":{"type":"integer","enum":[0,1,2],"nullable":true,"example":2,"description":"Whether a corrective action is asked for when this occurrence fails. Taken from the linked CCP, and frozen once the occurrence is completed, so it can differ from the CCP's current policy. Null for a task type that carries no CCP. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy)."},"completion":{"type":"object","description":"The completion state. Always an object: all fields are empty or null while nothing has been recorded, partially filled once values are saved, filled once the task is resolved.","properties":{"result":{"type":"string","nullable":true,"enum":["ok","nok","not_applicable"],"example":"ok","description":"The outcome of the task: `ok` or `nok` once it is completed, `not_applicable` once it is marked not applicable, or null while it is neither. See [Completion result](https://developers.apicbase.com/docs/compliance-task-reference-values#completion-result)."},"submitted_at":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-24T08:15:00Z","description":"When the task was resolved — completed or marked not applicable — or null while it is neither."},"done_by":{"type":"object","nullable":true,"description":"The user recorded as the performer of the task.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"submitted_by":{"type":"object","nullable":true,"description":"The logged-in user who submitted the completion. Can differ from done_by when the performer was picked from a list.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"remarks":{"type":"string","example":"All within range","description":"Remarks entered on completion. Empty string when none."},"has_attachments":{"type":"boolean","example":true,"description":"Whether the completion has attachments. The attachment list itself is in the top-level attachments field."},"mitigation_skipped":{"type":"boolean","example":false,"description":"Whether the user explicitly skipped the corrective action for a failed (`nok`) check. Only ever true when the occurrence's mitigation_policy is 1 (optional); any other policy refuses the skip. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy)."},"had_corrective_action":{"type":"boolean","example":false,"description":"True when the task was completed with a NOK result and later corrected to OK."}}},"attachments":{"type":"array","description":"Files attached to the task (photos, documents)","items":{"type":"object","properties":{"id":{"type":"string","example":"100000000000077","description":"The ID of the attachment."},"file":{"type":"object","properties":{"url":{"type":"string","example":"https://storage.apicbase.com/task_files/photo.jpg","description":"The download URL of the attachment file."},"name":{"type":"string","example":"photo.jpg","description":"The file name of the attachment."}},"description":"The attached file, with its name and download URL."}}}},"type_specific":{"type":"object","description":"The values entered on completion, matching the template type. temperature_check: temperatures as {key, title, value}; checklist_task: the labels of the checked items; empty object for other types or while nothing was entered.","properties":{"temperatures":{"type":"array","description":"The entered temperature values. Present for temperature_check templates only.","items":{"type":"object","properties":{"key":{"type":"string","example":"t1","description":"The key of the matching definition in template.type_specific.temperatures."},"title":{"type":"string","example":"Freezer","description":"The label of the measured temperature point."},"value":{"type":"number","nullable":true,"example":-19.5,"description":"The measured temperature, or null while it was not entered."}}}},"checklist":{"type":"array","description":"The labels of the checked items. Present for checklist_task templates only.","items":{"type":"string","example":"Check the door seal"}}}},"custom_fields":{"type":"array","description":"The library's configurable task fields with the values entered for this occurrence.","items":{"type":"object","properties":{"slug":{"type":"string","example":"responsible_shift","description":"The machine-readable key of the custom field."},"name":{"type":"string","example":"Shift","description":"The display name of the custom field."},"required":{"type":"boolean","example":true,"description":"Whether the field has to be filled in to complete the occurrence."},"value":{"type":"string","nullable":true,"example":"Morning","description":"The entered value, or null when not filled in."}}}},"history":{"type":"array","description":"Previous versions of the completion, newest first, up to 50 entries. The current version is in completion. Empty when the occurrence was never re-submitted.","items":{"type":"object","properties":{"result":{"type":"string","nullable":true,"enum":["ok","nok","not_applicable"],"example":"nok","description":"The outcome of that version of the task, `ok`, `nok` or `not_applicable`, or null while it was neither completed nor marked not applicable."},"submitted_at":{"type":"string","format":"date-time","nullable":true,"example":"2026-06-24T07:50:00Z","description":"When that version was resolved, in ISO 8601 format, or null while it was neither completed nor marked not applicable."},"done_by":{"type":"object","nullable":true,"description":"The user recorded as the performer of this version.","properties":{"id":{"type":"string","example":"100000000000045","description":"The ID of the user."},"username":{"type":"string","example":"chef@restaurant.com","description":"The email address of the user."},"first_name":{"type":"string","example":"John","description":"The first name of the user."},"last_name":{"type":"string","example":"Doe","description":"The last name of the user."},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/100000000000045/","description":"The URL of the user's detail endpoint."}}},"remarks":{"type":"string","example":"Freezer above range, called maintenance","description":"Remarks recorded on that version. Can be empty."},"mitigation_skipped":{"type":"boolean","example":false,"description":"Whether the user explicitly skipped the corrective action for that version's failed (`nok`) check. Only ever true when the mitigation_policy in force for that version was 1 (optional)."},"type_specific":{"type":"object","description":"The values entered in this version, in the same shape as the occurrence-level type_specific.","properties":{"temperatures":{"type":"array","description":"The temperature values entered in this version. Present for temperature_check templates only.","items":{"type":"object","properties":{"key":{"type":"string","example":"t1","description":"The key of the matching definition in template.type_specific.temperatures."},"title":{"type":"string","example":"Freezer","description":"The label of the measured temperature point."},"value":{"type":"number","nullable":true,"example":-12.4,"description":"The measured temperature, or null while it was not entered."}}}},"checklist":{"type":"array","description":"The labels of the items checked in this version. Present for checklist_task templates only.","items":{"type":"string","example":"Check the door seal"}}}}}}}}}}}},"400":{"description":"Bad request — the payload failed validation, or a save rule refused it.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Two forms. A field the serializer rejects comes back keyed by field name, nested under `type_specific` where it applies. A rule the save service refuses comes back as a single `message` instead."},"examples":{"done_by_unknown":{"summary":"The performer is not a user of the library","value":{"done_by":["Invalid id \"999999999999999\" - user does not exist."]}},"temperature_not_a_number":{"summary":"A measurement sent as something other than a number","value":{"type_specific":{"temperatures":[{"value":["A valid number is required."]}]}}},"remarks_missing":{"summary":"No remarks explaining why the task is not applicable","value":{"message":"Not applicable requires remarks explaining why."}},"already_resolved":{"summary":"The occurrence is already completed or already marked not applicable","value":{"message":"This task is already completed or marked not applicable. Use the appropriate endpoint to edit it."}},"before_the_scheduled_day":{"summary":"The template has prevent_early_execution set and the day has not come yet","value":{"message":"This task cannot be completed or marked as not applicable before its scheduled day."}}}}}},"403":{"description":"Forbidden — the Tasks module is off, or the user lacks the permission needed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"module_disabled":{"summary":"The Tasks module is not enabled for the library","value":{"detail":"Your library does not have Compliance Tasks module active."}},"no_permission":{"summary":"The user lacks the permission this endpoint needs","value":{"message":"You have no permission to perform that action. If you think you should be allowed please contact your library admin"}},"completed_task_edit":{"summary":"A resolved occurrence edited without the permission to edit completed tasks — the same message as any other missing permission","value":{"message":"You have no permission to perform that action. If you think you should be allowed please contact your library admin"}}}}}},"404":{"description":"Occurrence not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}},"examples":{"not_found":{"summary":"Unknown, malformed or out-of-reach occurrence token — a foreign occurrence is a 404 so its existence is not leaked","value":{"message":"Occurrence not found."}}}}}},"409":{"description":"Conflict — another request is writing this day of the task.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"description":"The save is refused rather than queued behind the other request, and nothing is written, so the same request can simply be sent again."},"examples":{"day_locked":{"summary":"Another request is saving the same day of the same task in the same outlet","value":{"detail":"This task is currently being modified. Please try again."}}}}}}},"deprecated":false}},"/compliance/tasks/occurrences/{occurrence_id}/attachments/":{"post":{"summary":"Add Task Occurrence Attachment","description":"Attaches a file to one task occurrence, for example the photo backing up a check. On an occurrence that is already completed or marked not applicable the attachment is written as a new version and the permission to edit completed tasks is required.","operationId":"add-occurrence-attachment","parameters":[{"name":"occurrence_id","in":"path","description":"The opaque occurrence token from the calendar endpoint.","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"The file to attach. At most 4 MB, and one of the accepted types: PDF, Word, Excel, plain text, CSV or an image."}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":{"id":"100000000000061","file":{"url":"https://storage.apicbase.com/task_files/photo.jpg","name":"photo.jpg"}}}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"100000000000061","description":"The ID of the attachment."},"file":{"type":"object","description":"The attached file, with its name and download URL.","properties":{"url":{"type":"string","example":"https://storage.apicbase.com/task_files/instruction.pdf","description":"The download URL of the attachment file."},"name":{"type":"string","example":"instruction.pdf","description":"The file name of the attachment."}}}}}}}},"400":{"description":"Bad request — the uploaded file was refused.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Field errors keyed by field name."},"examples":{"no_file":{"summary":"The request carries no file part","value":{"file":["No file was submitted."]}},"too_large":{"summary":"The file is over the 4 MB limit","value":{"file":["The file cannot be larger than 4 MB."]}},"extension_not_allowed":{"summary":"The file type is not one of the accepted ones — the message itself lists them","value":{"file":["File extension “exe” is not allowed."]}}}}}},"403":{"description":"Forbidden — the Tasks module is off, or the user lacks the permission needed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"module_disabled":{"summary":"The Tasks module is not enabled for the library","value":{"detail":"Your library does not have Compliance Tasks module active."}},"no_permission":{"summary":"The user may not perform the task in this outlet, or the occurrence is already resolved and the user cannot edit completed tasks","value":{"message":"You have no permission to perform that action. If you think you should be allowed please contact your library admin"}}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"occurrence_not_found":{"summary":"Unknown, malformed or out-of-reach occurrence token — a foreign occurrence is a 404 so its existence is not leaked","value":{"detail":"Occurrence not found."}}}}}},"409":{"description":"Conflict — another request is writing the same task.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"description":"Nothing is written, so the same request can simply be sent again."},"examples":{"locked":{"summary":"Another request is writing the same day of the same task in the same outlet","value":{"detail":"This task is currently being modified. Please try again."}}}}}}},"deprecated":false}},"/compliance/tasks/occurrences/{occurrence_id}/attachments/{attachment_id}/":{"delete":{"summary":"Delete Task Occurrence Attachment","description":"Detaches a file from one task occurrence. The file itself is kept, so the earlier versions of a completed occurrence keep their link to it. On an occurrence that is already completed or marked not applicable the detach is written as a new version and the permission to edit completed tasks is required.","operationId":"delete-occurrence-attachment","parameters":[{"name":"occurrence_id","in":"path","description":"The opaque occurrence token from the calendar endpoint.","schema":{"type":"string"},"required":true},{"name":"attachment_id","in":"path","description":"The ID of the attachment, as returned in the `attachments` list.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"Attachment detached."},"403":{"description":"Forbidden — the Tasks module is off, or the user lacks the permission needed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"module_disabled":{"summary":"The Tasks module is not enabled for the library","value":{"detail":"Your library does not have Compliance Tasks module active."}},"no_permission":{"summary":"The user may not perform the task in this outlet, or the occurrence is already resolved and the user cannot edit completed tasks","value":{"message":"You have no permission to perform that action. If you think you should be allowed please contact your library admin"}}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string"}}},{"type":"object","properties":{"message":{"type":"string"}}}]},"examples":{"occurrence_not_found":{"summary":"Unknown, malformed or out-of-reach occurrence token","value":{"detail":"Occurrence not found."}},"attachment_not_found":{"summary":"The attachment is not one of this occurrence's — an attachment of another task is not found here either","value":{"detail":"Attachment not found."}}}}}},"409":{"description":"Conflict — another request is writing the same task.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"description":"Nothing is written, so the same request can simply be sent again."},"examples":{"locked":{"summary":"Another request is writing the same day of the same task in the same outlet","value":{"detail":"This task is currently being modified. Please try again."}}}}}}},"deprecated":false}},"/production_plan/{plan_id}/instances/":{"post":{"summary":"Create Production Run","description":"Creates a production run from a plan. Optionally schedules it for a future auto-start with `run_at`.","operationId":"create-production-run","parameters":[{"name":"plan_id","in":"path","description":"The ID of the production plan.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"run_at":{"type":"string","format":"date-time","description":"Optional scheduled auto-start time. When provided, the run is created with a schedule.","example":"2026-04-01T08:00:00Z"}}},"examples":{"Without schedule":{"value":{}},"With schedule":{"value":{"run_at":"2026-04-01T08:00:00Z"}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"000000000000001"},"name":{"type":"string","example":"Weekly prep"},"instantiated_plan_number":{"type":"string","example":"PPL-123-1"},"state":{"type":"string","enum":["READY","IN_PROGRESS","PARTIALLY_DONE","DONE"],"example":"READY"},"started_at":{"type":"string","format":"date-time","nullable":true,"example":null},"ended_at":{"type":"string","format":"date-time","nullable":true,"example":null},"created_at":{"type":"string","format":"date-time","example":"2026-04-01T07:00:00Z"},"plan":{"type":"object","properties":{"id":{"type":"string","example":"000000000000123"},"name":{"type":"string","example":"Weekly prep"}}},"schedule":{"type":"object","nullable":true,"description":"The auto-start schedule. `null` when no `run_at` was provided.","properties":{"run_at":{"type":"string","format":"date-time","example":"2026-04-01T08:00:00Z"}}},"creation_event":{"type":"object","nullable":true,"description":"Set when the run is finished. `null` until then.","properties":{"id":{"type":"string","example":"000000000000500"}}}}}}}},"400":{"description":"Invalid request body, or `run_at` is in the past."},"403":{"description":"The user does not have permission to create production runs."},"404":{"description":"Production plan not found."}},"deprecated":false}},"/production_plan/instances/":{"get":{"summary":"List Production Runs","description":"Returns a paginated list of production runs. Outlet users see only runs from their active outlet. Library users see all runs across their library; pass `outlet_id` to narrow the result to a single outlet.","operationId":"list-production-runs","parameters":[{"name":"outlet_id","in":"query","description":"The outlet's ID. Optional filter for library users to scope results to a single outlet; ignored for outlet users.","schema":{"type":"string"}},{"name":"state__in","in":"query","description":"Comma-separated list of states. Allowed values: `READY`, `IN_PROGRESS`, `PARTIALLY_DONE`, `DONE`.","schema":{"type":"string"},"example":"READY,IN_PROGRESS"},{"name":"run_at_from","in":"query","description":"Only return runs scheduled on or after this date.","schema":{"type":"string","format":"date"}},{"name":"run_at_to","in":"query","description":"Only return runs scheduled on or before this date.","schema":{"type":"string","format":"date"}},{"name":"page","in":"query","description":"Page number.","schema":{"type":"integer","example":1}},{"name":"page_size","in":"query","description":"Number of results per page (default 10, maximum 200).","schema":{"type":"integer","example":50}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","example":42},"next":{"type":"string","nullable":true,"example":null},"previous":{"type":"string","nullable":true,"example":null},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000001"},"name":{"type":"string","example":"Weekly prep"},"instantiated_plan_number":{"type":"string","example":"PPL-123-1"},"state":{"type":"string","enum":["READY","IN_PROGRESS","PARTIALLY_DONE","DONE"],"example":"READY"},"started_at":{"type":"string","format":"date-time","nullable":true,"example":null},"ended_at":{"type":"string","format":"date-time","nullable":true,"example":null},"created_at":{"type":"string","format":"date-time","example":"2026-04-01T07:00:00Z"},"plan":{"type":"object","properties":{"id":{"type":"string","example":"000000000000123"},"name":{"type":"string","example":"Weekly prep"}}},"schedule":{"type":"object","nullable":true,"properties":{"run_at":{"type":"string","format":"date-time","example":"2026-04-01T08:00:00Z"}}},"creation_event":{"type":"object","nullable":true,"description":"Set when the run is finished. `null` until then.","properties":{"id":{"type":"string","example":"000000000000500"}}}}}}}}}}},"403":{"description":"The user does not have permission to view production runs."},"404":{"description":"The `outlet_id` does not match an outlet in the library."}},"deprecated":false}},"/production_plan/instances/{instance_id}/":{"delete":{"summary":"Delete Production Run","description":"Soft-deletes a production run. Allowed in any state.","operationId":"delete-production-run","parameters":[{"name":"instance_id","in":"path","description":"The ID of the production run.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"Production run deleted."},"403":{"description":"The user does not have permission to delete production runs."},"404":{"description":"Production run not found."}},"deprecated":false}},"/production_plan/instances/{instance_id}/start/":{"post":{"summary":"Start Production Run","description":"Moves a `READY` production run to `IN_PROGRESS`. This endpoint has no request body.","operationId":"start-production-run","parameters":[{"name":"instance_id","in":"path","description":"The ID of the production run.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"000000000000001"},"name":{"type":"string","example":"Weekly prep"},"instantiated_plan_number":{"type":"string","example":"PPL-123-1"},"state":{"type":"string","example":"IN_PROGRESS","enum":["READY","IN_PROGRESS","PARTIALLY_DONE","DONE"]},"started_at":{"type":"string","format":"date-time","example":"2026-04-01T08:00:00Z"},"ended_at":{"type":"string","format":"date-time","nullable":true,"example":null},"created_at":{"type":"string","format":"date-time","example":"2026-04-01T07:00:00Z"},"plan":{"type":"object","properties":{"id":{"type":"string","example":"000000000000123"},"name":{"type":"string","example":"Weekly prep"}}},"schedule":{"type":"object","nullable":true,"example":null},"creation_event":{"type":"object","nullable":true,"description":"Set when the run is finished. `null` until then.","properties":{"id":{"type":"string","example":"000000000000500"}}}}}}}},"400":{"description":"The production run has already been started or finished."},"403":{"description":"The user does not have permission to start production runs."},"404":{"description":"Production run not found."},"409":{"description":"The production run is currently being modified by another request. Try again shortly."}},"deprecated":false}},"/production_plan/instances/{instance_id}/finish/":{"post":{"summary":"Finish Production Run","description":"Closes a production run and creates an inventory preparation event covering all stockable tasks. The resulting state is `DONE` if every task is already `DONE`, otherwise `PARTIALLY_DONE`. Task states are not modified by this endpoint — use Update Production Run Task Status first to mark tasks `DONE`.\n\nThe `tasks` array is required but may be empty — send `[]` to finish with no per-task overrides. Each entry carries per-task inventory metadata (`quantity`, `lot_number`, `expiry_date`). Every task referenced here must already be in `DONE` state and must be a stockable (recipe-based) task; submitting an unfinished task or a custom task returns 400.","operationId":"finish-production-run","parameters":[{"name":"instance_id","in":"path","description":"The ID of the production run.","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tasks"],"properties":{"tasks":{"type":"array","description":"Per-task inventory metadata. Only stockable (recipe-based) tasks may appear here.","items":{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"The task's ID.","example":"000000000000100"},"quantity":{"type":"string","description":"Optional actual produced quantity, overriding the planned quantity for the inventory event.","example":"5.00"},"lot_number":{"type":"string","nullable":true,"description":"Lot number. Must be unique within the library.","example":"20260415001"},"expiry_date":{"type":"string","format":"date-time","nullable":true,"description":"Optional expiry date for the inventory event.","example":"2026-06-15T00:00:00Z"}}}}}},"examples":{"No per-task metadata":{"value":{"tasks":[]}},"With per-task metadata":{"value":{"tasks":[{"id":"000000000000100","quantity":"5.00","lot_number":"20260415001","expiry_date":"2026-06-15T00:00:00Z"}]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"000000000000001"},"name":{"type":"string","example":"Weekly prep"},"instantiated_plan_number":{"type":"string","example":"PPL-123-1"},"state":{"type":"string","example":"DONE","enum":["READY","IN_PROGRESS","PARTIALLY_DONE","DONE"]},"started_at":{"type":"string","format":"date-time","example":"2026-04-01T08:00:00Z"},"ended_at":{"type":"string","format":"date-time","example":"2026-04-01T11:30:00Z"},"created_at":{"type":"string","format":"date-time","example":"2026-04-01T07:00:00Z"},"plan":{"type":"object","properties":{"id":{"type":"string","example":"000000000000123"},"name":{"type":"string","example":"Weekly prep"}}},"schedule":{"type":"object","nullable":true,"example":null},"creation_event":{"type":"object","nullable":true,"description":"Set by this finish call.","properties":{"id":{"type":"string","example":"000000000000500"}}}}}}}},"400":{"description":"The production run has not been started yet or has already been finished, the payload references tasks that do not belong to this run, includes a custom task, includes a task not yet in `DONE` state, or contains a duplicate `lot_number`."},"403":{"description":"The user does not have permission to finish production runs."},"404":{"description":"Production run not found."},"409":{"description":"The production run is currently being modified by another request. Try again shortly."}},"deprecated":false}},"/production_plan/instances/{instance_id}/tasks/":{"get":{"summary":"List Production Run Tasks","description":"Returns all tasks within a production run, ordered by their display order.","operationId":"list-production-run-tasks","parameters":[{"name":"instance_id","in":"path","description":"The ID of the production run.","schema":{"type":"string"},"required":true},{"name":"workstation","in":"query","description":"Only return tasks assigned to this workstation.","schema":{"type":"string"}},{"name":"person","in":"query","description":"Only return tasks where the given person is assigned as the default person.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000100"},"order":{"type":"integer","example":0},"name":{"type":"string","example":"Make Béchamel"},"workstation":{"type":"array","items":{"type":"string"},"example":["Sauce station"]},"plan_remarks":{"type":"string","nullable":true,"example":"Use fresh butter"},"notes":{"type":"string","example":""},"quantity":{"type":"string","example":"10.00"},"unit":{"type":"string","example":"kg"},"stock_item":{"type":"object","nullable":true,"description":"`null` when the underlying stock item has been deleted.","properties":{"id":{"type":"string","example":"000000000000020"},"name":{"type":"string","example":"Béchamel sauce"},"portion":{"type":"object","properties":{"quantity":{"type":"string","example":"1.00"},"unit":{"type":"string","example":"kg"}}},"is_base_stock_item":{"type":"boolean","example":false}}},"item":{"type":"object","nullable":true,"description":"The task's source (recipe, custom task, menu, incoming order, or incoming order package). `null` when the source has been deleted.","properties":{"id":{"type":"string","example":"000000000000030"},"name":{"type":"string","example":"Béchamel sauce"},"class":{"type":"string","enum":["recipe","custom","menu","incoming_order","incoming_order_package"],"example":"recipe"}}},"state":{"type":"string","enum":["TODO","IN_PROGRESS","DONE"],"example":"TODO"},"person":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"000000000000050"},"name":{"type":"string","example":"Jane Doe"}}},"started_at":{"type":"string","format":"date-time","nullable":true,"example":null},"started_by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"000000000000050"},"name":{"type":"string","example":"Jane Doe"}}},"ended_at":{"type":"string","format":"date-time","nullable":true,"example":null},"ended_by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"000000000000050"},"name":{"type":"string","example":"Jane Doe"}}},"foreseen_time_minutes":{"type":"integer","description":"Estimated production time in minutes, derived from the recipe. `0` when it cannot be computed.","example":30}}}}}}},"403":{"description":"The user does not have permission to view this production run."},"404":{"description":"Production run not found."}},"deprecated":false}},"/production_plan/instances/{instance_id}/tasks/status/":{"patch":{"summary":"Update Production Run Task Status","description":"Updates the state, assignees, timing, and notes of one or more tasks within a production run. Uses PATCH semantics: omit a field to leave it unchanged, or send a value to set it. The nullable fields (`person`, `started_by`, `ended_by`, `started_at`, `ended_at`) clear with `null`; `notes` clears with an empty string instead. Audit fields depend on the target `state`: a `TODO` task must have none set, `IN_PROGRESS` requires `started_at` + `started_by`, and `DONE` requires `started_at` + `started_by` + `ended_at` + `ended_by`. Timestamps cannot be in the future, and `ended_at` cannot be earlier than `started_at`.","operationId":"update-production-run-task-status","parameters":[{"name":"instance_id","in":"path","description":"The ID of the production run.","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tasks"],"properties":{"tasks":{"type":"array","items":{"type":"object","required":["id","state"],"properties":{"id":{"type":"string","description":"The task's ID.","example":"000000000000100"},"state":{"type":"string","enum":["TODO","IN_PROGRESS","DONE"],"example":"IN_PROGRESS"},"person":{"type":"string","nullable":true,"description":"ID of the default person assigned to the task. Omit to keep, `null` to clear.","example":"000000000000050"},"started_by":{"type":"string","nullable":true,"description":"ID of the person who started the task. Required for `IN_PROGRESS` and `DONE`; must not be set for `TODO`.","example":"000000000000050"},"ended_by":{"type":"string","nullable":true,"description":"ID of the person who finished the task. Required for `DONE`; must not be set for `TODO`.","example":"000000000000051"},"notes":{"type":"string","description":"Free-text notes. Send `\"\"` to clear.","example":"Used last bag of flour"},"started_at":{"type":"string","format":"date-time","nullable":true,"description":"When work started. Required for `IN_PROGRESS` and `DONE`; must not be set for `TODO`. Cannot be in the future.","example":"2026-04-01T09:00:00Z"},"ended_at":{"type":"string","format":"date-time","nullable":true,"description":"When work finished. Required for `DONE`; must not be set for `TODO`. Cannot be in the future or earlier than `started_at`.","example":"2026-04-01T09:45:00Z"}}}}}},"examples":{"Request Example":{"value":{"tasks":[{"id":"000000000000100","state":"IN_PROGRESS","person":"000000000000050","started_at":"2026-04-01T09:00:00Z","started_by":"000000000000050","notes":"Used last bag of flour"}]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","description":"All tasks in the production run after the update, in display order. Each entry has the same shape as List Production Run Tasks.","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000100"},"order":{"type":"integer","example":0},"name":{"type":"string","example":"Make Béchamel"},"workstation":{"type":"array","items":{"type":"string"},"example":["Sauce station"]},"plan_remarks":{"type":"string","nullable":true,"example":"Use fresh butter"},"notes":{"type":"string","example":"Used last bag of flour"},"quantity":{"type":"string","example":"10.00"},"unit":{"type":"string","example":"kg"},"stock_item":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"000000000000020"},"name":{"type":"string","example":"Béchamel sauce"},"portion":{"type":"object","properties":{"quantity":{"type":"string","example":"1.00"},"unit":{"type":"string","example":"kg"}}},"is_base_stock_item":{"type":"boolean","example":false}}},"item":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"000000000000030"},"name":{"type":"string","example":"Béchamel sauce"},"class":{"type":"string","enum":["recipe","custom","menu","incoming_order","incoming_order_package"],"example":"recipe"}}},"state":{"type":"string","enum":["TODO","IN_PROGRESS","DONE"],"example":"IN_PROGRESS"},"person":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"000000000000050"},"name":{"type":"string","example":"Jane Doe"}}},"started_at":{"type":"string","format":"date-time","nullable":true,"example":"2026-04-01T09:00:00Z"},"started_by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"000000000000050"},"name":{"type":"string","example":"Jane Doe"}}},"ended_at":{"type":"string","format":"date-time","nullable":true,"example":null},"ended_by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"000000000000050"},"name":{"type":"string","example":"Jane Doe"}}},"foreseen_time_minutes":{"type":"integer","example":30}}}},"examples":{"Result":{"value":[{"id":"000000000000100","order":0,"name":"Make Béchamel","workstation":["Sauce station"],"plan_remarks":"Use fresh butter","notes":"Used last bag of flour","quantity":"10.00","unit":"kg","stock_item":{"id":"000000000000020","name":"Béchamel sauce","portion":{"quantity":"1.00","unit":"kg"},"is_base_stock_item":false},"item":{"id":"000000000000030","name":"Béchamel sauce","class":"recipe"},"state":"IN_PROGRESS","person":{"id":"000000000000050","name":"Jane Doe"},"started_at":"2026-04-01T09:00:00Z","started_by":{"id":"000000000000050","name":"Jane Doe"},"ended_at":null,"ended_by":null,"foreseen_time_minutes":30}]}}}}},"400":{"description":"Payload is invalid, one or more task IDs do not belong to this production run or appear more than once in the request, the production run has already been finished, the audit fields do not match the target `state` (`TODO` must have none set; `IN_PROGRESS` requires `started_at` + `started_by`; `DONE` requires `started_at` + `started_by` + `ended_at` + `ended_by`), a timestamp is in the future, or `ended_at` is earlier than `started_at`."},"403":{"description":"The user does not have permission to modify this production run."},"404":{"description":"Production run not found, or one of the referenced people does not exist or is outside the production run's outlet scope."},"409":{"description":"The production run is currently being modified by another request. Try again shortly."}},"deprecated":false}},"/production_plan/instances/{instance_id}/schedule/":{"patch":{"summary":"Update Production Run Schedule","description":"Sets or updates the auto-start schedule for a production run. Idempotent — creates the schedule if it does not exist.","operationId":"update-production-run-schedule","parameters":[{"name":"instance_id","in":"path","description":"The ID of the production run.","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["run_at"],"properties":{"run_at":{"type":"string","format":"date-time","description":"The scheduled auto-start time.","example":"2026-04-02T08:00:00Z"}}},"examples":{"Request Example":{"value":{"run_at":"2026-04-02T08:00:00Z"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","description":"The production run with its updated schedule. Same shape as Create Production Run.","properties":{"id":{"type":"string","example":"000000000000001"},"name":{"type":"string","example":"Weekly prep"},"instantiated_plan_number":{"type":"string","example":"PPL-123-1"},"state":{"type":"string","enum":["READY","IN_PROGRESS","PARTIALLY_DONE","DONE"],"example":"READY"},"started_at":{"type":"string","format":"date-time","nullable":true,"example":null},"ended_at":{"type":"string","format":"date-time","nullable":true,"example":null},"created_at":{"type":"string","format":"date-time","example":"2026-04-01T07:00:00Z"},"plan":{"type":"object","properties":{"id":{"type":"string","example":"000000000000123"},"name":{"type":"string","example":"Weekly prep"}}},"schedule":{"type":"object","properties":{"run_at":{"type":"string","format":"date-time","example":"2026-04-02T08:00:00Z"}}},"creation_event":{"type":"object","nullable":true,"description":"Set when the run is finished. `null` until then.","properties":{"id":{"type":"string","example":"000000000000500"}}}}}}}},"400":{"description":"`run_at` is missing, has an invalid format, or is in the past."},"403":{"description":"The user does not have permission to schedule production runs."},"404":{"description":"Production run not found."}},"deprecated":false},"delete":{"summary":"Delete Production Run Schedule","description":"Removes the auto-start schedule from a production run. The production run itself is not affected.","operationId":"delete-production-run-schedule","parameters":[{"name":"instance_id","in":"path","description":"The ID of the production run.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"Schedule deleted."},"403":{"description":"The user does not have permission to modify the schedule."},"404":{"description":"Production run not found, or the run has no schedule."}},"deprecated":false}},"/inventory/outlets/{outlet_id}/count_events/{top_count_id}/":{"get":{"summary":"Get Top Count Details","description":"Returns detailed information about a top count and all of its sub-counts.","operationId":"get-top-count-details","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"top_count_id","in":"path","description":"A top count's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n    \"id\": \"322371791760003\",\n    \"name\": \"My Count\",\n    \"owned_by\":{\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n    },\n    \"created_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n    },\n    \"finished_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n    },\n  \t\"created\": \"2021-03-29T12:22:58\",\n    \"actual_date\": \"2020-10-17T14:01:55Z\",\n    \"finished\": null,\n    \"stock_value\": null,\n    \"remarks\": null,\n    \"status\": \"Opened\",\n    \"full_count\": false,\n    \"counted_items_quantity\": 2,\n    \"partial_counts\": [\n        {\n            \"id\": \"622371402790002\",\n            \"owned_by\": {\n                \"id\": \"236300957450001\",\n                \"username\": \"john.doe@apicbase.com\",\n                \"first_name\": \"John\",\n                \"last_name\": \"Doe\",\n                \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n            },\n            \"created_by\": {\n                \"id\": \"236300957450001\",\n                \"username\": \"john.doe@apicbase.com\",\n                \"first_name\": \"John\",\n                \"last_name\": \"Doe\",\n                \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n            },\n            \"finished_by\": {\n                \"id\": \"236300957450001\",\n                \"username\": \"john.doe@apicbase.com\",\n                \"first_name\": \"John\",\n                \"last_name\": \"Doe\",\n                \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n            },\n            \"created\": \"2021-03-29T12:22:58\",\n            \"finished\": null,\n            \"stock_value\": null,\n            \"remarks\": null,\n            \"in_progress\": true,\n            \"description\": \"Sub-count 1\",\n            \"counted_items_quantity\": 2\n        }\n    ]\n}"}}}}}},"deprecated":false},"delete":{"summary":"Cancel Top Count","description":"Cancels and deletes a top count and all of its sub-counts.","operationId":"cancel-top-count","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"top_count_id","in":"path","description":"A top count's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"status\": \"success\"\n}"}},"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/count_events/{top_count_id}/stocks/":{"get":{"summary":"Get Stock Items in a Top Count","description":"Returns a list of counted stock items in a specific top count.","operationId":"get-stock-items-in-a-top-count","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"top_count_id","in":"path","description":"A top count event's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"[\n  {\n    \"stock_item\": {\n      \"id\": \"521093553960007\",\n      \"name\": \"Apples Package (10 kg)\",\n      \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/521093553960007/\"\n    },\n    \"quantity\": \"1.0000000000\",\n    \"inventory_log_entries\": [\n      {\n        \"theoretical_quantity\": \"0.0000000000\",\n        \"quantity\": \"1.0000000000\",\n        \"variance_quantity\": \"1.0000000000\",\n        \"theoretical_value\": \"0.0000000000\",\n        \"counted_value\": \"27.9999600000\",\n        \"variance_value\": \"27.9999600000\"\n      }\n    ]\n  },\n  {\n    \"stock_item\": {\n      \"id\": \"321993625020001\",\n      \"name\": \"Basmani Rice Recipe Z Pack (1 kg)\",\n      \"url\": \"http://app.apicbase.com/api/v2/products/stock_items/321993625020001/\"\n    },\n    \"quantity\": \"6.0000000000\",\n    \"inventory_log_entries\": [\n      {\n        \"theoretical_quantity\": \"1.0000000000\",\n        \"quantity\": \"6.0000000000\",\n        \"variance_quantity\": \"5.0000000000\",\n        \"theoretical_value\": \"2.5000000000\",\n        \"counted_value\": \"15.0000000000\",\n        \"variance_value\": \"12.5000000000\"\n      }\n    ]\n  }\n]"}},"schema":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"521093553960007"},"name":{"type":"string","example":"Apples Package (10 kg)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/521093553960007/"}}},"quantity":{"type":"string","example":"1.0000000000"},"inventory_log_entries":{"type":"array","items":{"type":"object","properties":{"theoretical_quantity":{"type":"string","example":"0.0000000000"},"quantity":{"type":"string","example":"1.0000000000"},"variance_quantity":{"type":"string","example":"1.0000000000"},"theoretical_value":{"type":"string","example":"0.0000000000"},"counted_value":{"type":"string","example":"27.9999600000"},"variance_value":{"type":"string","example":"27.9999600000"}}}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/count_events/":{"get":{"summary":"Get Top Counts","description":"Returns a list of all top counts in an outlet.","operationId":"get-top-counts","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID","schema":{"type":"string"},"required":true},{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"page_size","in":"query","description":"The number of results per page. Defaults to 10, capped at 100.","schema":{"type":"integer","format":"int32","maximum":100}},{"name":"status","in":"query","description":"Filter on the count's status: `0` opened, `1` reopened, `2` closed.","schema":{"type":"string","enum":["0","1","2"]}},{"name":"created_date","in":"query","description":"Filter on a creation date (exact).","schema":{"type":"string","format":"date"}},{"name":"created_date__gt","in":"query","description":"Filter on a creation date (greater than).","schema":{"type":"string","format":"date"}},{"name":"created_date__lt","in":"query","description":"Filter on a creation date (lower than).","schema":{"type":"string","format":"date"}},{"name":"actual_date","in":"query","description":"Filter on the event's actual date, as specified by the user.","schema":{"type":"string","format":"date"}},{"name":"actual_date__gt","in":"query","description":"Filter on the event's actual date, as specified by the user (greater than).","schema":{"type":"string","format":"date"}},{"name":"actual_date__lt","in":"query","description":"Filter on the event's actual date, as specified by the user (lower than).","schema":{"type":"string","format":"date"}},{"name":"remarks","in":"query","description":"Query the contents of the remarks field.","schema":{"type":"string"}},{"name":"created_by","in":"query","description":"A user ID.","schema":{"type":"string"}},{"name":"created_by__email","in":"query","description":"A user's email address.","schema":{"type":"string"}},{"name":"owned_by","in":"query","description":"A user ID.","schema":{"type":"string"}},{"name":"owned_by__email","in":"query","description":"A user's email address.","schema":{"type":"string"}},{"name":"stock_value","in":"query","description":"The event's total stock value in variation (exact).","schema":{"type":"number","format":"float"}},{"name":"stock_value__gt","in":"query","description":"The event's total stock value in variation (greater than).","schema":{"type":"number","format":"float"}},{"name":"stock_value__lt","in":"query","description":"The event's total stock value in variation (lower than).","schema":{"type":"number","format":"float"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"count":2,"next":null,"previous":null,"results":[{"id":"422471249150002","name":"My Count","status":"Opened","full_count":false,"created":"2020-06-17T14:02:43Z","actual_date":"2020-06-17T14:01:55Z","finished":null,"created_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"},"owned_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"},"finished_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"},"stock_value":null,"remarks":null,"stock_period":null},{"id":"322471629160006","name":"Count #4","status":"Closed","full_count":true,"created":"2020-06-17T14:01:55Z","actual_date":"2020-06-17T14:01:55Z","finished":"2020-06-17T14:02:39Z","created_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"},"owned_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"},"finished_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"},"stock_value":"-6.00","remarks":"Weekly stock take","stock_period":{"id":"722371512760004","name":"June 2020","status":"Closed"}}]}}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":2,"description":"The total number of top counts matching the request."},"next":{"type":"string","nullable":true,"description":"A link to the next page of results."},"previous":{"type":"string","nullable":true,"description":"A link to the previous page of results."},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"422471249150002","description":"The top count's ID."},"name":{"type":"string","example":"My Count","description":"The top count's name. Auto-generated when the count was started without one."},"status":{"type":"string","example":"Opened","enum":["Opened","Reopened","Closed","Processing","Awaiting"],"description":"The top count's status."},"full_count":{"type":"boolean","example":false,"description":"Whether the count covers the outlet's full assortment."},"created":{"type":"string","format":"date-time","example":"2020-06-17T14:02:43Z","description":"When the top count was started."},"actual_date":{"type":"string","format":"date-time","nullable":true,"example":"2020-06-17T14:01:55Z","description":"The date the count applies to, as specified by the user."},"finished":{"type":"string","format":"date-time","nullable":true,"example":"2020-06-17T14:02:39Z","description":"When the top count was submitted. Null while the count is still open."},"created_by":{"type":"object","nullable":true,"description":"The user who started the top count.","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"owned_by":{"type":"object","nullable":true,"description":"The user the top count is assigned to.","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"finished_by":{"type":"object","nullable":true,"description":"The user who submitted the top count. Mirrors `owned_by`.","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"stock_value":{"type":"string","nullable":true,"example":"-6.00","description":"The inventory's total variation in value after the count was submitted. Only populated on closed counts, and can be negative."},"remarks":{"type":"string","nullable":true,"example":"Weekly stock take","description":"Free text entered by the user."},"stock_period":{"type":"object","nullable":true,"description":"The stock period this count is attributed to. Null when the outlet does not use stock periods.","properties":{"id":{"type":"string","example":"722371512760004"},"name":{"type":"string","example":"June 2020"},"status":{"type":"string","example":"Closed","enum":["Open","Closed","Reopened"]}}}}}}}}}}},"403":{"description":"User lacks permission to view counts in this outlet."},"404":{"description":"Outlet not found."}},"deprecated":false},"post":{"summary":"Start Top Count","description":"Starts an empty count event at a specific outlet.","operationId":"start-top-count","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"A name for the event. An auto-generated name will be given if left empty."}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":{"status":"success","name":"Count #5","instance":{"id":"722371512760004","owned_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"},"created_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"},"finished_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"},"created":"2021-03-29T12:31:58","actual_date":"2020-06-17T14:01:55Z","finished":null,"stock_value":null,"remarks":null,"in_progress":true}}}},"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"name":{"type":"string","example":"Count #5"},"instance":{"type":"object","properties":{"id":{"type":"string","example":"722371512760004"},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"finished_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"created":{"type":"string","example":"2021-03-29T12:31:58"},"finished":{},"stock_value":{},"remarks":{},"in_progress":{"type":"boolean","example":true,"default":true},"actual_date":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"status\": \"fail\",\n  \"message\": \"Already exists\"\n}"}},"schema":{"type":"object","properties":{"status":{"type":"string","example":"fail"},"message":{"type":"string","example":"Already exists"}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/count_events/{top_count_id}/submit/":{"patch":{"summary":"Submit Top Count","description":"Closes and submit a top count.","operationId":"submit-top-count","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"top_count_id","in":"path","description":"A top count's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"status":"success","instance":{"id":"922371522770008","owned_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"},"created_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"},"finished_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"},"created":"2021-03-29T12:34:36","actual_date":"2020-06-17T14:01:55Z","finished":"2021-03-29T12:35:23","stock_value":"37.80","remarks":null,"status":"Closed","full_count":false,"counted_items_quantity":2,"partial_counts":[{"id":"222371532710009","owned_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"},"created_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"},"finished_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"},"created":"2021-03-29T12:34:36","finished":"2021-03-29T12:35:23","stock_value":null,"remarks":null,"in_progress":false,"description":"Sub-count 1","counted_items_quantity":2}]}}}},"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"stock_period_assigned":{"type":"boolean","description":"Present only when `stock_period_id` was supplied and the submit completed within the request. `true` when the count is now the period's closing count; `false` when the count was saved but the assignment did not land (for example the period was closed by another request in between). Absent on a 202.","example":true},"instance":{"type":"object","properties":{"id":{"type":"string","example":"922371522770008"},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"finished_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"created":{"type":"string","example":"2021-03-29T12:34:36"},"finished":{"type":"string","example":"2021-03-29T12:35:23"},"stock_value":{"type":"string","example":"37.80"},"remarks":{},"status":{"type":"string","example":"Closed"},"full_count":{"type":"boolean","example":false,"default":false},"counted_items_quantity":{"type":"integer","example":2,"default":0},"partial_counts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"222371532710009"},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"finished_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"created":{"type":"string","example":"2021-03-29T12:34:36"},"finished":{"type":"string","example":"2021-03-29T12:35:23"},"stock_value":{},"remarks":{},"in_progress":{"type":"boolean","example":false,"default":true},"description":{"type":"string","example":"Sub-count 1"},"counted_items_quantity":{"type":"integer","example":2,"default":0}}}}}}}}}}},"202":{"description":"Accepted: the stock queue did not finish within the request. The count, and any period assignment requested with `stock_period_id`, land when the worker completes. The body carries no `stock_period_assigned`."},"400":{"description":"The count cannot be submitted, or the supplied `stock_period_id` cannot take this count as its closing count."},"403":{"description":"User lacks permission to submit the count, or stock periods are not enabled for the outlet."},"404":{"description":"Count event not found."}},"deprecated":false,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"actual_date":{"type":"string","format":"date-time"},"remarks":{"type":"string"},"full_count":{"type":"boolean","description":"Optional. Marks the count as a full count. This is an informative flag only: it does not change any stock values, calculations, or other behaviour, except when `stock_period_id` is supplied, in which case it must be `true`.","default":false},"stock_period_id":{"type":"string","nullable":true,"description":"Optional. The ID of an open stock period. When supplied together with `full_count: true`, the submitted count becomes that period's closing count. The period is validated before the count is submitted, so a rejected period leaves the count in progress; a period that already has a closing count is rejected. Write-only: the outcome is reported in `stock_period_assigned`.","example":"129330627520004"}}}}}}}},"/inventory/outlets/{outlet_id}/count_events/{top_count_id}/partials/":{"post":{"summary":"Start Sub-Count","description":"Starts a sub-count within a top count.","operationId":"start-sub-count","parameters":[{"name":"outlet_id","in":"path","required":true,"description":"An outlet's ID.","schema":{"type":"string"}},{"name":"top_count_id","in":"path","required":true,"description":"A top count's ID.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","description":"A name for the sub-count. The name will be \"Sub-count N\" if this is not given."}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"status\": \"success\",\n  \"instance\": {\n    \"id\": \"922371982750002\",\n    \"owned_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"created_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"finished_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"created\": \"2021-03-29T12:58:08\",\n    \"finished\": null,\n    \"stock_value\": null,\n    \"remarks\": null,\n    \"in_progress\": true,\n    \"description\": \"Sub-count 1\",\n    \"counted_items_quantity\": 0\n  }\n}"}},"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"instance":{"type":"object","properties":{"id":{"type":"string","example":"922371982750002"},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"finished_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"created":{"type":"string","example":"2021-03-29T12:58:08"},"finished":{},"stock_value":{},"remarks":{},"in_progress":{"type":"boolean","example":true,"default":true},"description":{"type":"string","example":"Sub-count 1"},"counted_items_quantity":{"type":"integer","example":0,"default":0}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/count_events/{top_count_id}/partials/{sub_count_id}/":{"delete":{"summary":"Cancel Sub-Count","description":"Cancels and deletes a sub-count.","operationId":"cancel-sub-count","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"top_count_id","in":"path","description":"A top count's ID.","schema":{"type":"string"},"required":true},{"name":"sub_count_id","in":"path","description":"A sub-count's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"status\": \"success\"\n}"}},"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/count_events/{top_count_id}/partials/{sub_count_id}/claim/":{"patch":{"summary":"Claim Sub-Count","description":"Claims a sub-count from another user.","operationId":"claim-sub-count","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"top_count_id","in":"path","description":"A top count's ID.","schema":{"type":"string"},"required":true},{"name":"sub_count_id","in":"path","description":"A sub-count's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"status\": \"success\",\n  \"instance\": {\n    \"id\": \"222371292790002\",\n    \"owned_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"created_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"finished_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"created\": \"2021-03-29T12:59:11\",\n    \"finished\": null,\n    \"stock_value\": null,\n    \"remarks\": null,\n    \"in_progress\": true,\n    \"description\": \"Sub-count 3\",\n    \"counted_items_quantity\": 2\n  }\n}"}},"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"instance":{"type":"object","properties":{"id":{"type":"string","example":"222371292790002"},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"finished_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"created":{"type":"string","example":"2021-03-29T12:59:11"},"finished":{},"stock_value":{},"remarks":{},"in_progress":{"type":"boolean","example":true,"default":true},"description":{"type":"string","example":"Sub-count 3"},"counted_items_quantity":{"type":"integer","example":2,"default":0}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/count_events/{top_count_id}/reset/":{"delete":{"summary":"Delete All Sub-Counts in a Top Count","description":"Deletes all sub-counts that belong to a top count.","operationId":"delete-all-sub-counts-in-a-top-count","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"top_count_id","in":"path","description":"A top count's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"status\": \"success\",\n  \"instance\": {\n    \"id\": \"822371262730002\",\n    \"owned_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"created_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"finished_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"created\": \"2021-03-29T12:55:12\",\n    \"finished\": null,\n    \"stock_value\": null,\n    \"remarks\": null,\n    \"in_progress\": true,\n    \"counted_items_quantity\": 0,\n    \"partial_counts\": []\n  }\n}"}},"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"instance":{"type":"object","properties":{"id":{"type":"string","example":"822371262730002"},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"finished_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"created":{"type":"string","example":"2021-03-29T12:55:12"},"finished":{},"stock_value":{},"remarks":{},"in_progress":{"type":"boolean","example":true,"default":true},"counted_items_quantity":{"type":"integer","example":0,"default":0},"partial_counts":{"type":"array"}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/count_events/{top_count_id}/partials/{sub_count_id}/set_single_item/":{"put":{"summary":"Update Item Quantity in a Sub-Count","description":"Counts a stock item in a sub-count.","operationId":"update-a-stock-items-quantity-in-a-sub-count","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"top_count_id","in":"path","description":"A top count's ID.","schema":{"type":"string"},"required":true},{"name":"sub_count_id","in":"path","description":"A sub-count's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["stock_item","quantity"],"properties":{"stock_item":{"type":"string","description":"A stock item ID."},"quantity":{"type":"number","description":"The counted quantity.","format":"float"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"status\": \"success\",\n  \"data\": {\n    \"stock_item\": {\n      \"id\": \"521093553960007\",\n      \"name\": \"Apples Package (10 kg)\",\n      \"url\": \"https:/app.apicbase.com/api/v1/products/stock_items/521093553960007/\"\n    },\n    \"current\": 2.5,\n    \"total\": 3\n  }\n}"}},"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"521093553960007"},"name":{"type":"string","example":"Apples Package (10 kg)"},"url":{"type":"string","example":"https:/app.apicbase.com/api/v1/products/stock_items/521093553960007/"}}},"current":{"type":"number","example":2.5,"default":0},"total":{"type":"integer","example":3,"default":0}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/count_events/{top_count_id}/partials/{sub_count_id}/set_items/":{"post":{"summary":"Overwrite Items in a Sub-Count","description":"Updates all of a sub-count's counted quantities.","operationId":"bulk-update-all-counted-stock-items-in-a-sub-count","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"top_count_id","in":"path","description":"A top count's ID.","schema":{"type":"string"},"required":true},{"name":"sub_count_id","in":"path","description":"A sub-count's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"RAW_BODY":{"type":"array","items":{"properties":{"stock_item":{"type":"string","description":"A stock item ID."},"quantity":{"type":"number","description":"The counted quantity.","format":"float"}},"required":["stock_item"],"type":"object"}}}},"examples":{"Request Example":{"value":[{"stock_item":"621093523900001","quantity":0},{"stock_item":"821893013920005","quantity":null},{"stock_item":"421193564060002","quantity":3},{"stock_item":"521093553960007","quantity":5}]}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"status\": \"success\",\n  \"stock_items_quantities\": [\n    {\n      \"stock_item\": {\n        \"id\": \"521093553960007\",\n        \"name\": \"Apples Package (10 kg)\",\n        \"url\": \"https://app.apicbase.comapi/v1/products/stock_items/521093553960007/\"\n      },\n      \"current\": 5,\n      \"total\": 5\n    },\n    {\n      \"stock_item\": {\n        \"id\": \"621093523900001\",\n        \"name\": \"Sunflower Oil Bottle (1 l)\",\n        \"url\": \"https://app.apicbase.comapi/v1/products/stock_items/621093523900001/\"\n      },\n      \"current\": 0,\n      \"total\": 0\n    },\n    {\n      \"stock_item\": {\n        \"id\": \"421193564060002\",\n        \"name\": \"Carrot Box (5 kg)\",\n        \"url\": \"https://app.apicbase.comapi/v1/products/stock_items/421193564060002/\"\n      },\n      \"current\": 3,\n      \"total\": 3\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"stock_items_quantities":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"521093553960007"},"name":{"type":"string","example":"Apples Package (10 kg)"},"url":{"type":"string","example":"https://app.apicbase.comapi/v1/products/stock_items/521093553960007/"}}},"current":{"type":"integer","example":5,"default":0},"total":{"type":"integer","example":5,"default":0}}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/count_events/{top_count_id}/partials/{sub_count_id}/reset/":{"patch":{"summary":"Delete All Items in a Sub-Count","description":"Removed all counted quantities from a specific sub-count.","operationId":"delete-all-stock-items-in-a-sub-count","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"top_count_id","in":"path","description":"A top count's ID.","schema":{"type":"string"},"required":true},{"name":"sub_count_id","in":"path","description":"A sub-count's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"status\": \"success\",\n  \"instance\": {\n    \"id\": \"222371292790002\",\n    \"owned_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"created_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"finished_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"created\": \"2021-03-29T12:59:11\",\n    \"finished\": null,\n    \"stock_value\": null,\n    \"remarks\": null,\n    \"in_progress\": true,\n    \"description\": \"Sub-count 3\",\n    \"counted_items_quantity\": 0\n  }\n}"}},"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"instance":{"type":"object","properties":{"id":{"type":"string","example":"222371292790002"},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"finished_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"created":{"type":"string","example":"2021-03-29T12:59:11"},"finished":{},"stock_value":{},"remarks":{},"in_progress":{"type":"boolean","example":true,"default":true},"description":{"type":"string","example":"Sub-count 3"},"counted_items_quantity":{"type":"integer","example":0,"default":0}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/count_events/{top_count_id}/partials/{sub_count_id}/submit/":{"patch":{"summary":"Submit Sub-Count","description":"Closes and submits a sub-count.","operationId":"submit-sub-count","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"top_count_id","in":"path","description":"A top count's ID.","schema":{"type":"string"},"required":true},{"name":"sub_count_id","in":"path","description":"A sub-count's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"status":"success","instance":{"id":"222371292790002","owned_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"},"created_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"},"finished_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"},"created":"2021-03-29T12:59:11","finished":"2021-03-30T11:36:23","stock_value":null,"remarks":null,"in_progress":false,"description":"Sub-count 3","counted_items_quantity":3}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/count_events/{top_count_id}/partials/{sub_count_id}/reopen/":{"patch":{"summary":"Reopen Sub-Count","description":"Reopens a closed sub-count.","operationId":"reopen-a-sub-count","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"top_count_id","in":"path","description":"A top count's ID.","schema":{"type":"string"},"required":true},{"name":"sub_count_id","in":"path","description":"A sub-count's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"status\": \"success\",\n  \"instance\": {\n    \"id\": \"222371292790002\",\n    \"owned_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"created_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"finished_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"created\": \"2021-03-29T12:59:11\",\n    \"finished\": null,\n    \"stock_value\": null,\n    \"remarks\": null,\n    \"in_progress\": true,\n    \"description\": \"Sub-count 3\",\n    \"counted_items_quantity\": 3\n  }\n}"}},"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"instance":{"type":"object","properties":{"id":{"type":"string","example":"222371292790002"},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"finished_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"created":{"type":"string","example":"2021-03-29T12:59:11"},"finished":{},"stock_value":{},"remarks":{},"in_progress":{"type":"boolean","example":true,"default":true},"description":{"type":"string","example":"Sub-count 3"},"counted_items_quantity":{"type":"integer","example":3,"default":0}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/count_events/{top_count_id}/partials/{sub_count_id}/update_description/":{"patch":{"summary":"Update Sub-Count Name","description":"Updates the description (name) of a sub-count.","operationId":"update-sub-count-name","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"top_count_id","in":"path","description":"A top count's ID.","schema":{"type":"string"},"required":true},{"name":"sub_count_id","in":"path","description":"A sub-count's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["description"],"properties":{"description":{"type":"string","description":"The sub-count's new name."}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"status\": \"success\",\n  \"instance\": {\n    \"id\": \"222371292790002\",\n    \"owned_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"created_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"finished_by\": {\n      \"id\": \"236300957450001\",\n      \"username\": \"john.doe@apicbase.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n    },\n    \"created\": \"2021-03-29T12:59:11\",\n    \"finished\": null,\n    \"stock_value\": null,\n    \"remarks\": null,\n    \"in_progress\": true,\n    \"description\": \"basement\",\n    \"counted_items_quantity\": 3\n  }\n}"}},"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"instance":{"type":"object","properties":{"id":{"type":"string","example":"222371292790002"},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"finished_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"created":{"type":"string","example":"2021-03-29T12:59:11"},"finished":{},"stock_value":{},"remarks":{},"in_progress":{"type":"boolean","example":true,"default":true},"description":{"type":"string","example":"basement"},"counted_items_quantity":{"type":"integer","example":3,"default":0}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/waste_events/":{"get":{"summary":"Get Waste Events","description":"Returns a list of waste events in an outlet.","operationId":"get-waste-events","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter on the event's status.","schema":{"type":"string","enum":["0","1","2"]}},{"name":"created_date","in":"query","description":"Filter on a creation date (exact).","schema":{"type":"string","format":"date"}},{"name":"created_date__gt","in":"query","description":"Filter on a creation date (greater than).","schema":{"type":"string","format":"date"}},{"name":"created_date__lt","in":"query","description":"Filter on a creation date (lower than).","schema":{"type":"string","format":"date"}},{"name":"actual_date","in":"query","description":"Filter on the event's actual date, as specified by the user.","schema":{"type":"string","format":"date"}},{"name":"actual_date__gt","in":"query","description":"Filter on the event's actual date, as specified by the user (greater than).","schema":{"type":"string","format":"date"}},{"name":"actual_date__lt","in":"query","description":"Filter on the event's actual date, as specified by the user (lower than).","schema":{"type":"string","format":"date"}},{"name":"remarks","in":"query","description":"Query the contents of the remarks field.","schema":{"type":"string"}},{"name":"created_by","in":"query","description":"A user ID.","schema":{"type":"string"}},{"name":"created_by__email","in":"query","description":"A user's email address.","schema":{"type":"string"}},{"name":"owned_by","in":"query","description":"A user ID.","schema":{"type":"string"}},{"name":"owned_by__email","in":"query","description":"A user's email address.","schema":{"type":"string"}},{"name":"stock_value","in":"query","description":"The event's total stock value variation (exact).","schema":{"type":"string"}},{"name":"stock_value__gt","in":"query","description":"The event's total stock value variation (greater than).","schema":{"type":"string"}},{"name":"stock_value__lt","in":"query","description":"The event's total stock value variation (lower than).","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"count\": 1,\n  \"next\": null,\n  \"previous\": null,\n  \"results\": [\n    {\n      \"id\": \"922162621490001\",\n      \"name\": \"My Waste Event\",\n      \"status\": \"Closed\",\n      \"created\": \"2021-03-16T19:01:52Z\",\n      \"finished\": \"2021-03-16T19:02:11Z\",\n      \"actual_date\": null,\n      \"remarks\": \"\",\n      \"created_by\": {\n        \"id\": \"136000910080000\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/users/136000910080000/\"\n      },\n      \"owned_by\": {\n        \"id\": \"136000910080000\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/users/136000910080000/\"\n      },\n      \"stock_value\": \"-53.46\",\n      \"items\": [\n        {\n          \"stock_item\": {\n            \"id\": \"821836538280009\",\n            \"name\": \"Milk Bottle (200 g)\",\n            \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/821836538280009/\"\n          },\n          \"recipe\": null,\n          \"quantity\": \"10\",\n          \"stock_value\": \"-10.00\",\n          \"remarks\": \"\",\n          \"stock_item_updates\": [\n            {\n              \"stock_item\": {\n                \"id\": \"821836538280009\",\n                \"name\": \"Milk cream Bottle (200 g)\",\n                \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/821836538280009/\"\n              },\n              \"original_quantity\": \"-10.00\",\n              \"original_unit\": \"Bottle (200 g)\",\n              \"quantity\": \"-10\",\n              \"stock_value\": \"-10.00\"\n            }\n          ],\n          \"waste_category\": \"Date expired\",\n          \"waste_category_value\": \"DATE_EXPIRED\"\n        },\n        {\n          \"recipe\": {\n            \"id\": \"449211344290008\",\n            \"name\": \"Açai Cremoso\",\n            \"url\": \"https://app.apicbase.com/api/v2/recipes/449211344290008/\"\n          },\n          \"stock_item\": null,\n          \"quantity\": \"10\",\n          \"stock_value\": \"-43.46\",\n          \"remarks\": \"\",\n          \"stock_item_updates\": [\n            {\n              \"stock_item\": {\n                \"id\": \"721836208200002\",\n                \"name\": \"Açai Bottle (1 l)\",\n                \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/721836208200002/\"\n              },\n              \"original_quantity\": \"-2551.02\",\n              \"original_unit\": \"g\",\n              \"quantity\": \"-2.55\",\n              \"stock_value\": \"-12.76\"\n            },\n            {\n              \"stock_item\": {\n                \"id\": \"421836028240009\",\n                \"name\": \"Condensed Milk Bottle (395 g)\",\n                \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421836028240009/\"\n              },\n              \"original_quantity\": \"-2078.95\",\n              \"original_unit\": \"g\",\n              \"quantity\": \"-5.26\",\n              \"stock_value\": \"-7.89\"\n            },\n            {\n              \"stock_item\": {\n                \"id\": \"821836538280009\",\n                \"name\": \"Milk cream Bottle (200 g)\",\n                \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/821836538280009/\"\n              },\n              \"original_quantity\": \"-1052.63\",\n              \"original_unit\": \"g\",\n              \"quantity\": \"-5.26\",\n              \"stock_value\": \"-5.26\"\n            },\n            {\n              \"stock_item\": {\n                \"id\": \"221836318250006\",\n                \"name\": \"Cereal Pack (120 g)\",\n                \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/221836318250006/\"\n              },\n              \"original_quantity\": \"-421.05\",\n              \"original_unit\": \"g\",\n              \"quantity\": \"-3.51\",\n              \"stock_value\": \"-17.54\"\n            }\n          ],\n          \"waste_category\": \"Returned by customer\",\n          \"waste_category_value\": \"RETURNED_BY_CUSTOMER\"\n        }\n      ]\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":1,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"922162621490001"},"name":{"type":"string","example":"My Waste Event"},"status":{"type":"string","example":"Closed"},"created":{"type":"string","example":"2021-03-16T19:01:52Z"},"finished":{"type":"string","example":"2021-03-16T19:02:11Z"},"actual_date":{},"remarks":{"type":"string","example":""},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"136000910080000"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"136000910080000"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"stock_value":{"type":"string","example":"-53.46"},"items":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"821836538280009"},"name":{"type":"string","example":"Milk Bottle (200 g)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/821836538280009/"}}},"recipe":{},"quantity":{"type":"string","example":"10"},"stock_value":{"type":"string","example":"-10.00"},"remarks":{"type":"string","example":""},"stock_item_updates":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"821836538280009"},"name":{"type":"string","example":"Milk cream Bottle (200 g)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/821836538280009/"}}},"original_quantity":{"type":"string","example":"-10.00"},"original_unit":{"type":"string","example":"Bottle (200 g)"},"quantity":{"type":"string","example":"-10"},"stock_value":{"type":"string","example":"-10.00"}}}},"waste_category":{"type":"string","example":"Date expired"},"waste_category_value":{"type":"string","example":"DATE_EXPIRED"}}}}}}}}}}}}},"deprecated":false},"post":{"summary":"Start Waste Event","description":"Starts a waste event at a specific outlet.","operationId":"start-waste-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"A name for the event. An auto-generated name will be given if left empty."}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"922471313120009\",\n  \"name\": \"Waste #5\",\n  \"in_progress\": true,\n  \"created\": \"2021-11-29T10:41:46.818064+01:00\",\n  \"finished\": null,\n  \"actual_date\": null,\n  \"remarks\": null,\n  \"created_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n  },\n  \"owned_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n  },\n  \"stock_value\": null,\n  \"items\": []\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"922471313120009"},"name":{"type":"string","example":"Waste #5"},"in_progress":{"type":"boolean","example":true,"default":true},"created":{"type":"string","example":"2021-11-29T10:41:46.818064+01:00"},"finished":{},"actual_date":{},"remarks":{},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"stock_value":{},"items":{"type":"array"}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/waste_events/{waste_event_id}/":{"get":{"summary":"Get Waste Event Details","description":"Returns detailed information about a single waste event.","operationId":"get-waste-event-details","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"waste_event_id","in":"path","description":"A waste event's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"922471313120009\",\n  \"name\": \"My Waste Event\",\n  \"status\": \"Opened\",\n  \"created\": \"2021-11-29T10:41:46Z\",\n  \"finished\": null,\n  \"actual_date\": null,\n  \"remarks\": null,\n  \"created_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n  },\n  \"owned_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n  },\n  \"stock_value\": null,\n  \"items\": [\n    {\n      \"stock_item\": null,\n      \"recipe\": {\n        \"id\": \"949960289010009\",\n        \"name\": \"My Waffles\",\n        \"url\": \"https://app.apicbase.com/api/v2/recipes/949960289010009/\"\n      },\n      \"quantity\": \"5\",\n      \"stock_value\": \"5.00\",\n      \"remarks\": \"Hmm\",\n      \"stock_item_updates\": [],\n      \"waste_category\": \"Returned by customer\",\n      \"waste_category_value\": \"RETURNED_BY_CUSTOMER\",\n      \"id\": \"123431829580008\"\n    },\n    {\n      \"stock_item\": {\n        \"id\": \"121993979080005\",\n        \"name\": \"Basmani Rice Recipe Z Pack (10 kg)\",\n        \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/121993979080005/\"\n      },\n      \"recipe\": null,\n      \"quantity\": \"4\",\n      \"stock_value\": \"0.00\",\n      \"remarks\": null,\n      \"stock_item_updates\": [],\n      \"waste_category\": \"Kitchen error\",\n      \"waste_category_value\": \"KITCHEN_ERROR\",\n      \"id\": \"223431739540002\"\n    },\n    {\n      \"stock_item\": {\n        \"id\": \"121993979080005\",\n        \"name\": \"Basmani Rice Recipe Z Pack (10 kg)\",\n        \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/121993979080005/\"\n      },\n      \"recipe\": null,\n      \"quantity\": \"47\",\n      \"stock_value\": \"0.00\",\n      \"remarks\": null,\n      \"stock_item_updates\": [],\n      \"waste_category\": \"Returned by customer\",\n      \"waste_category_value\": \"RETURNED_BY_CUSTOMER\",\n      \"id\": \"423431649520002\"\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"922471313120009"},"name":{"type":"string","example":"My Waste Event"},"status":{"type":"string","example":"Opened"},"created":{"type":"string","example":"2021-11-29T10:41:46Z"},"finished":{},"actual_date":{},"remarks":{},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"stock_value":{},"items":{"type":"array","items":{"type":"object","properties":{"stock_item":{},"recipe":{"type":"object","properties":{"id":{"type":"string","example":"949960289010009"},"name":{"type":"string","example":"My Waffles"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/recipes/949960289010009/"}}},"quantity":{"type":"string","example":"5"},"stock_value":{"type":"string","example":"5.00"},"remarks":{"type":"string","example":"Hmm"},"stock_item_updates":{"type":"array"},"waste_category":{"type":"string","example":"Returned by customer"},"waste_category_value":{"type":"string","example":"RETURNED_BY_CUSTOMER"},"id":{"type":"string","example":"123431829580008"}}}}}}}}}},"deprecated":false},"delete":{"summary":"Cancel Waste Event","description":"Cancels and deletes a waste event.","operationId":"cancel-waste-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"waste_event_id","in":"path","description":"A waste event's ID.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":""}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/waste_events/{waste_event_id}/items/":{"post":{"summary":"Add Item to Waste Event","description":"Adds an item (stock item or recipe) to a waste event.","operationId":"add-item-to-waste-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"waste_event_id","in":"path","description":"A waste event's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["quantity","waste_category"],"properties":{"stock_item":{"type":"string","description":"A stock item ID."},"recipe":{"type":"string","description":"A recipe ID."},"quantity":{"type":"number","description":"The wasted quantity.","format":"float"},"remarks":{"type":"string","description":"Any optional remarks."},"waste_category":{"type":"string","description":"A reason for wasting this item.","enum":["DATE_EXPIRED","RETURNED_BY_CUSTOMER","KITCHEN_ERROR","ITEM_RENDERED_UNUSABLE","MISTAKE_EXPIRED","MARKETING","FREEBIE","BREAKFAST","GENERAL_BUFFET","STAFF","ACCIDENT","OTHER"]}}},"examples":{"Request Example":{"value":{"waste_category":"RETURNED_BY_CUSTOMER","recipe":"949960289010009","stock_item":null,"quantity":"4","remarks":""}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"stock_item\": null,\n  \"recipe\": {\n    \"id\": \"949960289010009\",\n    \"name\": \"My Waffles\",\n    \"url\": \"https://app.apicbase.com/api/v1/recipes/949960289010009/\"\n  },\n  \"quantity\": \"4\",\n  \"stock_value\": \"0.00\",\n  \"remarks\": \"\",\n  \"stock_item_updates\": [],\n  \"waste_category\": \"Returned by customer\",\n  \"waste_category_value\": \"RETURNED_BY_CUSTOMER\",\n  \"id\": \"323431459590008\"\n}"}},"schema":{"type":"object","properties":{"stock_item":{},"recipe":{"type":"object","properties":{"id":{"type":"string","example":"949960289010009"},"name":{"type":"string","example":"My Waffles"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/recipes/949960289010009/"}}},"quantity":{"type":"string","example":"4"},"stock_value":{"type":"string","example":"0.00"},"remarks":{"type":"string","example":""},"stock_item_updates":{"type":"array"},"waste_category":{"type":"string","example":"Returned by customer"},"waste_category_value":{"type":"string","example":"RETURNED_BY_CUSTOMER"},"id":{"type":"string","example":"323431459590008"}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/waste_events/{waste_event_id}/items/{waste_event_item_id}/":{"patch":{"summary":"Update Item in Waste Event","description":"Updates a single item within a waste event.","operationId":"update-item-in-waste-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"waste_event_id","in":"path","description":"A waste event's ID.","schema":{"type":"string"},"required":true},{"name":"waste_event_item_id","in":"path","description":"A waste event item's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"quantity":{"type":"number","description":"The wasted quantity.","format":"float"},"remarks":{"type":"string","description":"Any optional remarks."},"waste_category":{"type":"string","description":"A reason for wasting this item.","enum":["DATE_EXPIRED","RETURNED_BY_CUSTOMER","KITCHEN_ERROR","ITEM_RENDERED_UNUSABLE","MISTAKE_EXPIRED","MARKETING","FREEBIE","BREAKFAST","GENERAL_BUFFET","STAFF","ACCIDENT","OTHER"]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"stock_item\": {\n    \"id\": \"321993625020001\",\n    \"name\": \"Basmani Rice Recipe Z Pack (1 kg)\",\n    \"url\": \"https://app.apicbase.com/api/v1/products/stock_items/321993625020001/\"\n  },\n  \"recipe\": null,\n  \"quantity\": \"5\",\n  \"stock_value\": \"0.00\",\n  \"remarks\": \"Updated remark\",\n  \"stock_item_updates\": [],\n  \"waste_category\": \"Returned by customer\",\n  \"waste_category_value\": \"RETURNED_BY_CUSTOMER\",\n  \"id\": \"123431419570000\"\n}"}},"schema":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"321993625020001"},"name":{"type":"string","example":"Basmani Rice Recipe Z Pack (1 kg)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/products/stock_items/321993625020001/"}}},"recipe":{},"quantity":{"type":"string","example":"5"},"stock_value":{"type":"string","example":"0.00"},"remarks":{"type":"string","example":"Updated remark"},"stock_item_updates":{"type":"array"},"waste_category":{"type":"string","example":"Returned by customer"},"waste_category_value":{"type":"string","example":"RETURNED_BY_CUSTOMER"},"id":{"type":"string","example":"123431419570000"}}}}}}},"deprecated":false},"delete":{"summary":"Remove Item from Waste Event","description":"Removes an item from a waste event.","operationId":"remove-item-from-waste-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"waste_event_id","in":"path","description":"A waste event's ID.","schema":{"type":"string"},"required":true},{"name":"waste_event_item_id","in":"path","description":"A waste event item's ID.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":""}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/waste_events/{waste_event_id}/full_update/":{"post":{"summary":"Overwrite Items in a Waste Event","description":"Updates all items in a waste event.","operationId":"bulk-update-items-in-a-waste-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"waste_event_id","in":"path","description":"A waste event's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"RAW_BODY":{"type":"array","description":"A list of items in the waste event.","items":{"properties":{"id":{"type":"string","description":"The ID of the waste event item being wasted. Only to be populated if editing an existing item."},"stock_item":{"type":"string","description":"A stock item ID."},"recipe":{"type":"string","description":"A recipe ID."},"quantity":{"type":"string","description":"The quantity being wasted."},"remarks":{"type":"string","description":"Any optional remarks."},"waste_category":{"type":"string","description":"A reason for wasting this item.","enum":["DATE_EXPIRED","RETURNED_BY_CUSTOMER","KITCHEN_ERROR","ITEM_RENDERED_UNUSABLE","MISTAKE_EXPIRED","MARKETING","FREEBIE","BREAKFAST","GENERAL_BUFFET","STAFF","ACCIDENT","OTHER"]}},"required":["quantity","waste_category"],"type":"object"}}}},"examples":{"Request Example":{"value":[{"recipe":"949960289010009","quantity":"5","stock_value":"5.00","remarks":"Hmm","waste_category":"Returned by customer"},{"stock_item":"121993979080005","quantity":"4","stock_value":"0.00","remarks":"","waste_category":"Kitchen error"}]}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"result\": [\n    {\n      \"recipe\": {\n        \"id\": \"949960289010009\",\n        \"name\": \"My Waffles\",\n        \"url\": \"https://app.apicbase.com/api/v1/recipes/949960289010009/\"\n      },\n      \"stock_item\": null,\n      \"quantity\": \"5\",\n      \"stock_value\": \"0.00\",\n      \"remarks\": \"Hmm\",\n      \"stock_item_updates\": [],\n      \"waste_category\": \"Returned by customer\",\n      \"waste_category_value\": \"RETURNED_BY_CUSTOMER\",\n      \"id\": \"123431829580008\"\n    },\n    {\n      \"stock_item\": {\n        \"id\": \"121993979080005\",\n        \"name\": \"Basmani Rice Recipe Z Pack (10 kg)\",\n        \"url\": \"https://app.apicbase.com/api/v1/products/stock_items/121993979080005/\"\n      },\n      \"recipe\": null,\n      \"quantity\": \"4\",\n      \"stock_value\": \"0.00\",\n      \"remarks\": \"\",\n      \"stock_item_updates\": [],\n      \"waste_category\": \"Kitchen error\",\n      \"waste_category_value\": \"KITCHEN_ERROR\",\n      \"id\": \"623431089590006\"\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"result":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"949960289010009"},"name":{"type":"string","example":"My Waffles"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/recipes/949960289010009/"}}},"stock_item":{},"quantity":{"type":"string","example":"5"},"stock_value":{"type":"string","example":"0.00"},"remarks":{"type":"string","example":"Hmm"},"stock_item_updates":{"type":"array"},"waste_category":{"type":"string","example":"Returned by customer"},"waste_category_value":{"type":"string","example":"RETURNED_BY_CUSTOMER"},"id":{"type":"string","example":"123431829580008"}}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/waste_events/{waste_event_id}/bulk_update/":{"patch":{"summary":"Bulk Update Items in a Waste Event","description":"Updates all existing items in a waste event.","operationId":"bulk-update-items-in-a-waste-event-1","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"waste_event_id","in":"path","description":"A waste event's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"RAW_BODY":{"type":"array","description":"A list of items in the waste event.","items":{"properties":{"id":{"type":"string","description":"The ID of the waste event item being wasted. Only to be populated if editing an existing item."},"stock_item":{"type":"string","description":"A stock item ID."},"recipe":{"type":"string","description":"A recipe ID."},"quantity":{"type":"string","description":"The quantity being wasted."},"remarks":{"type":"string","description":"Any optional remarks."},"waste_category":{"type":"string","description":"A reason for wasting this item.","enum":["DATE_EXPIRED","RETURNED_BY_CUSTOMER","KITCHEN_ERROR","ITEM_RENDERED_UNUSABLE","MISTAKE_EXPIRED","MARKETING","FREEBIE","BREAKFAST","GENERAL_BUFFET","STAFF","ACCIDENT","OTHER"]}},"required":["quantity","waste_category"],"type":"object"}}}},"examples":{"Request Example":{"value":[{"id":"123431829580008","quantity":"5","stock_value":"5.00","remarks":"Hmm","waste_category":"Returned by customer"},{"stock_item":"121993979080005","quantity":"4","stock_value":"0.00","remarks":"","waste_category":"Kitchen error"}]}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"result\": [\n    {\n      \"stock_item\": null,\n      \"recipe\": {\n        \"id\": \"949960289010009\",\n        \"name\": \"My Waffles\",\n        \"url\": \"https://app.apicbase.com/api/v1/recipes/949960289010009/\"\n      },\n      \"quantity\": \"5\",\n      \"stock_value\": \"0.00\",\n      \"remarks\": \"Hmm\",\n      \"stock_item_updates\": [],\n      \"waste_category\": \"Returned by customer\",\n      \"waste_category_value\": \"RETURNED_BY_CUSTOMER\",\n      \"id\": \"123431829580008\"\n    },\n    {\n      \"stock_item\": {\n        \"id\": \"121993979080005\",\n        \"name\": \"Basmani Rice Recipe Z Pack (10 kg)\",\n        \"url\": \"https://app.apicbase.com/api/v1/products/stock_items/121993979080005/\"\n      },\n      \"recipe\": null,\n      \"quantity\": \"4\",\n      \"stock_value\": \"0.00\",\n      \"remarks\": \"\",\n      \"stock_item_updates\": [],\n      \"waste_category\": \"Kitchen error\",\n      \"waste_category_value\": \"KITCHEN_ERROR\",\n      \"id\": \"623431089590006\"\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"result":{"type":"array","items":{"type":"object","properties":{"stock_item":{},"recipe":{"type":"object","properties":{"id":{"type":"string","example":"949960289010009"},"name":{"type":"string","example":"My Waffles"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/recipes/949960289010009/"}}},"quantity":{"type":"string","example":"5"},"stock_value":{"type":"string","example":"0.00"},"remarks":{"type":"string","example":"Hmm"},"stock_item_updates":{"type":"array"},"waste_category":{"type":"string","example":"Returned by customer"},"waste_category_value":{"type":"string","example":"RETURNED_BY_CUSTOMER"},"id":{"type":"string","example":"123431829580008"}}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/waste_events/{waste_event_id}/reset/":{"patch":{"summary":"Delete All Items in Waste Event","description":"Removes all items from a waste event.","operationId":"delete-all-items-in-waste-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"waste_event_id","in":"path","description":"A waste event's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"922471313120009\",\n  \"in_progress\": true,\n  \"created\": \"2021-11-29T10:41:46.818064+01:00\",\n  \"finished\": null,\n  \"actual_date\": null,\n  \"remarks\": null,\n  \"created_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n  },\n  \"owned_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n  },\n  \"stock_value\": null,\n  \"items\": []\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"922471313120009"},"in_progress":{"type":"boolean","example":true,"default":true},"created":{"type":"string","example":"2021-11-29T10:41:46.818064+01:00"},"finished":{},"actual_date":{},"remarks":{},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"stock_value":{},"items":{"type":"array"}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/waste_events/{waste_event_id}/claim/":{"patch":{"summary":"Claim Waste Event","description":"Claims a waste event from another user.","operationId":"claim-waste-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"waste_event_id","in":"path","description":"A waste event's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"922471313120009\",\n  \"in_progress\": true,\n  \"created\": \"2021-11-29T10:41:46.818064+01:00\",\n  \"finished\": null,\n  \"actual_date\": null,\n  \"remarks\": null,\n  \"created_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n  },\n  \"owned_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n  },\n  \"stock_value\": null,\n  \"items\": []\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"922471313120009"},"in_progress":{"type":"boolean","example":true,"default":true},"created":{"type":"string","example":"2021-11-29T10:41:46.818064+01:00"},"finished":{},"actual_date":{},"remarks":{},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"stock_value":{},"items":{"type":"array"}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/waste_events/{waste_event_id}/submit/":{"patch":{"summary":"Submit Waste Event","description":"Closes and submits a waste event.","operationId":"submit-waste-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"waste_event_id","in":"path","description":"A waste event's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"922330533335006\",\n  \"created\": \"2024-09-03T21:06:50Z\",\n  \"finished\": \"2024-09-03T21:11:02Z\",\n  \"actual_date\": null,\n  \"remarks\": null,\n  \"created_by\": {\n    \"id\": \"936210035070006\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v2/accounts/users/936210035070006/\"\n  },\n  \"owned_by\": {\n    \"id\": \"936210035070006\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v2/accounts/users/936210035070006/\"\n  },\n  \"stock_value\": \"-0.56\",\n  \"items\": [\n    {\n      \"recipe\": null,\n      \"stock_item\": {\n        \"id\": \"121725050680004\",\n        \"name\": \"Milk 0% Fat Bottle (1 l)\",\n        \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/121725050680004/\"\n      },\n      \"quantity\": \"0.75\",\n      \"stock_value\": \"-0.56\",\n      \"remarks\": null,\n      \"stock_item_updates\": [\n        {\n          \"stock_item\": {\n            \"id\": \"121725050680004\",\n            \"name\": \"Milk 0% Fat Bottle (1 l)\",\n            \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/121725050680004/\"\n          },\n          \"original_quantity\": \"-0.7500000000\",\n          \"original_unit\": \"Bottle (1 l)\",\n          \"quantity\": \"-0.75\",\n          \"stock_value\": \"-0.56\"\n        }\n      ],\n      \"waste_category\": \"Accident\",\n      \"waste_category_value\": \"ACCIDENT\",\n      \"id\": \"723792071474113\"\n    }\n  ],\n  \"status\": \"Closed\"\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"922330533335006"},"created":{"type":"string","example":"2024-09-03T21:06:50Z"},"finished":{"type":"string","example":"2024-09-03T21:11:02Z"},"actual_date":{},"remarks":{},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"936210035070006"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/936210035070006/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"936210035070006"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/936210035070006/"}}},"stock_value":{"type":"string","example":"-0.56"},"items":{"type":"array","items":{"type":"object","properties":{"recipe":{},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"121725050680004"},"name":{"type":"string","example":"Milk 0% Fat Bottle (1 l)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/121725050680004/"}}},"quantity":{"type":"string","example":"0.75"},"stock_value":{"type":"string","example":"-0.56"},"remarks":{},"stock_item_updates":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"121725050680004"},"name":{"type":"string","example":"Milk 0% Fat Bottle (1 l)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/121725050680004/"}}},"original_quantity":{"type":"string","example":"-0.7500000000"},"original_unit":{"type":"string","example":"Bottle (1 l)"},"quantity":{"type":"string","example":"-0.75"},"stock_value":{"type":"string","example":"-0.56"}}}},"waste_category":{"type":"string","example":"Accident"},"waste_category_value":{"type":"string","example":"ACCIDENT"},"id":{"type":"string","example":"723792071474113"}}}},"status":{"type":"string","example":"Closed"}}}}}}},"deprecated":false,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"actual_date":{"type":"string","format":"date-time"},"remarks":{"type":"string"}}}}}}}},"/inventory/outlets/{outlet_id}/create_events/":{"get":{"summary":"Get Creation Events","description":"Returns a list of creation (production) events in an outlet.","operationId":"get-creation-events","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter on the event's status.","schema":{"type":"string","enum":["0","1","2"]}},{"name":"created_date","in":"query","description":"Filter on a creation date (exact).","schema":{"type":"string","format":"date"}},{"name":"created_date__gt","in":"query","description":"Filter on a creation date (greater than).","schema":{"type":"string","format":"date"}},{"name":"created_date__lt","in":"query","description":"Filter on a creation date (lower than).","schema":{"type":"string","format":"date"}},{"name":"actual_date","in":"query","description":"Filter on the event's actual date, as specified by the user.","schema":{"type":"string","format":"date-time"}},{"name":"actual_date__gt","in":"query","description":"Filter on the event's actual date, as specified by the user (greater than).","schema":{"type":"string","format":"date"}},{"name":"actual_date__lt","in":"query","description":"Filter on the event's actual date, as specified by the user (lower than).","schema":{"type":"string","format":"date"}},{"name":"remarks","in":"query","description":"Query the contents of the remarks field.","schema":{"type":"string"}},{"name":"created_by","in":"query","description":"A user ID.","schema":{"type":"string"}},{"name":"created_by__email","in":"query","description":"A user's email address.","schema":{"type":"string"}},{"name":"owned_by","in":"query","description":"A user ID.","schema":{"type":"string"}},{"name":"owned_by__email","in":"query","description":"A user's email address.","schema":{"type":"string"}},{"name":"stock_value","in":"query","description":"The event's total stock value in variation (exact).","schema":{"type":"number","format":"float"}},{"name":"stock_value__gt","in":"query","description":"The event's total stock value in variation (greater than).","schema":{"type":"number","format":"float"}},{"name":"stock_value__lt","in":"query","description":"The event's total stock value in variation (lower than).","schema":{"type":"number","format":"float"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"count\": 1,\n  \"next\": null,\n  \"previous\": null,\n  \"results\": [\n    {\n      \"id\": \"122363827022000\",\n      \"name\": \"My Creation Event\",\n      \"status\": \"Opened\",\n      \"created\": \"2023-06-07T09:18:06Z\",\n      \"finished\": \"2023-06-07T09:19:06Z\",\n      \"actual_date\": null,\n      \"remarks\": \"\",\n      \"created_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://apicbase.com/api/v2/accounts/users/236300957450001/\"\n      },\n      \"owned_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://apicbase.com/api/v2/accounts/users/236300957450001/\"\n      },\n      \"stock_value\": \"0.00\",\n      \"items\": [\n        {\n          \"stock_item\": {\n            \"id\": \"421747108501007\",\n            \"name\": \"Spaghetti Bolognese Pack (1 piece)\",\n            \"url\": \"https://apicbase.com/api/v2/products/stock_items/421747108501007/\"\n          },\n          \"quantity\": \"5\",\n          \"stock_value\": \"0.00\",\n          \"remarks\": null,\n          \"lot_number\": \"123456789\",\n          \"expiry_date\": \"2026-06-15\",\n          \"stock_item_updates\": [\n            {\n              \"stock_item\": {\n                \"id\": \"521725390640009\",\n                \"name\": \"Pasta Spaghetti Box (50 x 700 g)\",\n                \"url\": \"https://apicbase.com/api/v2/products/stock_items/521725390640009/\"\n              },\n              \"original_quantity\": \"-0.3125000000\",\n              \"original_unit\": \"kg\",\n              \"quantity\": \"-0.01\",\n              \"stock_value\": \"-0.27\"\n            },\n            {\n              \"stock_item\": {\n                \"id\": \"421995083881000\",\n                \"name\": \"Carrots One (20 g)\",\n                \"url\": \"https://apicbase.com/api/v2/products/stock_items/421995083881000/\"\n              },\n              \"original_quantity\": \"-0.6250000000\",\n              \"original_unit\": \"piece\",\n              \"quantity\": \"-0.63\",\n              \"stock_value\": \"0.00\"\n            },\n            {\n              \"stock_item\": {\n                \"id\": \"421747108501007\",\n                \"name\": \"Spaghetti Bolognese Pack (1 piece)\",\n                \"url\": \"https://apicbase.com/api/v2/products/stock_items/421747108501007/\"\n              },\n              \"original_quantity\": \"5.0000000000\",\n              \"original_unit\": \"Pack (1 piece)\",\n              \"quantity\": \"5\",\n              \"stock_value\": \"0.27\"\n            }\n          ],\n          \"id\": null\n        }\n      ]\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":1,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"122363827022000"},"name":{"type":"string","example":"My Creation Event"},"status":{"type":"string","example":"Opened"},"created":{"type":"string","example":"2023-06-07T09:18:06Z"},"finished":{"type":"string","example":"2023-06-07T09:19:06Z"},"actual_date":{},"remarks":{"type":"string","example":""},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://apicbase.com/api/v2/accounts/users/236300957450001/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://apicbase.com/api/v2/accounts/users/236300957450001/"}}},"stock_value":{"type":"string","example":"0.00"},"items":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421747108501007"},"name":{"type":"string","example":"Spaghetti Bolognese Pack (1 piece)"},"url":{"type":"string","example":"https://apicbase.com/api/v2/products/stock_items/421747108501007/"}}},"quantity":{"type":"string","example":"5"},"stock_value":{"type":"string","example":"0.00"},"remarks":{},"lot_number":{"type":"string","nullable":true,"example":"123456789","description":"The traceability lot number. Numeric-only string."},"expiry_date":{"type":"string","nullable":true,"example":"2026-06-15","description":"The expiry date in YYYY-MM-DD format."},"stock_item_updates":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"521725390640009"},"name":{"type":"string","example":"Pasta Spaghetti Box (50 x 700 g)"},"url":{"type":"string","example":"https://apicbase.com/api/v2/products/stock_items/521725390640009/"}}},"original_quantity":{"type":"string","example":"-0.3125000000"},"original_unit":{"type":"string","example":"kg"},"quantity":{"type":"string","example":"-0.01"},"stock_value":{"type":"string","example":"-0.27"}}}},"id":{}}}}}}}}}}}}},"deprecated":false},"post":{"summary":"Start Creation Event","description":"Starts a creation event at a specific outlet.","operationId":"start-creation-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"A name for the event. An auto-generated name will be given if left empty."}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"922471313120009\",\n  \"name\": \"Creation #5\",\n  \"in_progress\": true,\n  \"created\": \"2021-11-29T10:41:46.818064+01:00\",\n  \"finished\": null,\n  \"actual_date\": null,\n  \"remarks\": null,\n  \"created_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n  },\n  \"owned_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n  },\n  \"stock_value\": null,\n  \"items\": []\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"922471313120009"},"name":{"type":"string","example":"Creation #5"},"in_progress":{"type":"boolean","example":true,"default":true},"created":{"type":"string","example":"2021-11-29T10:41:46.818064+01:00"},"finished":{},"actual_date":{},"remarks":{},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"stock_value":{},"items":{"type":"array"}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/create_events/{create_event_id}/":{"get":{"summary":"Get Creation Event Details","description":"Returns detailed information about a single creation event.","operationId":"get-creation-event-details","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"create_event_id","in":"path","description":"A create event's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"122363827022000\",\n  \"name\": \"My Creation Event\",\n  \"status\": \"Opened\",\n  \"created\": \"2023-06-07T09:18:06Z\",\n  \"finished\": \"2023-06-07T09:19:06Z\",\n  \"actual_date\": null,\n  \"remarks\": \"\",\n  \"created_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://apicbase.com/api/v2/accounts/users/236300957450001/\"\n  },\n  \"owned_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://apicbase.com/api/v2/accounts/users/236300957450001/\"\n  },\n  \"stock_value\": \"0.00\",\n  \"items\": [\n    {\n      \"stock_item\": {\n        \"id\": \"421747108501007\",\n        \"name\": \"Spaghetti Bolognese Pack (1 piece)\",\n        \"url\": \"https://apicbase.com/api/v2/products/stock_items/421747108501007/\"\n      },\n      \"quantity\": \"5\",\n      \"stock_value\": \"0.00\",\n      \"remarks\": null,\n      \"lot_number\": \"123456789\",\n      \"expiry_date\": \"2026-06-15\",\n      \"stock_item_updates\": [\n        {\n          \"stock_item\": {\n            \"id\": \"521725390640009\",\n            \"name\": \"Pasta Spaghetti Box (50 x 700 g)\",\n            \"url\": \"https://apicbase.com/api/v2/products/stock_items/521725390640009/\"\n          },\n          \"original_quantity\": \"-0.3125000000\",\n          \"original_unit\": \"kg\",\n          \"quantity\": \"-0.01\",\n          \"stock_value\": \"-0.27\"\n        },\n        {\n          \"stock_item\": {\n            \"id\": \"421995083881000\",\n            \"name\": \"Carrots One (20 g)\",\n            \"url\": \"https://apicbase.com/api/v2/products/stock_items/421995083881000/\"\n          },\n          \"original_quantity\": \"-0.6250000000\",\n          \"original_unit\": \"piece\",\n          \"quantity\": \"-0.63\",\n          \"stock_value\": \"0.00\"\n        },\n        {\n          \"stock_item\": {\n            \"id\": \"421747108501007\",\n            \"name\": \"Spaghetti Bolognese Pack (1 piece)\",\n            \"url\": \"https://apicbase.com/api/v2/products/stock_items/421747108501007/\"\n          },\n          \"original_quantity\": \"5.0000000000\",\n          \"original_unit\": \"Pack (1 piece)\",\n          \"quantity\": \"5\",\n          \"stock_value\": \"0.27\"\n        }\n      ],\n      \"id\": null\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"122363827022000"},"name":{"type":"string","example":"My Creation Event"},"status":{"type":"string","example":"Opened"},"created":{"type":"string","example":"2023-06-07T09:18:06Z"},"finished":{"type":"string","example":"2023-06-07T09:19:06Z"},"actual_date":{},"remarks":{"type":"string","example":""},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://apicbase.com/api/v2/accounts/users/236300957450001/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://apicbase.com/api/v2/accounts/users/236300957450001/"}}},"stock_value":{"type":"string","example":"0.00"},"items":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421747108501007"},"name":{"type":"string","example":"Spaghetti Bolognese Pack (1 piece)"},"url":{"type":"string","example":"https://apicbase.com/api/v2/products/stock_items/421747108501007/"}}},"quantity":{"type":"string","example":"5"},"stock_value":{"type":"string","example":"0.00"},"remarks":{},"lot_number":{"type":"string","nullable":true,"example":"123456789","description":"The traceability lot number. Numeric-only string."},"expiry_date":{"type":"string","nullable":true,"example":"2026-06-15","description":"The expiry date in YYYY-MM-DD format."},"stock_item_updates":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"521725390640009"},"name":{"type":"string","example":"Pasta Spaghetti Box (50 x 700 g)"},"url":{"type":"string","example":"https://apicbase.com/api/v2/products/stock_items/521725390640009/"}}},"original_quantity":{"type":"string","example":"-0.3125000000"},"original_unit":{"type":"string","example":"kg"},"quantity":{"type":"string","example":"-0.01"},"stock_value":{"type":"string","example":"-0.27"}}}},"id":{}}}}}}}}}},"deprecated":false},"delete":{"summary":"Cancel Creation Event","description":"Cancels and deletes a creation event.","operationId":"cancel-creation-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"create_event_id","in":"path","description":"A creation event's ID.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":""}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/create_events/{create_event_id}/items/":{"post":{"summary":"Add Item to Creation Event","description":"Adds an item to a creation event.","operationId":"add-item-to-creation-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"create_event_id","in":"path","description":"A creation event's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["stock_item","quantity"],"properties":{"stock_item":{"type":"string","description":"A stock item ID."},"quantity":{"type":"number","description":"The wasted quantity.","format":"float"},"remarks":{"type":"string","description":"Any optional remarks."},"lot_number":{"type":"string","nullable":true,"description":"Optional. Numeric-only string. Must be unique within the library. Sending empty string is treated as null."},"expiry_date":{"type":"string","format":"date","nullable":true,"description":"Optional. Format: YYYY-MM-DD."}}},"examples":{"Request Example":{"value":{"stock_item":"421747108501007","quantity":"4","remarks":"","lot_number":"123456789","expiry_date":"2026-06-15"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"stock_item\": {\n    \"id\": \"421747108501007\",\n    \"name\": \"Spaghetti Bolognese Pack (1 piece)\",\n    \"url\": \"https://apicbase.com/api/v1/products/stock_items/421747108501007/\"\n  },\n  \"quantity\": \"4\",\n  \"stock_value\": \"0.00\",\n  \"remarks\": \"\",\n  \"lot_number\": \"123456789\",\n  \"expiry_date\": \"2026-06-15\",\n  \"stock_item_updates\": [],\n  \"id\": \"824288900778507\"\n}"}},"schema":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421747108501007"},"name":{"type":"string","example":"Spaghetti Bolognese Pack (1 piece)"},"url":{"type":"string","example":"https://apicbase.com/api/v1/products/stock_items/421747108501007/"}}},"quantity":{"type":"string","example":"4"},"stock_value":{"type":"string","example":"0.00"},"remarks":{"type":"string","example":""},"lot_number":{"type":"string","nullable":true,"example":"123456789","description":"The traceability lot number. Numeric-only string."},"expiry_date":{"type":"string","nullable":true,"example":"2026-06-15","description":"The expiry date in YYYY-MM-DD format."},"stock_item_updates":{"type":"array"},"id":{"type":"string","example":"824288900778507"}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/create_events/{create_event_id}/items/{create_event_item_id}/":{"patch":{"summary":"Update Item in Creation Event","description":"Updates a single item within a creation event.","operationId":"update-item-in-creation-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"create_event_id","in":"path","description":"A creation event's ID.","schema":{"type":"string"},"required":true},{"name":"create_event_item_id","in":"path","description":"A creation event item's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"quantity":{"type":"number","description":"The wasted quantity.","format":"float"},"remarks":{"type":"string","description":"Any optional remarks."},"lot_number":{"type":"string","nullable":true,"description":"Optional. Numeric-only string. Must be unique within the library. Sending empty string is treated as null."},"expiry_date":{"type":"string","format":"date","nullable":true,"description":"Optional. Format: YYYY-MM-DD."}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"stock_item\": {\n    \"id\": \"421747108501007\",\n    \"name\": \"Spaghetti Bolognese Pack (1 piece)\",\n    \"url\": \"https://apicbase.com/api/v1/products/stock_items/421747108501007/\"\n  },\n  \"quantity\": \"5\",\n  \"stock_value\": \"0.00\",\n  \"remarks\": \"Updated remark\",\n  \"lot_number\": \"123456789\",\n  \"expiry_date\": \"2026-06-15\",\n  \"stock_item_updates\": [],\n  \"id\": \"824288900778507\"\n}"}},"schema":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421747108501007"},"name":{"type":"string","example":"Spaghetti Bolognese Pack (1 piece)"},"url":{"type":"string","example":"https://apicbase.com/api/v1/products/stock_items/421747108501007/"}}},"quantity":{"type":"string","example":"5"},"stock_value":{"type":"string","example":"0.00"},"remarks":{"type":"string","example":"Updated remark"},"lot_number":{"type":"string","nullable":true,"example":"123456789","description":"The traceability lot number. Numeric-only string."},"expiry_date":{"type":"string","nullable":true,"example":"2026-06-15","description":"The expiry date in YYYY-MM-DD format."},"stock_item_updates":{"type":"array"},"id":{"type":"string","example":"824288900778507"}}}}}}},"deprecated":false},"delete":{"summary":"Remove Item from Creation Event","description":"Removes an item from a creation event.","operationId":"remove-item-from-creation-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"create_event_id","in":"path","description":"A creation event's ID.","schema":{"type":"string"},"required":true},{"name":"create_event_item_id","in":"path","description":"A creation event item's ID.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":""}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/create_events/{create_event_id}/full_update/":{"post":{"summary":"Overwrite Items in a Creation Event","description":"Updates all items in a creation event.","operationId":"overwrite-items-in-a-creation-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"create_event_id","in":"path","description":"A creation event's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"RAW_BODY":{"type":"array","description":"A list of items in the create event.","items":{"properties":{"id":{"type":"string","description":"The ID of the waste event item being wasted. Only to be populated if editing an existing item."},"stock_item":{"type":"string","description":"A stock item ID."},"recipe":{"type":"string","description":"A recipe ID."},"quantity":{"type":"string","description":"The quantity being wasted."},"remarks":{"type":"string","description":"Any optional remarks."},"lot_number":{"type":"string","nullable":true,"description":"Optional. Numeric-only string. Must be unique within the library. Sending empty string is treated as null."},"expiry_date":{"type":"string","format":"date","nullable":true,"description":"Optional. Format: YYYY-MM-DD."},"waste_category":{"type":"string","description":"A reason for wasting this item.","enum":["DATE_EXPIRED","RETURNED_BY_CUSTOMER","KITCHEN_ERROR","ITEM_RENDERED_UNUSABLE","MISTAKE_EXPIRED","MARKETING","FREEBIE","BREAKFAST","GENERAL_BUFFET","STAFF","ACCIDENT","OTHER"]}},"required":["quantity","waste_category"],"type":"object"}}}},"examples":{"Request Example":{"value":[{"recipe":"949960289010009","quantity":"5","stock_value":"5.00","remarks":"Hmm","waste_category":"Returned by customer"},{"stock_item":"121993979080005","quantity":"4","stock_value":"0.00","remarks":"","waste_category":"Kitchen error"}]}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"result\": [\n    {\n      \"recipe\": {\n        \"id\": \"949960289010009\",\n        \"name\": \"My Waffles\",\n        \"url\": \"https://app.apicbase.com/api/v1/recipes/949960289010009/\"\n      },\n      \"stock_item\": null,\n      \"quantity\": \"5\",\n      \"stock_value\": \"0.00\",\n      \"remarks\": \"Hmm\",\n      \"lot_number\": \"123456789\",\n      \"expiry_date\": \"2026-06-15\",\n      \"stock_item_updates\": [],\n      \"waste_category\": \"Returned by customer\",\n      \"waste_category_value\": \"RETURNED_BY_CUSTOMER\",\n      \"id\": \"123431829580008\"\n    },\n    {\n      \"stock_item\": {\n        \"id\": \"121993979080005\",\n        \"name\": \"Basmani Rice Recipe Z Pack (10 kg)\",\n        \"url\": \"https://app.apicbase.com/api/v1/products/stock_items/121993979080005/\"\n      },\n      \"recipe\": null,\n      \"quantity\": \"4\",\n      \"stock_value\": \"0.00\",\n      \"remarks\": \"\",\n      \"lot_number\": null,\n      \"expiry_date\": null,\n      \"stock_item_updates\": [],\n      \"waste_category\": \"Kitchen error\",\n      \"waste_category_value\": \"KITCHEN_ERROR\",\n      \"id\": \"623431089590006\"\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"result":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","example":"949960289010009"},"name":{"type":"string","example":"My Waffles"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/recipes/949960289010009/"}}},"stock_item":{},"quantity":{"type":"string","example":"5"},"stock_value":{"type":"string","example":"0.00"},"remarks":{"type":"string","example":"Hmm"},"lot_number":{"type":"string","nullable":true,"example":"123456789","description":"The traceability lot number. Numeric-only string."},"expiry_date":{"type":"string","nullable":true,"example":"2026-06-15","description":"The expiry date in YYYY-MM-DD format."},"stock_item_updates":{"type":"array"},"waste_category":{"type":"string","example":"Returned by customer"},"waste_category_value":{"type":"string","example":"RETURNED_BY_CUSTOMER"},"id":{"type":"string","example":"123431829580008"}}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/create_events/{create_event_id}/bulk_update/":{"patch":{"summary":"Bulk Update Items in a Creation Event","description":"Updates all existing items in a creation event.","operationId":"bulk-update-items-in-a-creation-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"create_event_id","in":"path","description":"A creation event's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"RAW_BODY":{"type":"array","description":"A list of items in the creation event","items":{"properties":{"id":{"type":"string","description":"The event id"},"stock_item":{"type":"string","description":"the event's stock item id"},"quantity":{"type":"integer","format":"int32"},"remarks":{"type":"string"},"lot_number":{"type":"string","nullable":true,"description":"Optional. Numeric-only string. Must be unique within the library. Sending empty string is treated as null."},"expiry_date":{"type":"string","format":"date","nullable":true,"description":"Optional. Format: YYYY-MM-DD."}},"type":"object"}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"result\": [\n    {\n      \"stock_item\": {\n        \"id\": \"421747108501007\",\n        \"name\": \"Spaghetti Bolognese Pack (1 piece)\",\n        \"url\": \"https://apicbase.com/api/v1/products/stock_items/421747108501007/\"\n      },\n      \"quantity\": \"7\",\n      \"stock_value\": \"0.00\",\n      \"remarks\": \"\",\n      \"lot_number\": \"123456789\",\n      \"expiry_date\": \"2026-06-15\",\n      \"stock_item_updates\": [],\n      \"id\": \"324288695908501\"\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"result":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421747108501007"},"name":{"type":"string","example":"Spaghetti Bolognese Pack (1 piece)"},"url":{"type":"string","example":"https://apicbase.com/api/v1/products/stock_items/421747108501007/"}}},"quantity":{"type":"string","example":"7"},"stock_value":{"type":"string","example":"0.00"},"remarks":{"type":"string","example":""},"lot_number":{"type":"string","nullable":true,"example":"123456789","description":"The traceability lot number. Numeric-only string."},"expiry_date":{"type":"string","nullable":true,"example":"2026-06-15","description":"The expiry date in YYYY-MM-DD format."},"stock_item_updates":{"type":"array"},"id":{"type":"string","example":"324288695908501"}}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/create_events/{create_event_id}/reset/":{"patch":{"summary":"Delete All Items in Creation Event","description":"Removes all items from a creation event.","operationId":"delete-all-items-in-creation-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"create_event_id","in":"path","description":"A creation event's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"822296417932008\",\n  \"in_progress\": true,\n  \"created\": \"2023-08-07T22:54:25.439469+02:00\",\n  \"finished\": null,\n  \"actual_date\": null,\n  \"remarks\": null,\n  \"created_by\": {\n    \"id\": \"436410276890005\",\n    \"username\": \"416100460370006-apicbase-api_app_apicbase-api@apicbase.com\",\n    \"first_name\": \"\",\n    \"last_name\": \"\",\n    \"url\": \"https://apicbase.com/api/v1/accounts/users/436410276890005/\"\n  },\n  \"owned_by\": {\n    \"id\": \"436410276890005\",\n    \"username\": \"416100460370006-apicbase-api_app_apicbase-api@apicbase.com\",\n    \"first_name\": \"\",\n    \"last_name\": \"\",\n    \"url\": \"https://apicbase.com/api/v1/accounts/users/436410276890005/\"\n  },\n  \"stock_value\": null,\n  \"items\": []\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"822296417932008"},"in_progress":{"type":"boolean","example":true,"default":true},"created":{"type":"string","example":"2023-08-07T22:54:25.439469+02:00"},"finished":{},"actual_date":{},"remarks":{},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"436410276890005"},"username":{"type":"string","example":"416100460370006-apicbase-api_app_apicbase-api@apicbase.com"},"first_name":{"type":"string","example":""},"last_name":{"type":"string","example":""},"url":{"type":"string","example":"https://apicbase.com/api/v1/accounts/users/436410276890005/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"436410276890005"},"username":{"type":"string","example":"416100460370006-apicbase-api_app_apicbase-api@apicbase.com"},"first_name":{"type":"string","example":""},"last_name":{"type":"string","example":""},"url":{"type":"string","example":"https://apicbase.com/api/v1/accounts/users/436410276890005/"}}},"stock_value":{},"items":{"type":"array"}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/create_events/{create_event_id}/claim/":{"patch":{"summary":"Claim Creation Event","description":"Claims a creation event from another user.","operationId":"claim-creation-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"create_event_id","in":"path","description":"A creation event's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"822296417932008\",\n  \"in_progress\": true,\n  \"created\": \"2023-08-07T22:54:25.439469+02:00\",\n  \"finished\": null,\n  \"actual_date\": null,\n  \"remarks\": null,\n  \"created_by\": {\n    \"id\": \"436410276890005\",\n    \"username\": \"416100460370006-apicbase-api_app_apicbase-api@apicbase.com\",\n    \"first_name\": \"\",\n    \"last_name\": \"\",\n    \"url\": \"https://apicbase.com/api/v1/accounts/users/436410276890005/\"\n  },\n  \"owned_by\": {\n    \"id\": \"436410276890005\",\n    \"username\": \"416100460370006-apicbase-api_app_apicbase-api@apicbase.com\",\n    \"first_name\": \"\",\n    \"last_name\": \"\",\n    \"url\": \"https://apicbase.com/api/v1/accounts/users/436410276890005/\"\n  },\n  \"stock_value\": null,\n  \"items\": []\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"822296417932008"},"in_progress":{"type":"boolean","example":true,"default":true},"created":{"type":"string","example":"2023-08-07T22:54:25.439469+02:00"},"finished":{},"actual_date":{},"remarks":{},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"436410276890005"},"username":{"type":"string","example":"416100460370006-apicbase-api_app_apicbase-api@apicbase.com"},"first_name":{"type":"string","example":""},"last_name":{"type":"string","example":""},"url":{"type":"string","example":"https://apicbase.com/api/v1/accounts/users/436410276890005/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"436410276890005"},"username":{"type":"string","example":"416100460370006-apicbase-api_app_apicbase-api@apicbase.com"},"first_name":{"type":"string","example":""},"last_name":{"type":"string","example":""},"url":{"type":"string","example":"https://apicbase.com/api/v1/accounts/users/436410276890005/"}}},"stock_value":{},"items":{"type":"array"}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/create_events/{create_event_id}/submit/":{"patch":{"summary":"Submit Creation Event","description":"Closes and submits a creation event.","operationId":"submit-creation-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"create_event_id","in":"path","description":"A creation event's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"622330016345006\",\n  \"created\": \"2024-09-03T21:42:00Z\",\n  \"finished\": \"2024-09-03T21:45:55Z\",\n  \"actual_date\": null,\n  \"remarks\": null,\n  \"created_by\": {\n    \"id\": \"936210035070006\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v2/accounts/users/936210035070006/\"\n  },\n  \"owned_by\": {\n    \"id\": \"936210035070006\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v2/accounts/users/936210035070006/\"\n  },\n  \"stock_value\": \"0.00\",\n  \"items\": [\n    {\n      \"stock_item\": {\n        \"id\": \"421747108501007\",\n        \"name\": \"Spaghetti Bolognese Pack (1 piece)\",\n        \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421747108501007/\"\n      },\n      \"quantity\": \"1\",\n      \"stock_value\": \"0.00\",\n      \"remarks\": null,\n      \"lot_number\": \"123456789\",\n      \"expiry_date\": \"2026-06-15\",\n      \"stock_item_updates\": [\n        {\n          \"stock_item\": {\n            \"id\": \"421725380620004\",\n            \"name\": \"Pasta Spaghetti 700 g\",\n            \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421725380620004/\"\n          },\n          \"original_quantity\": \"-0.0625000000\",\n          \"original_unit\": \"kg\",\n          \"quantity\": \"-0.09\",\n          \"stock_value\": \"-0.05\"\n        },\n        {\n          \"stock_item\": {\n            \"id\": \"421995083881000\",\n            \"name\": \"Carrots One (20 g)\",\n            \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421995083881000/\"\n          },\n          \"original_quantity\": \"-0.1250000000\",\n          \"original_unit\": \"piece\",\n          \"quantity\": \"-0.13\",\n          \"stock_value\": \"0.00\"\n        },\n        {\n          \"stock_item\": {\n            \"id\": \"421747108501007\",\n            \"name\": \"Spaghetti Bolognese Pack (1 piece)\",\n            \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421747108501007/\"\n          },\n          \"original_quantity\": \"1.0000000000\",\n          \"original_unit\": \"Pack (1 piece)\",\n          \"quantity\": \"1\",\n          \"stock_value\": \"0.05\"\n        }\n      ],\n      \"id\": \"524792968634114\"\n    }\n  ],\n  \"status\": \"Closed\"\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"622330016345006"},"created":{"type":"string","example":"2024-09-03T21:42:00Z"},"finished":{"type":"string","example":"2024-09-03T21:45:55Z"},"actual_date":{},"remarks":{},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"936210035070006"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/936210035070006/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"936210035070006"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/936210035070006/"}}},"stock_value":{"type":"string","example":"0.00"},"items":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421747108501007"},"name":{"type":"string","example":"Spaghetti Bolognese Pack (1 piece)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/421747108501007/"}}},"quantity":{"type":"string","example":"1"},"stock_value":{"type":"string","example":"0.00"},"remarks":{},"lot_number":{"type":"string","nullable":true,"example":"123456789","description":"The traceability lot number. Numeric-only string."},"expiry_date":{"type":"string","nullable":true,"example":"2026-06-15","description":"The expiry date in YYYY-MM-DD format."},"stock_item_updates":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421725380620004"},"name":{"type":"string","example":"Pasta Spaghetti 700 g"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/421725380620004/"}}},"original_quantity":{"type":"string","example":"-0.0625000000"},"original_unit":{"type":"string","example":"kg"},"quantity":{"type":"string","example":"-0.09"},"stock_value":{"type":"string","example":"-0.05"}}}},"id":{"type":"string","example":"524792968634114"}}}},"status":{"type":"string","example":"Closed"}}}}}}},"deprecated":false,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"actual_date":{"type":"string","format":"date-time"},"remarks":{"type":"string"}}}}}}}},"/inventory/outlets/{outlet_id}/transfer_events/incoming/":{"get":{"summary":"Get Incoming Transfer Events","description":"Returns a list of incoming transfer events (transfers to an outlet).","operationId":"get-incoming-transfer-events","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter on the event's status.","schema":{"type":"string","enum":["0","1","2"]}},{"name":"created_date","in":"query","description":"Filter on a creation date (exact).","schema":{"type":"string","format":"date"}},{"name":"created_date__gt","in":"query","description":"Filter on a creation date (greater than).","schema":{"type":"string","format":"date"}},{"name":"created_date__lt","in":"query","description":"Filter on a creation date (lower than).","schema":{"type":"string","format":"date"}},{"name":"actual_date","in":"query","description":"Filter on the event's actual date, as specified by the user.","schema":{"type":"string","format":"date"}},{"name":"actual_date__gt","in":"query","description":"Filter on the event's actual date, as specified by the user (greater than).","schema":{"type":"string","format":"date"}},{"name":"actual_date__lt","in":"query","description":"Filter on the event's actual date, as specified by the user (lower than).","schema":{"type":"string","format":"date"}},{"name":"remarks","in":"query","description":"Query the contents of the remarks field.","schema":{"type":"string"}},{"name":"created_by","in":"query","description":"A user ID.","schema":{"type":"string"}},{"name":"created_by__email","in":"query","description":"A user's email address.","schema":{"type":"string"}},{"name":"owned_by","in":"query","description":"A user ID.","schema":{"type":"string"}},{"name":"owned_by__email","in":"query","description":"A user's email address.","schema":{"type":"string"}},{"name":"stock_value","in":"query","description":"The event's total stock value variation (exact).","schema":{"type":"number","format":"float"}},{"name":"stock_value__gt","in":"query","description":"The event's total stock value variation (greater than).","schema":{"type":"number","format":"float"}},{"name":"stock_value__lt","in":"query","description":"The event's total stock value variation (lower than).","schema":{"type":"number","format":"float"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"count\": 1,\n  \"next\": null,\n  \"previous\": null,\n  \"results\": [\n    {\n      \"id\": \"722162682470005\",\n      \"name\": \"My Transfer Event\",\n      \"status\": \"Closed\",\n      \"created\": \"2021-03-24T02:15:34Z\",\n      \"finished\": \"2021-03-24T02:15:46Z\",\n      \"actual_date\": null,\n      \"remarks\": \"\",\n      \"created_by\": {\n        \"id\": \"136000910080000\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/users/136000910080000/\"\n      },\n      \"owned_by\": {\n        \"id\": \"136000910080000\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/users/136000910080000/\"\n      },\n      \"stock_value\": \"50.00\",\n      \"items\": [\n        {\n          \"stock_item\": {\n            \"id\": \"721836208200002\",\n            \"name\": \"Açai Bottle (1 l)\",\n            \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/721836208200002/\"\n          },\n          \"quantity\": \"10\",\n          \"stock_value\": \"50.00\",\n          \"remarks\": null,\n          \"stock_item_updates\": [\n            {\n              \"stock_item\": {\n                \"id\": \"721836208200002\",\n                \"name\": \"Açai Bottle (1 l)\",\n                \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/721836208200002/\"\n              },\n              \"original_quantity\": \"10.00\",\n              \"original_unit\": \"Bottle (1 l)\",\n              \"quantity\": \"10\",\n              \"stock_value\": \"50.00\"\n            }\n          ]\n        }\n      ],\n      \"origin_outlet\": \"https://app.apicbase.com/api/v2/accounts/outlets/729100266010004/\"\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":1,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"722162682470005"},"name":{"type":"string","example":"My Transfer Event"},"status":{"type":"string","example":"Closed"},"created":{"type":"string","example":"2021-03-24T02:15:34Z"},"finished":{"type":"string","example":"2021-03-24T02:15:46Z"},"actual_date":{},"remarks":{"type":"string","example":""},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"136000910080000"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"136000910080000"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"stock_value":{"type":"string","example":"50.00"},"items":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"721836208200002"},"name":{"type":"string","example":"Açai Bottle (1 l)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/721836208200002/"}}},"quantity":{"type":"string","example":"10"},"stock_value":{"type":"string","example":"50.00"},"remarks":{},"stock_item_updates":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"721836208200002"},"name":{"type":"string","example":"Açai Bottle (1 l)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/721836208200002/"}}},"original_quantity":{"type":"string","example":"10.00"},"original_unit":{"type":"string","example":"Bottle (1 l)"},"quantity":{"type":"string","example":"10"},"stock_value":{"type":"string","example":"50.00"}}}}}}},"origin_outlet":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/729100266010004/"}}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/transfer_events/outgoing/":{"get":{"summary":"Get Outgoing Transfer Events","description":"Returns a list of outgoing transfer events (transfers from an outlet).","operationId":"get-outgoing-transfer-events","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter on the event's status.","schema":{"type":"string","enum":["0","1","2"]}},{"name":"created_date","in":"query","description":"Filter on a creation date (exact).","schema":{"type":"string","format":"date"}},{"name":"created_date__gt","in":"query","description":"Filter on a creation date (greater than).","schema":{"type":"string","format":"date"}},{"name":"created_date__lt","in":"query","description":"Filter on a creation date (lower than).","schema":{"type":"string","format":"date"}},{"name":"actual_date","in":"query","description":"Filter on the event's actual date, as specified by the user.","schema":{"type":"string","format":"date"}},{"name":"actual_date__gt","in":"query","description":"Filter on the event's actual date, as specified by the user (greater than).","schema":{"type":"string","format":"date"}},{"name":"actual_date__lt","in":"query","description":"Filter on the event's actual date, as specified by the user (lower than).","schema":{"type":"string","format":"date"}},{"name":"remarks","in":"query","description":"Query the contents of the remarks field.","schema":{"type":"string"}},{"name":"created_by","in":"query","description":"A user ID.","schema":{"type":"string"}},{"name":"created_by__email","in":"query","description":"A user's email address.","schema":{"type":"string"}},{"name":"owned_by","in":"query","description":"A user's ID.","schema":{"type":"string"}},{"name":"owned_by__email","in":"query","description":"A user's email address.","schema":{"type":"string"}},{"name":"stock_value","in":"query","description":"The event's total stock value variation (exact).","schema":{"type":"number","format":"float"}},{"name":"stock_value__gt","in":"query","description":"The event's total stock value variation (greater than).","schema":{"type":"number","format":"float"}},{"name":"stock_value__lt","in":"query","description":"The event's total stock value variation (lower than).","schema":{"type":"number","format":"float"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"count\": 1,\n  \"next\": null,\n  \"previous\": null,\n  \"results\": [\n    {\n      \"id\": \"122162992420000\",\n      \"name\": \"My Transfer Event\",\n      \"in_progress\": false,\n      \"created\": \"2021-03-24T02:17:17Z\",\n      \"finished\": \"2021-03-24T02:17:31Z\",\n      \"actual_date\": null,\n      \"remarks\": \"\",\n      \"created_by\": {\n        \"id\": \"136000910080000\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/users/136000910080000/\"\n      },\n      \"owned_by\": {\n        \"id\": \"136000910080000\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/users/136000910080000/\"\n      },\n      \"stock_value\": \"-75.00\",\n      \"items\": [\n        {\n          \"stock_item\": {\n            \"id\": \"421836548240007\",\n            \"name\": \"Bread 1 kg\",\n            \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421836548240007/\"\n          },\n          \"quantity\": \"10\",\n          \"stock_value\": \"-75.00\",\n          \"remarks\": null,\n          \"stock_item_updates\": [\n            {\n              \"stock_item\": {\n                \"id\": \"421836548240007\",\n                \"name\": \"Bread 1 kg\",\n                \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421836548240007/\"\n              },\n              \"original_quantity\": \"-10.00\",\n              \"original_unit\": \"1 kg\",\n              \"quantity\": \"-10\",\n              \"stock_value\": \"-75.00\"\n            }\n          ]\n        }\n      ],\n      \"destination_outlet\": \"https://app.apicbase.com/api/v2/accounts/outlets/729100266010004/\"\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":1,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"122162992420000"},"name":{"type":"string","example":"My Transfer Event"},"in_progress":{"type":"boolean","example":false,"default":true},"created":{"type":"string","example":"2021-03-24T02:17:17Z"},"finished":{"type":"string","example":"2021-03-24T02:17:31Z"},"actual_date":{},"remarks":{"type":"string","example":""},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"136000910080000"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"136000910080000"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"stock_value":{"type":"string","example":"-75.00"},"items":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421836548240007"},"name":{"type":"string","example":"Bread 1 kg"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/421836548240007/"}}},"quantity":{"type":"string","example":"10"},"stock_value":{"type":"string","example":"-75.00"},"remarks":{},"stock_item_updates":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421836548240007"},"name":{"type":"string","example":"Bread 1 kg"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/421836548240007/"}}},"original_quantity":{"type":"string","example":"-10.00"},"original_unit":{"type":"string","example":"1 kg"},"quantity":{"type":"string","example":"-10"},"stock_value":{"type":"string","example":"-75.00"}}}}}}},"destination_outlet":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/729100266010004/"}}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/transfer_events/outgoing/{event_apic_id}/":{"get":{"summary":"Get Outgoing Transfer Event","description":"Returns detailed information about a single outgoing transfer event.","operationId":"get-outgoing-transfer-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"event_apic_id","in":"path","description":"An outgoing transfer event's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"322571969510001\",\n  \"created\": \"2026-05-25T08:55:42Z\",\n  \"finished\": \"2026-05-25T08:56:01Z\",\n  \"actual_date\": null,\n  \"remarks\": \"\",\n  \"created_by\": {\n    \"id\": \"136000910080000\",\n    \"username\": \"pieter@apicbase.com\",\n    \"first_name\": \"Pieter\",\n    \"last_name\": \"Wellens\",\n    \"url\": \"https://app.apicbase.com/api/v2/accounts/users/136000910080000/\"\n  },\n  \"owned_by\": {\n    \"id\": \"136000910080000\",\n    \"username\": \"pieter@apicbase.com\",\n    \"first_name\": \"Pieter\",\n    \"last_name\": \"Wellens\",\n    \"url\": \"https://app.apicbase.com/api/v2/accounts/users/136000910080000/\"\n  },\n  \"stock_value\": \"-5.37\",\n  \"items\": [\n    {\n      \"recipe\": null,\n      \"stock_item\": {\n        \"id\": \"421836548240007\",\n        \"name\": \"Bread 1 kg\",\n        \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421836548240007/\"\n      },\n      \"quantity\": \"2\",\n      \"stock_value\": \"-5.37\",\n      \"remarks\": null,\n      \"stock_item_updates\": [\n        {\n          \"stock_item\": {\n            \"id\": \"421836548240007\",\n            \"name\": \"Bread 1 kg\",\n            \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421836548240007/\"\n          },\n          \"original_quantity\": \"-2.0000000000\",\n          \"original_unit\": \"1 kg\",\n          \"quantity\": \"-2\",\n          \"stock_value\": \"-5.37\"\n        }\n      ]\n    }\n  ],\n  \"destination_outlet\": \"https://app.apicbase.com/api/v2/accounts/outlets/429100059300001/\",\n  \"status\": \"Closed\",\n  \"name\": \"Transfer #18\"\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"322571969510001"},"created":{"type":"string","example":"2026-05-25T08:55:42Z"},"finished":{"type":"string","example":"2026-05-25T08:56:01Z"},"actual_date":{},"remarks":{"type":"string","example":""},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"136000910080000"},"username":{"type":"string","example":"pieter@apicbase.com"},"first_name":{"type":"string","example":"Pieter"},"last_name":{"type":"string","example":"Wellens"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"136000910080000"},"username":{"type":"string","example":"pieter@apicbase.com"},"first_name":{"type":"string","example":"Pieter"},"last_name":{"type":"string","example":"Wellens"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"stock_value":{"type":"string","example":"-5.37"},"items":{"type":"array","items":{"type":"object","properties":{"recipe":{},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421836548240007"},"name":{"type":"string","example":"Bread 1 kg"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/421836548240007/"}}},"quantity":{"type":"string","example":"2"},"stock_value":{"type":"string","example":"-5.37"},"remarks":{},"stock_item_updates":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421836548240007"},"name":{"type":"string","example":"Bread 1 kg"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/421836548240007/"}}},"original_quantity":{"type":"string","example":"-2.0000000000"},"original_unit":{"type":"string","example":"1 kg"},"quantity":{"type":"string","example":"-2"},"stock_value":{"type":"string","example":"-5.37"}}}}}}},"destination_outlet":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/429100059300001/"},"status":{"type":"string","example":"Closed"},"name":{"type":"string","example":"Transfer #18"}}}}}}},"deprecated":false},"delete":{"summary":"Cancel Outgoing Transfer Event","description":"Cancels an outgoing transfer event.","operationId":"cancel-outgoing-transfer-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"event_apic_id","in":"path","description":"An outgoing transfer event's ID.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":""}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/transfer_events/outgoing/{event_apic_id}/claim/":{"patch":{"summary":"Claim Outgoing Transfer Event","description":"Claims an outgoing transfer event from another user.","operationId":"claim-outgoing-transfer-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"event_apic_id","in":"path","description":"An outgoing transfer event's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"322571969510001\",\n  \"created\": \"2026-05-25T08:55:42Z\",\n  \"finished\": null,\n  \"actual_date\": null,\n  \"remarks\": \"\",\n  \"created_by\": {\n    \"id\": \"136000910080000\",\n    \"username\": \"pieter@apicbase.com\",\n    \"first_name\": \"Pieter\",\n    \"last_name\": \"Wellens\",\n    \"url\": \"https://app.apicbase.com/api/v2/accounts/users/136000910080000/\"\n  },\n  \"owned_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"jane.smith@apicbase.com\",\n    \"first_name\": \"Jane\",\n    \"last_name\": \"Smith\",\n    \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n  },\n  \"stock_value\": \"-5.37\",\n  \"items\": [\n    {\n      \"recipe\": null,\n      \"stock_item\": {\n        \"id\": \"421836548240007\",\n        \"name\": \"Bread 1 kg\",\n        \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421836548240007/\"\n      },\n      \"quantity\": \"2\",\n      \"stock_value\": \"-5.37\",\n      \"remarks\": null,\n      \"stock_item_updates\": []\n    }\n  ],\n  \"destination_outlet\": \"https://app.apicbase.com/api/v2/accounts/outlets/429100059300001/\",\n  \"status\": \"Opened\",\n  \"name\": \"Transfer #18\"\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"322571969510001"},"created":{"type":"string","example":"2026-05-25T08:55:42Z"},"finished":{},"actual_date":{},"remarks":{"type":"string","example":""},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"136000910080000"},"username":{"type":"string","example":"pieter@apicbase.com"},"first_name":{"type":"string","example":"Pieter"},"last_name":{"type":"string","example":"Wellens"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"jane.smith@apicbase.com"},"first_name":{"type":"string","example":"Jane"},"last_name":{"type":"string","example":"Smith"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"stock_value":{"type":"string","example":"-5.37"},"items":{"type":"array","items":{"type":"object","properties":{"recipe":{},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421836548240007"},"name":{"type":"string","example":"Bread 1 kg"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/421836548240007/"}}},"quantity":{"type":"string","example":"2"},"stock_value":{"type":"string","example":"-5.37"},"remarks":{},"stock_item_updates":{"type":"array"}}}},"destination_outlet":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/429100059300001/"},"status":{"type":"string","example":"Opened"},"name":{"type":"string","example":"Transfer #18"}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/manual_sales_event/":{"post":{"summary":"Create Manual Sales Event","description":"Creates and submits a manual sales event at a given outlet.","operationId":"create-manual-sales-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"A name for the event. An auto-generated name will be given if left empty."},"remarks":{"type":"string","description":"Any optional remarks about this event."},"sales_items":{"type":"array","description":"A list of items in the sales event.","items":{"properties":{"recipe":{"type":"string","description":"A recipe ID."},"quantity":{"type":"integer","description":"A sold quantity.","format":"int32"},"unit_price":{"type":"number","description":"The sell price of one unit of the sold item.","format":"float"},"tax":{"type":"number","description":"The tax rate applied to the sale.","format":"float"},"total_discount":{"type":"number","description":"The total amount of discounts applied to the sale.","format":"float"}},"required":["recipe","quantity","unit_price","tax"],"type":"object"}},"actual_date":{"type":"string","format":"date-time"}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/manual_sales_events/":{"get":{"summary":"Get Manual Sales Events","description":"Returns a list of manual sales events in an outlet.","operationId":"get-manual-sales-events","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by. Use `created` for ascending and `-created` for descending. Defaults to `-created`.","schema":{"type":"string","enum":["created","-created"]}},{"name":"status","in":"query","description":"Filter on the event's status.","schema":{"type":"string","enum":["0","1","2"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"count\": 1,\n  \"next\": null,\n  \"previous\": null,\n  \"results\": [\n    {\n      \"id\": \"122571682540002\",\n      \"name\": \"Manual Sales #42\",\n      \"status\": \"Closed\",\n      \"created\": \"2026-04-24T07:52:08Z\",\n      \"finished\": \"2026-04-24T07:52:38Z\",\n      \"actual_date\": null,\n      \"remarks\": \"\",\n      \"created_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://apicbase.com/api/v2/accounts/users/236300957450001/\"\n      },\n      \"owned_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://apicbase.com/api/v2/accounts/users/236300957450001/\"\n      },\n      \"stock_value\": \"-4.80\",\n      \"items\": [\n        {\n          \"recipe\": {\n            \"id\": \"649960640160004\",\n            \"name\": \"Risotto\",\n            \"url\": \"https://apicbase.com/api/v2/products/recipes/649960640160004/\"\n          },\n          \"stock_item\": null,\n          \"quantity\": \"3\",\n          \"stock_value\": \"-4.80\",\n          \"remarks\": null,\n          \"unit_price\": \"20.00\",\n          \"total_price\": \"60.00\",\n          \"tax\": \"12.000\",\n          \"stock_item_updates\": [\n            {\n              \"stock_item\": {\n                \"id\": \"421993669070005\",\n                \"name\": \"Arborio Rice Pack (1 kg)\",\n                \"url\": \"https://apicbase.com/api/v2/products/stock_items/421993669070005/\"\n              },\n              \"original_quantity\": \"-180.0000000000\",\n              \"original_unit\": \"g\",\n              \"quantity\": \"-0.18\",\n              \"stock_value\": \"-1.80\"\n            },\n            {\n              \"stock_item\": {\n                \"id\": \"521014123480000\",\n                \"name\": \"Parmesan Wedge (500 g)\",\n                \"url\": \"https://apicbase.com/api/v2/products/stock_items/521014123480000/\"\n              },\n              \"original_quantity\": \"-60.0000000000\",\n              \"original_unit\": \"g\",\n              \"quantity\": \"-0.12\",\n              \"stock_value\": \"-3.00\"\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":1,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"122571682540002"},"name":{"type":"string","example":"Manual Sales #42"},"status":{"type":"string","example":"Closed"},"created":{"type":"string","example":"2026-04-24T07:52:08Z"},"finished":{"type":"string","nullable":true,"example":"2026-04-24T07:52:38Z"},"actual_date":{"type":"string","nullable":true},"remarks":{"type":"string","example":""},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://apicbase.com/api/v2/accounts/users/236300957450001/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://apicbase.com/api/v2/accounts/users/236300957450001/"}}},"stock_value":{"type":"string","example":"0.00"},"items":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"649960640160004"},"name":{"type":"string","example":"Risotto"},"url":{"type":"string","example":"https://apicbase.com/api/v2/products/recipes/649960640160004/"}}},"stock_item":{"type":"object","nullable":true},"quantity":{"type":"string","example":"3"},"stock_value":{"type":"string","example":"0.00"},"remarks":{"type":"string","nullable":true},"unit_price":{"type":"string","example":"20.00","description":"The sell price of one unit of the sold item."},"total_price":{"type":"string","example":"60.00","description":"The total sell price of the line (quantity × unit_price)."},"tax":{"type":"string","nullable":true,"example":"12.000","description":"The tax rate applied to the sale."},"stock_item_updates":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421993669070005"},"name":{"type":"string","example":"Arborio Rice Pack (1 kg)"},"url":{"type":"string","example":"https://apicbase.com/api/v2/products/stock_items/421993669070005/"}}},"original_quantity":{"type":"string","example":"-180.0000000000"},"original_unit":{"type":"string","example":"g"},"quantity":{"type":"string","example":"-0.18"},"stock_value":{"type":"string","example":"-1.80"}}}}}}}}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/manual_sales_events/{manual_sales_event_id}/":{"get":{"summary":"Get Manual Sales Event Details","description":"Returns detailed information about a single manual sales event.","operationId":"get-manual-sales-event-details","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"manual_sales_event_id","in":"path","description":"A manual sales event's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"122571682540002\",\n  \"name\": \"Manual Sales #42\",\n  \"status\": \"Closed\",\n  \"created\": \"2026-04-24T07:52:08Z\",\n  \"finished\": \"2026-04-24T07:52:38Z\",\n  \"actual_date\": null,\n  \"remarks\": \"\",\n  \"created_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://apicbase.com/api/v2/accounts/users/236300957450001/\"\n  },\n  \"owned_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://apicbase.com/api/v2/accounts/users/236300957450001/\"\n  },\n  \"stock_value\": \"-4.80\",\n  \"items\": [\n    {\n      \"recipe\": {\n        \"id\": \"649960640160004\",\n        \"name\": \"Risotto\",\n        \"url\": \"https://apicbase.com/api/v2/products/recipes/649960640160004/\"\n      },\n      \"stock_item\": null,\n      \"quantity\": \"3\",\n      \"stock_value\": \"-4.80\",\n      \"remarks\": null,\n      \"unit_price\": \"20.00\",\n      \"total_price\": \"60.00\",\n      \"tax\": \"12.000\",\n      \"stock_item_updates\": [\n        {\n          \"stock_item\": {\n            \"id\": \"421993669070005\",\n            \"name\": \"Arborio Rice Pack (1 kg)\",\n            \"url\": \"https://apicbase.com/api/v2/products/stock_items/421993669070005/\"\n          },\n          \"original_quantity\": \"-180.0000000000\",\n          \"original_unit\": \"g\",\n          \"quantity\": \"-0.18\",\n          \"stock_value\": \"-1.80\"\n        },\n        {\n          \"stock_item\": {\n            \"id\": \"521014123480000\",\n            \"name\": \"Parmesan Wedge (500 g)\",\n            \"url\": \"https://apicbase.com/api/v2/products/stock_items/521014123480000/\"\n          },\n          \"original_quantity\": \"-60.0000000000\",\n          \"original_unit\": \"g\",\n          \"quantity\": \"-0.12\",\n          \"stock_value\": \"-3.00\"\n        }\n      ]\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"122571682540002"},"name":{"type":"string","example":"Manual Sales #42"},"status":{"type":"string","example":"Closed"},"created":{"type":"string","example":"2026-04-24T07:52:08Z"},"finished":{"type":"string","nullable":true,"example":"2026-04-24T07:52:38Z"},"actual_date":{"type":"string","nullable":true},"remarks":{"type":"string","example":""},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://apicbase.com/api/v2/accounts/users/236300957450001/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://apicbase.com/api/v2/accounts/users/236300957450001/"}}},"stock_value":{"type":"string","example":"0.00"},"items":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"649960640160004"},"name":{"type":"string","example":"Risotto"},"url":{"type":"string","example":"https://apicbase.com/api/v2/products/recipes/649960640160004/"}}},"stock_item":{"type":"object","nullable":true},"quantity":{"type":"string","example":"3"},"stock_value":{"type":"string","example":"0.00"},"remarks":{"type":"string","nullable":true},"unit_price":{"type":"string","example":"20.00","description":"The sell price of one unit of the sold item."},"total_price":{"type":"string","example":"60.00","description":"The total sell price of the line (quantity × unit_price)."},"tax":{"type":"string","nullable":true,"example":"12.000","description":"The tax rate applied to the sale."},"stock_item_updates":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421993669070005"},"name":{"type":"string","example":"Arborio Rice Pack (1 kg)"},"url":{"type":"string","example":"https://apicbase.com/api/v2/products/stock_items/421993669070005/"}}},"original_quantity":{"type":"string","example":"-180.0000000000"},"original_unit":{"type":"string","example":"g"},"quantity":{"type":"string","example":"-0.18"},"stock_value":{"type":"string","example":"-1.80"}}}}}}}}}}}}},"deprecated":false},"delete":{"summary":"Cancel Manual Sales Event","description":"Cancels a manual sales event. Stock movements are reversed and the linked sales ticket is removed.","operationId":"cancel-manual-sales-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"manual_sales_event_id","in":"path","description":"A manual sales event's ID.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"204"}},"deprecated":false}},"/inventory/outlets/{outlet_id}/manual_sales_events/{manual_sales_event_id}/claim/":{"patch":{"summary":"Claim Manual Sales Event","description":"Claims a manual sales event from another user. Allowed only while the event is still in progress.","operationId":"claim-manual-sales-event","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"manual_sales_event_id","in":"path","description":"A manual sales event's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"122571682540002\",\n  \"name\": \"Manual Sales #42\",\n  \"status\": \"Opened\",\n  \"created\": \"2026-04-24T07:52:08Z\",\n  \"finished\": null,\n  \"actual_date\": null,\n  \"remarks\": \"\",\n  \"created_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://apicbase.com/api/v2/accounts/users/236300957450001/\"\n  },\n  \"owned_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://apicbase.com/api/v2/accounts/users/236300957450001/\"\n  },\n  \"stock_value\": \"0.00\",\n  \"items\": [\n    {\n      \"recipe\": {\n        \"id\": \"649960640160004\",\n        \"name\": \"Risotto\",\n        \"url\": \"https://apicbase.com/api/v2/products/recipes/649960640160004/\"\n      },\n      \"stock_item\": null,\n      \"quantity\": \"3\",\n      \"stock_value\": \"0.00\",\n      \"remarks\": null,\n      \"unit_price\": \"20.00\",\n      \"total_price\": \"60.00\",\n      \"tax\": \"12.000\",\n      \"stock_item_updates\": []\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"122571682540002"},"name":{"type":"string","example":"Manual Sales #42"},"status":{"type":"string","example":"Opened"},"created":{"type":"string","example":"2026-04-24T07:52:08Z"},"finished":{"type":"string","nullable":true},"actual_date":{"type":"string","nullable":true},"remarks":{"type":"string","example":""},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://apicbase.com/api/v2/accounts/users/236300957450001/"}}},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://apicbase.com/api/v2/accounts/users/236300957450001/"}}},"stock_value":{"type":"string","example":"0.00"},"items":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"649960640160004"},"name":{"type":"string","example":"Risotto"},"url":{"type":"string","example":"https://apicbase.com/api/v2/products/recipes/649960640160004/"}}},"stock_item":{"type":"object","nullable":true},"quantity":{"type":"string","example":"3"},"stock_value":{"type":"string","example":"0.00"},"remarks":{"type":"string","nullable":true},"unit_price":{"type":"string","example":"20.00","description":"The sell price of one unit of the sold item."},"total_price":{"type":"string","example":"60.00","description":"The total sell price of the line (quantity × unit_price)."},"tax":{"type":"string","nullable":true,"example":"12.000","description":"The tax rate applied to the sale."},"stock_item_updates":{"type":"array","items":{"type":"object","properties":{"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"421993669070005"},"name":{"type":"string","example":"Arborio Rice Pack (1 kg)"},"url":{"type":"string","example":"https://apicbase.com/api/v2/products/stock_items/421993669070005/"}}},"original_quantity":{"type":"string","example":"-180.0000000000"},"original_unit":{"type":"string","example":"g"},"quantity":{"type":"string","example":"-0.18"},"stock_value":{"type":"string","example":"-1.80"}}}}}}}}}}}},"400":{"description":"Returned when the event cannot be claimed in its current state (e.g. already closed, being processed, or queued).","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"message\": \"Event is not in progress\"\n}"}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Event is not in progress"}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/stock_items/all/":{"get":{"summary":"Get Stock Items in Inventory","description":"Returns inventory information for all stock items in a given outlet.","operationId":"get-stock-items-in-inventory-all","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"count\": 6,\n  \"next\": null,\n  \"previous\": null,\n  \"results\": [\n    {\n      \"id\": \"421725380620004\",\n      \"name\": \"Pasta Spaghetti 700 g\",\n      \"package_description\": {\n        \"unit\": \"g\",\n        \"quantity\": \"700.000000\",\n        \"description\": \"g\"\n      },\n      \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421725380620004/\",\n      \"modified_date\": \"2021-12-16T09:18:18Z\",\n      \"base_stock_item_unit_id\": \"421725380620004\",\n      \"gtin\": null,\n      \"active\": true,\n      \"stockable_recipe\": null,\n      \"average_price_per_standard_unit\": null,\n      \"main_ingredient_id\": \"764556666890005\",\n      \"piece\": true,\n      \"name_translations\": {\n        \"en\": \"Pasta Spaghetti 700 g\",\n        \"hu\": \"Pasta Spaghetti 700 g\"\n      },\n      \"stockable\": true,\n      \"base_stock_item\": {\n        \"quantity\": \"1.00000\",\n        \"unit\": \"g\",\n        \"id\": \"421725380620004\"\n      },\n      \"average_price_per_package\": null,\n      \"created_by\": \"john.doe@apicbase.com\",\n      \"content\": \"700 g\",\n      \"main_ingredient_name\": \"Pasta Spaghetti\"\n    },\n    {\n      \"id\": \"721794004480005\",\n      \"name\": \"Cola Can (33 cl)\",\n      \"package_description\": {\n        \"unit\": \"cl\",\n        \"quantity\": \"33.000000\",\n        \"description\": \"cl\"\n      },\n      \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/721794004480005/\",\n      \"modified_date\": \"2020-06-17T09:53:45Z\",\n      \"base_stock_item_unit_id\": \"721794004480005\",\n      \"gtin\": null,\n      \"active\": true,\n      \"stockable_recipe\": null,\n      \"average_price_per_standard_unit\": null,\n      \"main_ingredient_id\": \"664556437850007\",\n      \"piece\": true,\n      \"name_translations\": {\n        \"hu\": \"Cola Can (33 cl)\",\n        \"en\": \"Cola Can (33 cl)\"\n      },\n      \"stockable\": true,\n      \"base_stock_item\": {\n        \"quantity\": \"1.00000\",\n        \"unit\": \"cl\",\n        \"id\": \"721794004480005\"\n      },\n      \"average_price_per_package\": null,\n      \"created_by\": \"john.doe@apicbase.com\",\n      \"content\": \"33 cl\",\n      \"main_ingredient_name\": \"Cola\"\n    },\n    {\n      \"id\": \"921060274251001\",\n      \"name\": \"Cola 6 x 33 cl\",\n      \"package_description\": {\n        \"unit\": \"Can (33 cl)\",\n        \"quantity\": \"6.000000\",\n        \"description\": null\n      },\n      \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/921060274251001/\",\n      \"modified_date\": \"2022-01-18T14:04:16Z\",\n      \"base_stock_item_unit_id\": \"721794004480005\",\n      \"gtin\": null,\n      \"active\": true,\n      \"stockable_recipe\": null,\n      \"average_price_per_standard_unit\": null,\n      \"main_ingredient_id\": \"664556437850007\",\n      \"piece\": false,\n      \"name_translations\": {\n        \"hu\": \"Cola 6 x 33 cl\",\n        \"en\": \"Cola 6 x 33 cl\"\n      },\n      \"stockable\": true,\n      \"base_stock_item\": {\n        \"quantity\": \"6.00000\",\n        \"unit\": \"cl\",\n        \"id\": \"721794004480005\"\n      },\n      \"average_price_per_package\": null,\n      \"created_by\": \"john.doe@apicbase.com\",\n      \"content\": \"6 x 33 cl\",\n      \"main_ingredient_name\": \"Cola\"\n    },\n    {\n      \"id\": \"421747108501007\",\n      \"name\": \"Spaghetti Bolognese Pack (1 piece)\",\n      \"package_description\": {\n        \"unit\": \"piece\",\n        \"quantity\": \"1.000000\",\n        \"description\": \"piece\"\n      },\n      \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421747108501007/\",\n      \"modified_date\": \"2023-06-07T07:18:37Z\",\n      \"base_stock_item_unit_id\": \"421747108501007\",\n      \"gtin\": null,\n      \"active\": true,\n      \"stockable_recipe\": {\n        \"id\": \"349980442190000\",\n        \"url\": \"https://app.apicbase.com/api/v2/products/recipes/349980442190000/\",\n        \"name\": \"Spaghetti Bolognese\"\n      },\n      \"average_price_per_standard_unit\": null,\n      \"main_ingredient_id\": \"364297942201009\",\n      \"piece\": false,\n      \"name_translations\": {\n        \"en\": \"Spaghetti Bolognese Pack (1 piece)\",\n        \"hu\": \"Spaghetti Bolognese Pack (1 piece)\"\n      },\n      \"stockable\": true,\n      \"base_stock_item\": {\n        \"quantity\": \"1.00000\",\n        \"unit\": \"piece\",\n        \"id\": \"421747108501007\"\n      },\n      \"average_price_per_package\": null,\n      \"created_by\": \"john.doe@apicbase.com\",\n      \"content\": \"1 piece\",\n      \"main_ingredient_name\": \"Spaghetti Bolognese\"\n    },\n    {\n      \"id\": \"521725390640009\",\n      \"name\": \"Pasta Spaghetti Box (50 x 700 g)\",\n      \"package_description\": {\n        \"unit\": \"700 g\",\n        \"quantity\": \"50.000000\",\n        \"description\": null\n      },\n      \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/521725390640009/\",\n      \"modified_date\": \"2023-10-18T09:38:40Z\",\n      \"base_stock_item_unit_id\": \"421725380620004\",\n      \"gtin\": null,\n      \"active\": true,\n      \"stockable_recipe\": null,\n      \"average_price_per_standard_unit\": \"0.8571428571\",\n      \"main_ingredient_id\": \"764556666890005\",\n      \"piece\": false,\n      \"name_translations\": {\n        \"en\": \"Pasta Spaghetti Box (50 x 700 g)\",\n        \"hu\": \"Pasta Spaghetti Box (50 x 700 g)\"\n      },\n      \"stockable\": true,\n      \"base_stock_item\": {\n        \"quantity\": \"50.00000\",\n        \"unit\": \"g\",\n        \"id\": \"421725380620004\"\n      },\n      \"average_price_per_package\": \"30.0000000000\",\n      \"created_by\": \"john.doe@apicbase.com\",\n      \"content\": \"50 x 700 g\",\n      \"main_ingredient_name\": \"Pasta Spaghetti\"\n    },\n    {\n      \"id\": \"421995083881000\",\n      \"name\": \"Carrots One (20 g)\",\n      \"package_description\": {\n        \"unit\": \"g\",\n        \"quantity\": \"20.000000\",\n        \"description\": \"g\"\n      },\n      \"url\": \"https://app.apicbase.com/api/v2/products/stock_items/421995083881000/\",\n      \"modified_date\": \"2023-01-26T08:35:36Z\",\n      \"base_stock_item_unit_id\": \"421995083881000\",\n      \"gtin\": null,\n      \"active\": true,\n      \"stockable_recipe\": null,\n      \"average_price_per_standard_unit\": null,\n      \"main_ingredient_id\": \"464556907820001\",\n      \"piece\": true,\n      \"name_translations\": {\n        \"en\": \"Carrots One (20 g)\",\n        \"hu\": \"Carrots One (20 g)\"\n      },\n      \"stockable\": true,\n      \"base_stock_item\": {\n        \"quantity\": \"1.00000\",\n        \"unit\": \"g\",\n        \"id\": \"421995083881000\"\n      },\n      \"average_price_per_package\": null,\n      \"created_by\": \"john.doe@apicbase.com\",\n      \"content\": \"20 g\",\n      \"main_ingredient_name\": \"Carrots\"\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":6,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"421725380620004"},"name":{"type":"string","example":"Pasta Spaghetti 700 g"},"package_description":{"type":"object","properties":{"unit":{"type":"string","example":"g"},"quantity":{"type":"string","example":"700.000000"},"description":{"type":"string","example":"g"}}},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/421725380620004/"},"modified_date":{"type":"string","example":"2021-12-16T09:18:18Z"},"base_stock_item_unit_id":{"type":"string","example":"421725380620004"},"gtin":{},"active":{"type":"boolean","example":true,"default":true},"stockable_recipe":{},"average_price_per_standard_unit":{},"main_ingredient_id":{"type":"string","example":"764556666890005"},"piece":{"type":"boolean","example":true,"default":true},"name_translations":{"type":"object","properties":{"en":{"type":"string","example":"Pasta Spaghetti 700 g"},"hu":{"type":"string","example":"Pasta Spaghetti 700 g"}}},"stockable":{"type":"boolean","example":true,"default":true},"base_stock_item":{"type":"object","properties":{"quantity":{"type":"string","example":"1.00000"},"unit":{"type":"string","example":"g"},"id":{"type":"string","example":"421725380620004"}}},"average_price_per_package":{},"created_by":{"type":"string","example":"john.doe@apicbase.com"},"content":{"type":"string","example":"700 g"},"main_ingredient_name":{"type":"string","example":"Pasta Spaghetti"}}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/stock_items/stock/":{"get":{"summary":"Get Inventory Stock Item Details","description":"Returns inventory quantities for stock items in a given outlet.","operationId":"get-inventory-stock-item-details","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"stock_item_ids","in":"query","required":false,"description":"Comma separated list of stock items IDs to filter.","schema":{"type":"string","default":""}},{"name":"has_theoretical_stock","in":"query","required":false,"description":"If true, will return only stock items with quantity different than zero.","schema":{"type":"string","default":""}},{"name":"exclude_count_id","in":"query","required":false,"description":"If provided, will exclude stock items that are present on the informed count event ID.","schema":{"type":"string","default":""}},{"name":"countable_only","in":"query","required":false,"description":"If true, will return only stock items that are countable (active and stockable).","schema":{"type":"string","default":""}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"count\": 4,\n  \"next\": null,\n  \"previous\": null,\n  \"results\": [\n    {\n      \"id\": \"421725380620004\",\n      \"name\": \"Pasta Spaghetti 700 g\",\n      \"package_description\": {\n        \"unit\": \"g\",\n        \"quantity\": \"700.000000\"\n      },\n      \"par\": null,\n      \"minimum_quantity_required\": null,\n      \"quantity\": -0.45,\n      \"stock_value\": -0.27\n    },\n    {\n      \"id\": \"421995083881000\",\n      \"name\": \"Carrots One (20 g)\",\n      \"package_description\": {\n        \"unit\": \"g\",\n        \"quantity\": \"20.000000\"\n      },\n      \"par\": null,\n      \"minimum_quantity_required\": null,\n      \"quantity\": -0.62,\n      \"stock_value\": 0.0\n    },\n    {\n      \"id\": \"721794004480005\",\n      \"name\": \"Cola Can (33 cl)\",\n      \"package_description\": {\n        \"unit\": \"cl\",\n        \"quantity\": \"33.000000\"\n      },\n      \"par\": \"15.00\",\n      \"minimum_quantity_required\": \"6.00\",\n      \"quantity\": 18.0,\n      \"stock_value\": 0.0\n    },\n    {\n      \"id\": \"421747108501007\",\n      \"name\": \"Spaghetti Bolognese Pack (1 piece)\",\n      \"package_description\": {\n        \"unit\": \"piece\",\n        \"quantity\": \"1.000000\"\n      },\n      \"par\": null,\n      \"minimum_quantity_required\": null,\n      \"quantity\": 5.0,\n      \"stock_value\": 0.27\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":4,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"421725380620004"},"name":{"type":"string","example":"Pasta Spaghetti 700 g"},"package_description":{"type":"object","properties":{"unit":{"type":"string","example":"g"},"quantity":{"type":"string","example":"700.000000"}}},"par":{},"minimum_quantity_required":{},"quantity":{"type":"number","example":-0.45,"default":0},"stock_value":{"type":"number","example":-0.27,"default":0}}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/event_logs/":{"get":{"summary":"Get Inventory Event Logs","description":"Lists inventory update log entries for stock items in a given outlet.","operationId":"get-inventory-event-logs","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"event_date__date","in":"query","required":false,"description":"Filter by the inventory event date (YYYY-MM-DD). Required if no event_date__date__gte/lte range is provided.","schema":{"type":"string","format":"date"}},{"name":"event_date__date__gte","in":"query","required":false,"description":"Start of the inventory event date range (YYYY-MM-DD). Must be used together with event_date__date__lte.","schema":{"type":"string","format":"date"}},{"name":"event_date__date__lte","in":"query","required":false,"description":"End of the inventory event date range (YYYY-MM-DD). Must be used together with event_date__date__gte.","schema":{"type":"string","format":"date"}},{"name":"event_date__time","in":"query","required":false,"description":"Filter by the inventory event time (HH:MM:SS).","schema":{"type":"string","format":"time"}},{"name":"event_date__time__gte","in":"query","required":false,"description":"Filter inventory events occurring at or after this time (HH:MM:SS).","schema":{"type":"string","format":"time"}},{"name":"event_date__time__lte","in":"query","required":false,"description":"Filter inventory events occurring at or before this time (HH:MM:SS).","schema":{"type":"string","format":"time"}},{"name":"modified_date__date","in":"query","required":false,"description":"Filter by event modification date (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"modified_date__date__gte","in":"query","required":false,"description":"Filter events modified on or after this date (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"modified_date__date__lte","in":"query","required":false,"description":"Filter events modified on or before this date (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"modified_date__time","in":"query","required":false,"description":"Filter by updated time (HH:MM:SS).","schema":{"type":"string","format":"time"}},{"name":"modified_date__time__gte","in":"query","required":false,"description":"Filter events modified at or after this time (HH:MM:SS).","schema":{"type":"string","format":"time"}},{"name":"modified_date__time__lte","in":"query","required":false,"description":"Filter events modified at or before this time (HH:MM:SS).","schema":{"type":"string","format":"time"}},{"name":"created_date__date","in":"query","required":false,"description":"Filter by event creation date (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"created_date__date__gte","in":"query","required":false,"description":"Filter events created on or after this date (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"created_date__date__lte","in":"query","required":false,"description":"Filter events created on or before this date (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"created_date__time","in":"query","required":false,"description":"Filter by event creation time (HH:MM:SS).","schema":{"type":"string","format":"time"}},{"name":"created_date__time__gte","in":"query","required":false,"description":"Filter events created at or after this time (HH:MM:SS).","schema":{"type":"string","format":"time"}},{"name":"created_date__time__lte","in":"query","required":false,"description":"Filter events created at or before this time (HH:MM:SS).","schema":{"type":"string","format":"time"}},{"name":"stock_item_ids","in":"query","required":false,"description":"Comma separated list of stock item IDs to filter.","schema":{"type":"string"}},{"name":"base_stock_item_ids","in":"query","required":false,"description":"Comma separated list of stock item IDs to filter.","schema":{"type":"string"}},{"name":"ingredient_ids","in":"query","required":false,"description":"Comma separated list of ingredient IDs to filter.","schema":{"type":"string"}},{"name":"destination_outlet_ids","in":"query","required":false,"description":"Comma separated list of destination outlet IDs to filter (transfer events).","schema":{"type":"string"}},{"name":"source_recipe_ids","in":"query","required":false,"description":"Comma separated list of source recipe IDs to filter.","schema":{"type":"string"}},{"name":"ingredient_accounting_category","in":"query","required":false,"description":"Filter by ingredient accounting category (case-insensitive).","schema":{"type":"string"}},{"name":"ingredient_category","in":"query","required":false,"description":"Filter by ingredient category (case-insensitive).","schema":{"type":"string"}},{"name":"ingredient_subcategory","in":"query","required":false,"description":"Filter by ingredient subcategory (case-insensitive).","schema":{"type":"string"}},{"name":"event_type","in":"query","required":false,"description":"Filter by inventory event type.","schema":{"type":"string","enum":["COUNT","POS","WASTE","CREATION","MOVE","ORDERED","MANUAL_SALES"]}},{"name":"event_type__in","in":"query","required":false,"description":"Comma separated list of inventory event types to filter.","schema":{"type":"string","enum":["COUNT","POS","WASTE","CREATION","MOVE","ORDERED","MANUAL_SALES"]}},{"name":"stock_value","in":"query","required":false,"description":"Filter by stock value of the event.","schema":{"type":"number"}},{"name":"stock_value__gt","in":"query","required":false,"description":"Filter events with stock value greater than this amount.","schema":{"type":"number"}},{"name":"stock_value__lt","in":"query","required":false,"description":"Filter events with stock value less than this amount.","schema":{"type":"number"}},{"name":"quantity","in":"query","required":false,"description":"Filter by quantity of the stock item in the event.","schema":{"type":"number"}},{"name":"quantity__gt","in":"query","required":false,"description":"Filter events with quantity greater than this amount.","schema":{"type":"number"}},{"name":"quantity__lt","in":"query","required":false,"description":"Filter events with quantity less than this amount.","schema":{"type":"number"}},{"name":"result_stock_value","in":"query","required":false,"description":"Filter by resulting stock value.","schema":{"type":"number"}},{"name":"result_stock_value__gt","in":"query","required":false,"description":"Filter logs with resulting stock value greater than this amount.","schema":{"type":"number"}},{"name":"result_stock_value__lt","in":"query","required":false,"description":"Filter logs with resulting stock value less than this amount.","schema":{"type":"number"}},{"name":"result_quantity","in":"query","required":false,"description":"Filter by resulting quantity.","schema":{"type":"number"}},{"name":"result_quantity__gt","in":"query","required":false,"description":"Filter logs with resulting quantity greater than this amount.","schema":{"type":"number"}},{"name":"result_quantity__lt","in":"query","required":false,"description":"Filter logs with resulting quantity less than this amount.","schema":{"type":"number"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"count\": 2,\n  \"next\": null,\n  \"previous\": null,\n  \"results\": [\n    {\n      \"id\": \"1001\",\n      \"stock_value\": \"12.50\",\n      \"quantity\": \"1.0000000000\",\n      \"result_stock_value\": \"25.00\",\n      \"result_quantity\": \"2.0000000000\",\n      \"event_date\": \"2024-11-01T10:00:00+0000\",\n      \"created_date\": \"2024-11-01T10:05:00+0000\",\n      \"event_type\": \"COUNT\",\n      \"stock_item_id\": \"421725380620004\",\n      \"stock_item_name\": \"Pasta Spaghetti 700 g\",\n      \"base_stock_item_id\": \"421725380620004\",\n      \"base_stock_item_name\": \"Pasta Spaghetti 700 g\",\n      \"ingredient\": {\n        \"id\": \"764556666890005\",\n        \"name\": \"Pasta Spaghetti\",\n        \"short_name\": \"Spaghetti\",\n        \"accounting_category\": \"Food\",\n        \"category\": \"Dry goods\",\n        \"subcategory\": \"Pasta\"\n      },\n      \"destination_outlet\": null,\n      \"modified_date\": \"2024-11-01T10:05:00+0000\",\n      \"source_recipe\": null\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":2,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"1001"},"stock_value":{"type":"string","example":"12.50"},"quantity":{"type":"string","example":"1.0000000000"},"result_stock_value":{"type":"string","example":"25.00"},"result_quantity":{"type":"string","example":"2.0000000000"},"event_date":{"type":"string","format":"date-time","example":"2024-11-01T10:00:00+0000"},"created_date":{"type":"string","format":"date-time","example":"2024-11-01T10:05:00+0000"},"event_type":{"type":"string","example":"COUNT"},"stock_item_id":{"type":"string","example":"421725380620004"},"stock_item_name":{"type":"string","example":"Pasta Spaghetti 700 g"},"base_stock_item_id":{"type":"string","example":"421725380620004"},"base_stock_item_name":{"type":"string","example":"Pasta Spaghetti 700 g"},"ingredient":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"764556666890005"},"name":{"type":"string","example":"Pasta Spaghetti"},"short_name":{"type":"string","example":"Spaghetti"},"accounting_category":{"type":"string","example":"Food"},"category":{"type":"string","example":"Dry goods"},"subcategory":{"type":"string","example":"Pasta"}}},"destination_outlet":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"123456"},"name":{"type":"string","example":"Central Kitchen"}}},"modified_date":{"type":"string","format":"date-time","example":"2024-11-01T10:05:00+0000"},"source_recipe":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"349980442190000"},"name":{"type":"string","example":"Spaghetti Bolognese"},"category":{"type":"string","example":"Mains"},"subcategory":{"type":"string","example":"Pasta"}}}}}}}}}}}},"deprecated":false}},"/inventory/outlets/{outlet_id}/stock_items/{stock_item_id}/stock/":{"get":{"summary":"Get a Stock Item's Inventory Information","description":"Returns inventory information about a specific stock item at a specific outlet.","operationId":"get-detailed-stock-item-inventory-information","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"stock_item_id","in":"path","description":"A stock item's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"721794004480005\",\n  \"name\": \"Cola Can (33 cl)\",\n  \"package_description\": {\n    \"unit\": \"cl\",\n    \"base_unit\": \"cl\",\n    \"quantity\": \"33.000000\",\n    \"unit_stock_item\": null\n  },\n  \"par\": \"10.00\",\n  \"minimum_quantity_required\": \"6.00\",\n \"storage_locations\": [\"Fridge\", \"Freezer\", \"Dry Stock\"],\n  \"quantity\": \"12.00\",\n  \"stock_value\": \"18.20\",\n  \"aggregated_quantity\": \"18.00\",\n  \"aggregated_stock_value\": \"25.00\"\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"721794004480005"},"name":{"type":"string","example":"Cola Can (33 cl)"},"package_description":{"type":"object","properties":{"unit":{"type":"string","example":"cl"},"base_unit":{"type":"string","example":"cl"},"quantity":{"type":"string","example":"33.000000"},"unit_stock_item":{}}},"par":{"type":"string","example":"10.00"},"minimum_quantity_required":{"type":"string","example":"6.00"},"storage_locations":{"type":"array","items":{"type":"string"},"example":["Fridge","Freezer","Dry Stock"]},"quantity":{"type":"string","example":"12.00"},"stock_value":{"type":"string","example":"18.20"},"aggregated_quantity":{"type":"string","example":"18.00"},"aggregated_stock_value":{"type":"string","example":"25.00"}}}}}}},"deprecated":false},"post":{"summary":"Update a Stock Item's Inventory Information","description":"Update inventory information about a specific stock item at a specific outlet","operationId":"post-detailed-stock-item-inventory-information","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"stock_item_id","in":"path","description":"A stock item's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"par":{"type":"string","description":"PAR (Periodic Automatic Replenishment)"},"minimum_quantity_required":{"type":"string","description":"Minimum inventory levels"},"storage_locations":{"type":"array","items":{"type":"string"},"description":"A storage location"}}},"examples":{"Request Example":{"value":{"par":"10.00","minimum_quantity_required":"6.00","storage_locations":["Fridge","Freezer","Dry Stock"]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"721794004480005\",\n  \"name\": \"Cola Can (33 cl)\",\n  \"package_description\": {\n    \"unit\": \"cl\",\n    \"base_unit\": \"cl\",\n    \"quantity\": \"33.000000\",\n    \"unit_stock_item\": null\n  },\n  \"par\": \"10.00\",\n  \"minimum_quantity_required\": \"6.00\",\n \"storage_locations\": [\"Fridge\", \"Freezer\", \"Dry Stock\"],\n  \"quantity\": \"12.00\",\n  \"stock_value\": \"18.20\",\n  \"aggregated_quantity\": \"18.00\",\n  \"aggregated_stock_value\": \"25.00\"\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"721794004480005"},"name":{"type":"string","example":"Cola Can (33 cl)"},"package_description":{"type":"object","properties":{"unit":{"type":"string","example":"cl"},"base_unit":{"type":"string","example":"cl"},"quantity":{"type":"string","example":"33.000000"},"unit_stock_item":{}}},"par":{"type":"string","example":"10.00"},"minimum_quantity_required":{"type":"string","example":"6.00"},"storage_locations":{"type":"array","items":{"type":"string"},"example":["Fridge","Freezer","Dry Stock"]},"quantity":{"type":"string","example":"12.00"},"stock_value":{"type":"string","example":"18.20"},"aggregated_quantity":{"type":"string","example":"18.00"},"aggregated_stock_value":{"type":"string","example":"25.00"}}}}}}},"deprecated":false}},"/procurement/purchase_orders/":{"get":{"summary":"Get Purchase Orders","description":"Returns a list of all purchase orders in the library.","operationId":"get-purchase-orders","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"supplier","in":"query","description":"Filter on a supplier ID.","schema":{"type":"string"}},{"name":"outlet","in":"query","description":"Filter on an outlet ID.","schema":{"type":"string"}},{"name":"order_number","in":"query","description":"Filter on an order number. Only queries exact matches.","schema":{"type":"string"}},{"name":"order_number__contains","in":"query","description":"Filter on an order number. Queries partial matches on this field.","schema":{"type":"string"}},{"name":"owned_by","in":"query","description":"A user ID.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter on a status.","schema":{"type":"string","enum":["IN_PROGRESS","ORDERED","DELIVERED","AWAITING_APPROVAL","REJECTED"]}},{"name":"status__in","in":"query","description":"Filter on multiple status.","schema":{"type":"array","items":{"type":"string"}}},{"name":"delivery_closed","in":"query","description":"Filter on orders that are or are not accepting more deliveries. When true, no more deliveries are expected.","schema":{"type":"boolean"}},{"name":"ordered_on","in":"query","description":"Filter on the order's ordered on date.","schema":{"type":"string","format":"date"}},{"name":"ordered_on__gt","in":"query","description":"Filter on the order's ordered on date (greater than).","schema":{"type":"string","format":"date"}},{"name":"ordered_on__lt","in":"query","description":"Filter on the order's ordered on date (lower than).","schema":{"type":"string","format":"date"}},{"name":"expected_delivery_date","in":"query","description":"Filter on the order's expected delivery date.","schema":{"type":"string","format":"date"}},{"name":"expected_delivery_date__gt","in":"query","description":"Filter on the order's expected delivery date (greater than).","schema":{"type":"string","format":"date"}},{"name":"expected_delivery_date__lt","in":"query","description":"Filter on the order's expected delivery date (lower than).","schema":{"type":"string","format":"date"}},{"name":"discount","in":"query","description":"Filter on a discount amount (exact).","schema":{"type":"number","format":"float"}},{"name":"discount__gt","in":"query","description":"Filter on a discount amount (greater than).","schema":{"type":"number","format":"float"}},{"name":"discount__lt","in":"query","description":"Filter on a discount amount (lower than).","schema":{"type":"number","format":"float"}},{"name":"invoice_number","in":"query","description":"Filter on an invoice number","schema":{"type":"string"}},{"name":"invoice_status","in":"query","description":"Filter on an invoice status.","schema":{"type":"string","enum":["0","1","2","3"]}},{"name":"viewed_by_supplier","in":"query","description":"Filter on orders that have/have not been viewed by the supplier.","schema":{"type":"boolean"}},{"name":"viewed_by_supplier_at","in":"query","description":"Filter on the order's viewed by supplier date.","schema":{"type":"string","format":"date"}},{"name":"viewed_by_supplier_at__gt","in":"query","description":"Filter on the order's viewed by supplier date (greater than).","schema":{"type":"string","format":"date"}},{"name":"viewed_by_supplier_at__lt","in":"query","description":"Filter on the order's viewed by supplier date (lower than).","schema":{"type":"string","format":"date"}},{"name":"fetched_by_supplier","in":"query","description":"Filter on orders that have/have not been fetched by the supplier.","schema":{"type":"boolean"}},{"name":"fetched_by_supplier_at","in":"query","description":"Filter on the order's fetched by supplier date.","schema":{"type":"string","format":"date"}},{"name":"fetched_by_supplier_at__gt","in":"query","description":"Filter on the order's fetched by supplier date (greater than).","schema":{"type":"string","format":"date"}},{"name":"fetched_by_supplier_at__lt","in":"query","description":"Filter on the order's fetched by supplier date (lower than).","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"count\": 4,\n  \"next\": null,\n  \"previous\": null,\n  \"results\": [\n    {\n      \"id\": \"773820515180004\",\n      \"order_number\": null,\n      \"status\": \"IN_PROGRESS\",\n      \"supplier\": {\n        \"id\": \"325220129010007\",\n        \"company_name\": \"Happy Cow Products\",\n        \"email\": [\n          \"ordering@happycowproducts.com\"\n        ],\n        \"url\": \"https://app.apicbase.com/api/v2/contact/325220129010007/\"\n      },\n      \"outlet\": {\n        \"id\": \"729100535470009\",\n        \"name\": \"Gent\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/outlets/729100535470009/\"\n      },\n      \"ordered_on\": null,\n      \"owned_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@gmail.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n      },\n      \"order_remarks\": null,\n      \"packages\": [\n        {\n          \"id\": \"474181670100007\",\n          \"stock_item\": {\n            \"id\": \"621725870650009\",\n            \"name\": \"Milk 0% Fat Big Crate (12 x 1 l)\",\n            \"url\": \"https://app.apicbase.com/api/v2/stock_items/621725870650009/\"\n          },\n          \"supplier_package\": {\n            \"id\": \"443306\",\n            \"supplier_article_number\": \"7771234\",\n            \"supplier_product_name\": \"Milk 0% Fat Big Crate\",\n            \"theoretical_price_per_package\": \"9.00\",\n            \"url\": \"https://app.apicbase.com/api/v2/supplier_packages/443306/\"\n          },\n          \"accounting_category\": null,\n          \"quantity_ordered\": 3,\n          \"total_theoretical_price\": \"27.00\"\n        }\n      ],\n      \"expected_delivery_date\": null,\n      \"viewed_by_supplier\": false,\n      \"viewed_by_supplier_at\": null,\n      \"fetched_by_supplier\": false,\n      \"fetched_by_supplier_at\": null,\n      \"invoice_number\": null,\n      \"invoice_status\": \"0\",\n      \"delivery_remarks\": null,\n      \"discount\": null,\n      \"discount_remarks\": null,\n      \"returnables_in\": null,\n      \"returnables_out\": null,\n      \"returnables_remarks\": null,\n      \"manual_price_after_discount_returnables\": null,\n      \"theoretical_price\": \"27.00\",\n      \"delivery_closed\": false,\n      \"invoice_documents\": []\n    },\n    {\n      \"id\": \"873820484110009\",\n      \"order_number\": \"#20200729-1452-1\",\n      \"status\": \"DELIVERED\",\n      \"supplier\": {\n        \"id\": \"825320333320003\",\n        \"company_name\": \"Mama Pasta\",\n        \"email\": [\n          \"sales@mamapastaproducts.com\"\n        ],\n        \"url\": \"https://app.apicbase.com/api/v2/contact/825320333320003/\"\n      },\n      \"outlet\": {\n        \"id\": \"829100725420008\",\n        \"name\": \"Brussel\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/\"\n      },\n      \"ordered_on\": \"2020-07-29T10:53:40Z\",\n      \"owned_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@gmail.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n      },\n      \"order_remarks\": null,\n      \"packages\": [\n        {\n          \"id\": \"274181740160004\",\n          \"stock_item\": {\n            \"id\": \"521725390640009\",\n            \"name\": \"Pasta Spaghetti Box (50 x 700 g)\",\n            \"url\": \"https://app.apicbase.com/api/v2/stock_items/521725390640009/\"\n          },\n          \"supplier_package\": {\n            \"id\": \"443307\",\n            \"supplier_article_number\": \"9999999\",\n            \"supplier_product_name\": \"Pasta Spaghetti Box\",\n            \"theoretical_price_per_package\": \"32.00\",\n            \"url\": \"https://app.apicbase.com/api/v2/supplier_packages/443307/\"\n          },\n          \"accounting_category\": null,\n          \"quantity_ordered\": 5,\n          \"total_theoretical_price\": \"160.00\"\n        }\n      ],\n      \"expected_delivery_date\": \"2020-08-04T10:00:00\",\n      \"viewed_by_supplier\": false,\n      \"viewed_by_supplier_at\": null,\n      \"fetched_by_supplier\": false,\n      \"fetched_by_supplier_at\": null,\n      \"invoice_number\": \"2222\",\n      \"invoice_status\": \"2\",\n      \"delivery_remarks\": \"Delivered at gate 2\",\n      \"discount\": \"15.00\",\n      \"discount_remarks\": \"Discount because of units ordered\",\n      \"returnables_in\": null,\n      \"returnables_out\": \"10.00\",\n      \"returnables_remarks\": null,\n      \"manual_price_after_discount_returnables\": null,\n      \"theoretical_price\": \"160.00\",\n      \"delivery_closed\": false,\n      \"invoice_documents\": []\n    },\n    {\n      \"id\": \"473820664180007\",\n      \"order_number\": \"#20200729-1451-2\",\n      \"status\": \"ORDERED\",\n      \"supplier\": {\n        \"id\": \"825320333320003\",\n        \"company_name\": \"Mama Pasta\",\n        \"email\": [\n          \"sales@mamapastaproducts.com\"\n        ],\n        \"url\": \"https://app.apicbase.com/api/v2/contact/825320333320003/\"\n      },\n      \"outlet\": {\n        \"id\": \"229100415400002\",\n        \"name\": \"Antwerpen\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/outlets/229100415400002/\"\n      },\n      \"ordered_on\": \"2020-07-29T10:53:02.012162+02:00\",\n      \"owned_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@gmail.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n      },\n      \"order_remarks\": \"Nothing to add\",\n      \"packages\": [\n        {\n          \"id\": \"574181510100003\",\n          \"stock_item\": {\n            \"id\": \"521725390640009\",\n            \"name\": \"Pasta Spaghetti Box (50 x 700 g)\",\n            \"url\": \"https://app.apicbase.com/api/v2/stock_items/521725390640009/\"\n          },\n          \"supplier_package\": {\n            \"id\": \"443307\",\n            \"supplier_article_number\": \"9999999\",\n            \"supplier_product_name\": \"Pasta Spaghetti Box\",\n            \"theoretical_price_per_package\": \"32.00\",\n            \"url\": \"https://app.apicbase.com/api/v2/supplier_packages/443307/\"\n          },\n          \"accounting_category\": null,\n          \"quantity_ordered\": 3,\n          \"total_theoretical_price\": \"96.00\"\n        }\n      ],\n      \"expected_delivery_date\": null,\n      \"viewed_by_supplier\": false,\n      \"viewed_by_supplier_at\": null,\n      \"fetched_by_supplier\": false,\n      \"fetched_by_supplier_at\": null,\n      \"invoice_number\": null,\n      \"invoice_status\": \"0\",\n      \"delivery_remarks\": null,\n      \"discount\": null,\n      \"discount_remarks\": null,\n      \"returnables_in\": null,\n      \"returnables_out\": null,\n      \"returnables_remarks\": null,\n      \"manual_price_after_discount_returnables\": null,\n      \"theoretical_price\": \"96.00\",\n      \"delivery_closed\": false,\n      \"invoice_documents\": [\n        {\n          \"id\": \"479000823140006\",\n          \"file_url\": \"https://staging-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/istockphoto-518473490-612x612.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T131025Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=62d3cf8cc4805a10be27dfe577db65da83d7e175e3eee6804e9a15f79fd01b6f\"\n        },\n        {\n          \"id\": \"979000433160008\",\n          \"file_url\": \"https://staging-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/PyCharm_ReferenceCard.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T131025Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=da8a9ad6d7815f572a845b394157d4f3f4f0ecb788f061297b7f53e9bac097be\"\n        }\n      ]\n    },\n    {\n      \"id\": \"773820254140000\",\n      \"order_number\": \"#20200729-1451-1\",\n      \"status\": \"ORDERED\",\n      \"supplier\": {\n        \"id\": \"325220129010007\",\n        \"company_name\": \"Happy Cow Products\",\n        \"email\": [\n          \"ordering@happycowproducts.com\"\n        ],\n        \"url\": \"https://app.apicbase.com/api/v2/contact/325220129010007/\"\n      },\n      \"outlet\": {\n        \"id\": \"229100415400002\",\n        \"name\": \"Antwerpen\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/outlets/229100415400002/\"\n      },\n      \"ordered_on\": \"2020-07-29T10:52:12Z\",\n      \"owned_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@gmail.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n      },\n      \"order_remarks\": \"This is a remark\",\n      \"packages\": [\n        {\n          \"id\": \"374181120170007\",\n          \"stock_item\": {\n            \"id\": \"621725870650009\",\n            \"name\": \"Milk 0% Fat Big Crate (12 x 1 l)\",\n            \"url\": \"https://app.apicbase.com/api/v2/stock_items/621725870650009/\"\n          },\n          \"supplier_package\": {\n            \"id\": \"443306\",\n            \"supplier_article_number\": \"7771234\",\n            \"supplier_product_name\": \"Milk 0% Fat Big Crate\",\n            \"theoretical_price_per_package\": \"9.00\",\n            \"url\": \"https://app.apicbase.com/api/v2/supplier_packages/443306/\"\n          },\n          \"accounting_category\": null,\n          \"quantity_ordered\": 20,\n          \"total_theoretical_price\": \"180.00\"\n        },\n        {\n          \"id\": \"474181500100006\",\n          \"stock_item\": {\n            \"id\": \"421794978110009\",\n            \"name\": \"Milk Whole Crate (6 x 1 l)\",\n            \"url\": \"https://app.apicbase.com/api/v2/stock_items/421794978110009/\"\n          },\n          \"supplier_package\": {\n            \"id\": \"417240\",\n            \"supplier_article_number\": \"100020\",\n            \"supplier_product_name\": \"Milk Whole Crate\",\n            \"theoretical_price_per_package\": \"4.00\",\n            \"url\": \"https://app.apicbase.com/api/v2/supplier_packages/417240/\"\n          },\n          \"accounting_category\": \"Beverage\",\n          \"quantity_ordered\": 20,\n          \"total_theoretical_price\": \"80.00\"\n        }\n      ],\n      \"expected_delivery_date\": \"2020-08-03T09:00:00\",\n      \"viewed_by_supplier\": false,\n      \"viewed_by_supplier_at\": null,\n      \"fetched_by_supplier\": false,\n      \"fetched_by_supplier_at\": null,\n      \"invoice_number\": null,\n      \"invoice_status\": \"0\",\n      \"delivery_remarks\": null,\n      \"discount\": null,\n      \"discount_remarks\": null,\n      \"returnables_in\": null,\n      \"returnables_out\": null,\n      \"returnables_remarks\": null,\n      \"manual_price_after_discount_returnables\": null,\n      \"theoretical_price\": \"260.00\",\n      \"delivery_closed\": false,\n      \"invoice_documents\": []\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":4,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"773820515180004"},"order_number":{},"status":{"type":"string","example":"IN_PROGRESS"},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"325220129010007"},"company_name":{"type":"string","example":"Happy Cow Products"},"email":{"type":"array","items":{"type":"string","example":"ordering@happycowproducts.com"}},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/contact/325220129010007/"}}},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"729100535470009"},"name":{"type":"string","example":"Gent"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/729100535470009/"}}},"ordered_on":{},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@gmail.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"order_remarks":{},"packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"474181670100007"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"621725870650009"},"name":{"type":"string","example":"Milk 0% Fat Big Crate (12 x 1 l)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/stock_items/621725870650009/"}}},"supplier_package":{"type":"object","properties":{"id":{"type":"string","example":"443306"},"supplier_article_number":{"type":"string","example":"7771234"},"supplier_product_name":{"type":"string","nullable":true,"example":"Milk 0% Fat Big Crate"},"theoretical_price_per_package":{"type":"string","example":"9.00"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/supplier_packages/443306/"}}},"accounting_category":{},"quantity_ordered":{"type":"integer","example":3,"default":0},"total_theoretical_price":{"type":"string","example":"27.00"}}}},"expected_delivery_date":{},"viewed_by_supplier":{"type":"boolean","example":false,"default":true},"viewed_by_supplier_at":{},"fetched_by_supplier":{"type":"boolean","example":false,"default":true},"fetched_by_supplier_at":{},"invoice_number":{},"invoice_status":{"type":"string","example":"0"},"delivery_remarks":{},"discount":{},"discount_remarks":{},"returnables_in":{},"returnables_out":{},"returnables_remarks":{},"manual_price_after_discount_returnables":{},"theoretical_price":{"type":"string","example":"27.00"},"delivery_closed":{"type":"boolean","example":false,"default":true},"invoice_documents":{"type":"array"}}}}}}}}}},"deprecated":false},"post":{"summary":"Create Purchase Orders","description":"Creates one or more purchase orders from a list of supplier packages.","operationId":"create-purchase-orders","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["outlet","packages"],"properties":{"outlet":{"type":"string","description":"The ID of the outlet the purchase order belongs to.","example":"829100725420008"},"packages":{"type":"array","minItems":1,"description":"List of supplier packages to include. Duplicate supplier package IDs are not allowed.","items":{"type":"object","required":["supplier_package"],"properties":{"supplier_package":{"type":"string","description":"The ID of the supplier package.","example":"443306"},"quantity":{"type":"number","nullable":true,"description":"The quantity to order. Mutually exclusive with `to_par`. One of `quantity` or `to_par` must be provided.","example":5},"to_par":{"type":"boolean","default":false,"description":"If true, the quantity is automatically calculated to reach the par level. Mutually exclusive with `quantity`. One of `quantity` or `to_par` must be provided.","example":false}}}}}},"examples":{"With explicit quantities":{"value":{"outlet":"829100725420008","packages":[{"supplier_package":"443306","quantity":5},{"supplier_package":"443307","quantity":10}]}},"Using to_par":{"value":{"outlet":"829100725420008","packages":[{"supplier_package":"443306","to_par":true}]}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"773820515180004"},"order_number":{"type":"string","nullable":true,"example":null},"status":{"type":"string","example":"IN_PROGRESS"},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"325220129010007"},"name":{"type":"string","example":"Happy Cow Products"},"email":{"type":"array","items":{"type":"string","example":"ordering@happycowproducts.com"}},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/contact/325220129010007/"}}},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"829100725420008"},"name":{"type":"string","example":"Brussel"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"}}},"ordered_on":{"type":"string","nullable":true,"example":null},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"order_remarks":{"type":"string","nullable":true,"example":null},"packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"374181120170007"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"621725870650009"},"name":{"type":"string","example":"Milk 0% Fat Big Crate (12 x 1 l)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/stock_items/621725870650009/"}}},"supplier_package":{"type":"object","properties":{"id":{"type":"string","example":"443306"},"supplier_article_number":{"type":"string","example":"7771234"},"supplier_product_name":{"type":"string","nullable":true,"example":"Milk 0% Fat Big Crate"},"theoretical_price_per_package":{"type":"string","example":"9.00"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/supplier_packages/443306/"}}},"accounting_category":{"type":"string","nullable":true,"example":null},"quantity_ordered":{"type":"number","example":5},"total_theoretical_price":{"type":"string","example":"45.00"}}}},"expected_delivery_date":{"type":"string","nullable":true,"example":null},"viewed_by_supplier":{"type":"boolean","example":false},"viewed_by_supplier_at":{"type":"string","nullable":true,"example":null},"fetched_by_supplier":{"type":"boolean","example":false},"fetched_by_supplier_at":{"type":"string","nullable":true,"example":null},"invoice_number":{"type":"string","nullable":true,"example":null},"invoice_status":{"type":"string","example":"0"},"delivery_remarks":{"type":"string","nullable":true,"example":null},"discount":{"type":"string","nullable":true,"example":null},"discount_remarks":{"type":"string","nullable":true,"example":null},"returnables_in":{"type":"string","nullable":true,"example":null},"returnables_out":{"type":"string","nullable":true,"example":null},"returnables_remarks":{"type":"string","nullable":true,"example":null},"manual_price_after_discount_returnables":{"type":"string","nullable":true,"example":null},"theoretical_price":{"type":"string","example":"45.00"},"supplier_customer_number":{"type":"string","nullable":true,"example":null},"delivery_closed":{"type":"boolean","example":false},"invoice_documents":{"type":"array","items":{}}}}}}}},"400":{"description":"400"},"403":{"description":"403"}},"deprecated":false}},"/procurement/purchase_orders/{purchase_order_id}/":{"get":{"summary":"Get Purchase Order Details","description":"Returns detailed information about a single purchase order.","operationId":"get-purchase-order-details","parameters":[{"name":"purchase_order_id","in":"path","description":"A purchase order's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"773820254140000\",\n  \"order_number\": \"#20200729-1451-1\",\n  \"status\": \"ORDERED\",\n  \"supplier\": {\n    \"id\": \"325220129010007\",\n    \"company_name\": \"Happy Cow Products\",\n    \"email\": [\n      \"ordering@happycowproducts.com\"\n    ],\n    \"url\": \"https://app.apicbase.com/api/v2/contact/325220129010007/\"\n  },\n  \"outlet\": {\n    \"id\": \"229100415400002\",\n    \"name\": \"Antwerpen\",\n    \"url\": \"https://app.apicbase.com/api/v2/accounts/outlets/229100415400002/\"\n  },\n  \"ordered_on\": \"2020-07-29T10:52:12Z\",\n  \"owned_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n  },\n  \"order_remarks\": \"This is a remark\",\n  \"packages\": [\n    {\n      \"id\": \"374181120170007\",\n      \"stock_item\": {\n        \"id\": \"621725870650009\",\n        \"name\": \"Milk 0% Fat Big Crate (12 x 1 l)\",\n        \"url\": \"https://app.apicbase.com/api/v2/stock_items/621725870650009/\"\n      },\n      \"supplier_package\": {\n        \"id\": \"443306\",\n        \"supplier_article_number\": \"7771234\",\n        \"supplier_product_name\": \"Milk 0% Fat Big Crate\",\n        \"theoretical_price_per_package\": \"9.00\",\n        \"url\": \"https://app.apicbase.com/api/v2/supplier_packages/443306/\"\n      },\n      \"accounting_category\": null,\n      \"quantity_ordered\": 20,\n      \"total_theoretical_price\": \"180.00\"\n    },\n    {\n      \"id\": \"474181500100006\",\n      \"stock_item\": {\n        \"id\": \"421794978110009\",\n        \"name\": \"Milk Whole Crate (6 x 1 l)\",\n        \"url\": \"https://app.apicbase.com/api/v2/stock_items/421794978110009/\"\n      },\n      \"supplier_package\": {\n        \"id\": \"417240\",\n        \"supplier_article_number\": \"100020\",\n        \"supplier_product_name\": \"Milk Whole Crate\",\n        \"theoretical_price_per_package\": \"4.00\",\n        \"url\": \"https://app.apicbase.com/api/v2/supplier_packages/417240/\"\n      },\n      \"accounting_category\": \"Beverage\",\n      \"quantity_ordered\": 20,\n      \"total_theoretical_price\": \"80.00\"\n    }\n  ],\n  \"expected_delivery_date\": \"2020-08-03T09:00:00\",\n  \"viewed_by_supplier\": false,\n  \"viewed_by_supplier_at\": null,\n  \"fetched_by_supplier\": false,\n  \"fetched_by_supplier_at\": null,\n  \"invoice_number\": null,\n  \"invoice_status\": \"0\",\n  \"delivery_remarks\": null,\n  \"discount\": null,\n  \"discount_remarks\": null,\n  \"returnables_in\": null,\n  \"returnables_out\": null,\n  \"returnables_remarks\": null,\n  \"manual_price_after_discount_returnables\": null,\n  \"theoretical_price\": \"260.00\",\n  \"delivery_closed\": false,\n  \"invoice_documents\": [\n    {\n      \"id\": \"479000823140006\",\n      \"file_url\": \"https://staging-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/istockphoto-518473490-612x612.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T131025Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=62d3cf8cc4805a10be27dfe577db65da83d7e175e3eee6804e9a15f79fd01b6f\"\n    },\n    {\n      \"id\": \"979000433160008\",\n      \"file_url\": \"https://staging-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/PyCharm_ReferenceCard.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T131025Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=da8a9ad6d7815f572a845b394157d4f3f4f0ecb788f061297b7f53e9bac097be\"\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"773820254140000"},"order_number":{"type":"string","example":"#20200729-1451-1"},"status":{"type":"string","example":"ORDERED"},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"325220129010007"},"company_name":{"type":"string","example":"Happy Cow Products"},"email":{"type":"array","items":{"type":"string","example":"ordering@happycowproducts.com"}},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/contact/325220129010007/"}}},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"229100415400002"},"name":{"type":"string","example":"Antwerpen"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/229100415400002/"}}},"ordered_on":{"type":"string","example":"2020-07-29T10:52:12Z"},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"order_remarks":{"type":"string","example":"This is a remark"},"packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"374181120170007"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"621725870650009"},"name":{"type":"string","example":"Milk 0% Fat Big Crate (12 x 1 l)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/stock_items/621725870650009/"}}},"supplier_package":{"type":"object","properties":{"id":{"type":"string","example":"443306"},"supplier_article_number":{"type":"string","example":"7771234"},"supplier_product_name":{"type":"string","nullable":true,"example":"Milk 0% Fat Big Crate"},"theoretical_price_per_package":{"type":"string","example":"9.00"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/supplier_packages/443306/"}}},"accounting_category":{},"quantity_ordered":{"type":"integer","example":20,"default":0},"total_theoretical_price":{"type":"string","example":"180.00"}}}},"expected_delivery_date":{"type":"string","example":"2020-08-03T09:00:00"},"viewed_by_supplier":{"type":"boolean","example":false,"default":true},"viewed_by_supplier_at":{},"fetched_by_supplier":{"type":"boolean","example":false,"default":true},"fetched_by_supplier_at":{},"invoice_number":{},"invoice_status":{"type":"string","example":"0"},"delivery_remarks":{},"discount":{},"discount_remarks":{},"returnables_in":{},"returnables_out":{},"returnables_remarks":{},"manual_price_after_discount_returnables":{},"theoretical_price":{"type":"string","example":"260.00"},"delivery_closed":{"type":"boolean","example":false,"default":true},"invoice_documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"479000823140006"},"file_url":{"type":"string","example":"https://staging-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/istockphoto-518473490-612x612.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T131025Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=62d3cf8cc4805a10be27dfe577db65da83d7e175e3eee6804e9a15f79fd01b6f"}}}}}}}}}},"deprecated":false},"patch":{"summary":"Mark Purchase Order as Fetched or Viewed","description":"Marks a purchase order as fetched and/or viewed by the supplier.","operationId":"mark-purchase-order-as-fetched-or-viewed","parameters":[{"name":"purchase_order_id","in":"path","description":"A purchase order's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fetched_by_supplier":{"type":"boolean","description":"Marks the purchase order as fetched by the supplier."},"viewed_by_supplier":{"type":"boolean","description":"Marks the purchase order as viewed by the supplier."}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"773820254140000"},"order_number":{"type":"string","example":"#20200729-1451-1"},"status":{"type":"string","example":"ORDERED"},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"325220129010007"},"name":{"type":"string","example":"Happy Cow Products"},"email":{"type":"array","items":{"type":"string","example":"ordering@happycowproducts.com"}},"integrated":{"type":"boolean","example":false},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/suppliers/325220129010007/"}}},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"229100415400002"},"name":{"type":"string","example":"Antwerpen"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/229100415400002/"}}},"ordered_on":{"type":"string","example":"2020-07-29T10:52:12Z"},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"order_remarks":{"type":"string","nullable":true,"example":"This is a remark"},"packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"374181120170007"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"621725870650009"},"name":{"type":"string","example":"Milk 0% Fat Big Crate (12 x 1 l)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/621725870650009/"}}},"supplier_package":{"type":"object","properties":{"id":{"type":"string","example":"443306"},"supplier_article_number":{"type":"string","example":"7771234"},"supplier_product_name":{"type":"string","nullable":true,"example":"Milk 0% Fat Big Crate"},"theoretical_price_per_package":{"type":"string","example":"9.00"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/supplier_packages/443306/"}}},"packaging_option":{"type":"string","nullable":true,"example":null},"accounting_category":{"type":"string","nullable":true,"example":null},"quantity_ordered":{"type":"number","example":20},"total_theoretical_price":{"type":"string","example":"180.00"}}}},"expected_delivery_date":{"type":"string","example":"2020-08-03T09:00:00"},"viewed_by_supplier":{"type":"boolean","example":true},"viewed_by_supplier_at":{"type":"string","nullable":true,"example":"2020-07-30T08:00:00Z"},"fetched_by_supplier":{"type":"boolean","example":true},"fetched_by_supplier_at":{"type":"string","nullable":true,"example":"2020-07-30T08:00:00Z"},"invoice_number":{"type":"string","nullable":true,"example":null},"invoice_status":{"type":"string","example":"0"},"delivery_remarks":{"type":"string","nullable":true,"example":null},"discount":{"type":"string","nullable":true,"example":null},"discount_remarks":{"type":"string","nullable":true,"example":null},"returnables_in":{"type":"string","nullable":true,"example":null},"returnables_out":{"type":"string","nullable":true,"example":null},"returnables_remarks":{"type":"string","nullable":true,"example":null},"manual_price_after_discount_returnables":{"type":"string","nullable":true,"example":null},"supplier_customer_number":{"type":"string","nullable":true,"example":null},"theoretical_price":{"type":"string","example":"260.00"},"delivery_closed":{"type":"boolean","example":false},"invoice_documents":{"type":"array","items":{},"example":[]}}}}}},"400":{"description":"400"},"403":{"description":"403"},"404":{"description":"404"}},"deprecated":false},"delete":{"summary":"Delete Purchase Order","description":"Deletes a purchase order.","operationId":"delete-purchase-order","parameters":[{"name":"purchase_order_id","in":"path","description":"A purchase order's ID.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"204"},"403":{"description":"403"},"404":{"description":"404"}},"deprecated":false}},"/procurement/purchase_orders/{purchase_order_id}/packages/":{"post":{"summary":"Add Packages to Purchase Order","description":"Adds one or more supplier packages to an existing purchase order. An order in `AWAITING_APPROVAL` or `REJECTED` status is first taken back to `IN_PROGRESS` and made the caller's.","operationId":"add-packages-to-purchase-order","parameters":[{"name":"purchase_order_id","in":"path","description":"A purchase order's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","minItems":1,"description":"List of supplier packages to add. Duplicate supplier package IDs are not allowed.","items":{"type":"object","required":["supplier_package"],"properties":{"supplier_package":{"type":"string","description":"The ID of the supplier package.","example":"443306"},"quantity":{"type":"number","nullable":true,"description":"The quantity to order. Mutually exclusive with `to_par`. One of `quantity` or `to_par` must be provided.","example":5},"to_par":{"type":"boolean","default":false,"description":"If true, the quantity is automatically calculated to reach the par level. Mutually exclusive with `quantity`. One of `quantity` or `to_par` must be provided.","example":false}}}},"examples":{"With explicit quantities":{"value":[{"supplier_package":"443306","quantity":5},{"supplier_package":"443307","quantity":10}]},"Using to_par":{"value":[{"supplier_package":"443306","to_par":true}]}}}}},"responses":{"201":{"description":"The packages were added to the purchase order.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"773820515180004"},"order_number":{"type":"string","nullable":true,"example":"#20200729-1451-1"},"status":{"type":"string","example":"IN_PROGRESS"},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"325220129010007"},"name":{"type":"string","example":"Happy Cow Products"},"email":{"type":"array","items":{"type":"string","example":"ordering@happycowproducts.com"}},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/contact/325220129010007/"}}},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"829100725420008"},"name":{"type":"string","example":"Brussel"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"}}},"ordered_on":{"type":"string","nullable":true,"example":null},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"order_remarks":{"type":"string","nullable":true,"example":null},"packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"374181120170007"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"621725870650009"},"name":{"type":"string","example":"Milk 0% Fat Big Crate (12 x 1 l)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/stock_items/621725870650009/"}}},"supplier_package":{"type":"object","properties":{"id":{"type":"string","example":"443306"},"supplier_article_number":{"type":"string","example":"7771234"},"supplier_product_name":{"type":"string","nullable":true,"example":"Milk 0% Fat Big Crate"},"theoretical_price_per_package":{"type":"string","example":"9.00"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/supplier_packages/443306/"}}},"accounting_category":{"type":"string","nullable":true,"example":null},"quantity_ordered":{"type":"number","example":5},"total_theoretical_price":{"type":"string","example":"45.00"}}}},"expected_delivery_date":{"type":"string","nullable":true,"example":null},"viewed_by_supplier":{"type":"boolean","example":false},"viewed_by_supplier_at":{"type":"string","nullable":true,"example":null},"fetched_by_supplier":{"type":"boolean","example":false},"fetched_by_supplier_at":{"type":"string","nullable":true,"example":null},"invoice_number":{"type":"string","nullable":true,"example":null},"invoice_status":{"type":"string","example":"0"},"delivery_remarks":{"type":"string","nullable":true,"example":null},"discount":{"type":"string","nullable":true,"example":null},"discount_remarks":{"type":"string","nullable":true,"example":null},"returnables_in":{"type":"string","nullable":true,"example":null},"returnables_out":{"type":"string","nullable":true,"example":null},"returnables_remarks":{"type":"string","nullable":true,"example":null},"manual_price_after_discount_returnables":{"type":"string","nullable":true,"example":null},"theoretical_price":{"type":"string","example":"45.00"},"supplier_customer_number":{"type":"string","nullable":true,"example":null},"delivery_closed":{"type":"boolean","example":false},"invoice_documents":{"type":"array","items":{}}}}}}},"400":{"description":"The body is not valid, a supplier package does not exist, belongs to another supplier or can no longer be ordered, a packaging option is invalid, or the order is already `ORDERED` or `DELIVERED`. Nothing is changed, and an order that would have been taken back for editing keeps its status."},"403":{"description":"The token lacks the `procurement` scope, the library does not have the Ordering module, or the user lacks the Create Orders permission."},"404":{"description":"The purchase order does not exist or is not accessible to the caller."}},"deprecated":false}},"/procurement/purchase_orders/{purchase_order_id}/send/":{"post":{"summary":"Send Purchase Order","description":"Sends a purchase order to the supplier. When the order needs approval, it is parked instead of sent and the call still returns 200, with `status` `AWAITING_APPROVAL`.","operationId":"send-purchase-order","parameters":[{"name":"purchase_order_id","in":"path","description":"A purchase order's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["expected_delivery_date"],"properties":{"expected_delivery_date":{"type":"string","description":"The expected delivery date and time. Must not be in the past and must comply with the supplier's ordering schedule if one is configured. Accepted formats: `YYYY-MM-DDTHH:MM:SS` and `YYYY-MM-DDTHH:MM`.","example":"2024-08-15T09:00:00"},"remarks":{"type":"string","nullable":true,"description":"Optional order remarks visible to the supplier.","example":"Please deliver to the back entrance."},"customer_number":{"type":"string","nullable":true,"description":"Optional supplier customer number to include on the order.","example":"CUST-00472"},"supplier_email_input":{"type":"string","format":"email","nullable":true,"description":"Required when the supplier has no configured email address and supports email orders. Ignored when the supplier already has one or more configured email addresses.","example":"orders@supplier.com"}}}}}},"responses":{"200":{"description":"The order was sent (`status` `ORDERED`) or parked for approval (`status` `AWAITING_APPROVAL`).","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"773820254140000"},"order_number":{"type":"string","nullable":true,"description":"`null` while the order is parked for approval.","example":"#20240815-0900-1"},"status":{"type":"string","enum":["ORDERED","AWAITING_APPROVAL"],"description":"`ORDERED` when the order was sent to the supplier; `AWAITING_APPROVAL` when it was parked for approval and nothing was sent.","example":"ORDERED"},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"325220129010007"},"name":{"type":"string","example":"Happy Cow Products"},"email":{"type":"array","items":{"type":"string","example":"ordering@happycowproducts.com"}},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/contact/325220129010007/"}}},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"829100725420008"},"name":{"type":"string","example":"Brussel"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"}}},"ordered_on":{"type":"string","nullable":true,"description":"`null` while the order is parked for approval.","example":"2024-08-14T11:23:00Z"},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"order_remarks":{"type":"string","nullable":true,"example":"Please deliver to the back entrance."},"packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"374181120170007"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"621725870650009"},"name":{"type":"string","example":"Milk 0% Fat Big Crate (12 x 1 l)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/stock_items/621725870650009/"}}},"supplier_package":{"type":"object","properties":{"id":{"type":"string","example":"443306"},"supplier_article_number":{"type":"string","example":"7771234"},"supplier_product_name":{"type":"string","nullable":true,"example":"Milk 0% Fat Big Crate"},"theoretical_price_per_package":{"type":"string","example":"9.00"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/supplier_packages/443306/"}}},"accounting_category":{"type":"string","nullable":true,"example":null},"quantity_ordered":{"type":"number","example":20},"total_theoretical_price":{"type":"string","example":"180.00"}}}},"expected_delivery_date":{"type":"string","example":"2024-08-15T09:00:00"},"viewed_by_supplier":{"type":"boolean","example":false},"viewed_by_supplier_at":{"type":"string","nullable":true,"example":null},"fetched_by_supplier":{"type":"boolean","example":false},"fetched_by_supplier_at":{"type":"string","nullable":true,"example":null},"invoice_number":{"type":"string","nullable":true,"example":null},"invoice_status":{"type":"string","example":"0"},"delivery_remarks":{"type":"string","nullable":true,"example":null},"discount":{"type":"string","nullable":true,"example":null},"discount_remarks":{"type":"string","nullable":true,"example":null},"returnables_in":{"type":"string","nullable":true,"example":null},"returnables_out":{"type":"string","nullable":true,"example":null},"returnables_remarks":{"type":"string","nullable":true,"example":null},"manual_price_after_discount_returnables":{"type":"string","nullable":true,"example":null},"theoretical_price":{"type":"string","example":"180.00"},"supplier_customer_number":{"type":"string","nullable":true,"example":"CUST-00472"},"delivery_closed":{"type":"boolean","example":false},"invoice_documents":{"type":"array","items":{}}}}}}},"400":{"description":"The order is not `IN_PROGRESS` or not owned by the caller, the delivery date is not valid, `supplier_email_input` is missing when it is required, no item can be delivered by the delivery date, an item can no longer be ordered, the supplier's integration refused the order, or the email could not be sent. Nothing is sent or parked.","content":{"application/json":{"schema":{"type":"object","description":"Error messages keyed by field.","properties":{"purchase_order":{"type":"array","items":{"type":"string"},"description":"Why the order cannot be sent."},"expected_delivery_date":{"type":"array","items":{"type":"string"},"description":"Why the delivery date was refused."},"supplier_email_input":{"type":"array","items":{"type":"string"},"description":"The supplier email is missing or invalid."},"rejected_order_remarks":{"type":"object","nullable":true,"description":"Only when the supplier's integration refused the order: its reasons, for the order (`order.reason`) and per item (`items`)."}}},"examples":{"Not owned by the caller":{"value":{"purchase_order":["You must claim the order first."]}}}}}},"403":{"description":"The token lacks the `procurement` scope, the library does not have the Ordering module, or the user lacks the Send Orders permission."},"404":{"description":"The purchase order does not exist or is not accessible to the caller."}},"deprecated":false}},"/procurement/order_approvals/":{"get":{"summary":"Get Order Approvals","description":"Order approvals of every status are returned, oldest first, unless filtered or sorted. An outlet-level user only gets the approvals for their active outlet.","operationId":"get-order-approvals","parameters":[{"name":"page","in":"query","required":false,"description":"Page number.","schema":{"type":"integer"}},{"name":"page_size","in":"query","required":false,"description":"Results per page. Default 10, maximum 200.","schema":{"type":"integer"}},{"name":"status","in":"query","required":false,"description":"Only return approvals in this state.","schema":{"type":"string","enum":["pending","approved","rejected","cancelled"]}},{"name":"outlet","in":"query","required":false,"description":"Only return approvals for orders of this outlet ID.","schema":{"type":"string"}},{"name":"supplier","in":"query","required":false,"description":"Only return approvals for orders to this supplier ID.","schema":{"type":"string"}},{"name":"submitted_by","in":"query","required":false,"description":"Only return approvals sent for approval by this user ID.","schema":{"type":"string"}},{"name":"submitted_at","in":"query","required":false,"description":"Only return approvals sent for approval on this date (`YYYY-MM-DD`).","schema":{"type":"string","format":"date"}},{"name":"submitted_at__gt","in":"query","required":false,"description":"Only return approvals sent for approval after this date (`YYYY-MM-DD`).","schema":{"type":"string","format":"date"}},{"name":"submitted_at__lt","in":"query","required":false,"description":"Only return approvals sent for approval before this date (`YYYY-MM-DD`).","schema":{"type":"string","format":"date"}},{"name":"ordering","in":"query","required":false,"description":"Sort keys, comma-separated: `status`, `outlet` (by outlet name), `submitted_at`, `order_amount_at_submit`, `expected_delivery_date`. Prefix a key with `-` for descending order. Unknown keys are ignored.","schema":{"type":"string","example":"-submitted_at"}}],"responses":{"200":{"description":"The order approvals on this page.","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of results.","example":1},"next":{"type":"string","description":"URL of the next page.","nullable":true,"example":null},"previous":{"type":"string","description":"URL of the previous page.","nullable":true,"example":null},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the order approval.","example":"512400817330004"},"status":{"type":"string","description":"The state of the order approval: `pending` (waiting for a decision), `approved`, `rejected`, or `cancelled`. `cancelled` means the order was taken back for editing before a decision; the order itself was not cancelled.","enum":["pending","approved","rejected","cancelled"],"example":"pending"},"submitted_at":{"type":"string","description":"When the order was sent for approval, in UTC.","format":"date-time","example":"2026-10-12T08:41:17Z"},"order_amount_at_submit":{"type":"string","description":"The order's amount when it was sent for approval, as a decimal string with two decimals. It does not change afterwards.","example":"1250.00"},"expected_delivery_date":{"type":"string","description":"The order's expected delivery date and time, as a local date and time without a timezone (`YYYY-MM-DDTHH:MM:SS`), as on the purchase order.","nullable":true,"example":"2026-10-14T09:00:00"},"purchase_order":{"type":"object","description":"The purchase order the request is about.","properties":{"id":{"type":"string","description":"The ID of the purchase order.","example":"773820254140000"},"url":{"type":"string","description":"The API URL of the purchase order.","example":"https://app.apicbase.com/api/v2/procurement/purchase_orders/773820254140000/"},"outlet":{"type":"object","description":"The outlet the order was placed for.","properties":{"id":{"type":"string","description":"The ID of the outlet.","example":"829100725420008"},"name":{"type":"string","description":"The outlet's name.","example":"Brussel"},"url":{"type":"string","description":"The API URL of the outlet.","example":"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"}}},"supplier":{"type":"object","description":"The supplier the order is for.","properties":{"id":{"type":"string","description":"The ID of the supplier.","example":"325220129010007"},"name":{"type":"string","description":"The supplier's name.","example":"Happy Cow Products"},"email":{"type":"array","description":"The supplier's order email addresses.","items":{"type":"string","example":"ordering@happycowproducts.com"}},"url":{"type":"string","description":"The API URL of the supplier.","example":"https://app.apicbase.com/api/v2/suppliers/325220129010007/"},"integrated":{"type":"boolean","description":"Whether the supplier is linked to a supplier account on Apicbase. It does not say how the order reaches the supplier.","example":false}}}}},"submitted_by":{"type":"object","nullable":true,"description":"The user who sent the order for approval. Null when that user no longer exists.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"236300957450001"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}}}}}}},"examples":{"Result":{"value":{"count":1,"next":null,"previous":null,"results":[{"id":"512400817330004","status":"pending","submitted_at":"2026-10-12T08:41:17Z","order_amount_at_submit":"1250.00","expected_delivery_date":"2026-10-14T09:00:00","purchase_order":{"id":"773820254140000","url":"https://app.apicbase.com/api/v2/procurement/purchase_orders/773820254140000/","outlet":{"id":"829100725420008","name":"Brussel","url":"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"},"supplier":{"id":"325220129010007","name":"Happy Cow Products","email":["ordering@happycowproducts.com"],"url":"https://app.apicbase.com/api/v2/suppliers/325220129010007/","integrated":false}},"submitted_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}]}}}}}},"400":{"description":"A filter value is not valid: a `status` that is not one of the values above (they are case-sensitive), a malformed date, or an `outlet`, `supplier` or `submitted_by` that is not a number. An ID that matches nothing is not an error; it returns no results.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A fixed message.","example":"Invalid filters"},"details":{"type":"object","description":"Error messages keyed by the filter that was refused.","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"examples":{"Result":{"value":{"message":"Invalid filters","details":{"status":["Select a valid choice. open is not one of the available choices."]}}}}}}},"403":{"description":"The library does not have the Ordering or the Order Approval module, the token lacks the `procurement` scope, or the user lacks the Approve Orders permission."},"404":{"description":"The `page` does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Invalid page."}}},"examples":{"Result":{"value":{"message":"Invalid page."}}}}}}},"deprecated":false}},"/procurement/order_approvals/{order_approval_id}/":{"get":{"summary":"Get Order Approval","description":"Includes the purchase order the request is about, why the order needed approval and, while the request is `pending`, the day's spend with the supplier for that outlet.","operationId":"get-order-approval","parameters":[{"name":"order_approval_id","in":"path","required":true,"description":"The ID of the order approval.","schema":{"type":"string"}}],"responses":{"200":{"description":"The order approval.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the order approval.","example":"512400817330004"},"status":{"type":"string","description":"The state of the order approval: `pending` (waiting for a decision), `approved`, `rejected`, or `cancelled`. `cancelled` means the order was taken back for editing before a decision; the order itself was not cancelled.","enum":["pending","approved","rejected","cancelled"],"example":"pending"},"decision_remarks":{"type":"string","description":"The approver's note to the requester. Empty until the request is decided, and never sent to the supplier.","example":""},"submitted_at":{"type":"string","description":"When the order was sent for approval, in UTC.","format":"date-time","example":"2026-10-12T08:41:17Z"},"order_amount_at_submit":{"type":"string","description":"The order's amount when it was sent for approval, as a decimal string with two decimals. It does not change afterwards.","example":"1250.00"},"submitted_by":{"type":"object","nullable":true,"description":"The user who sent the order for approval. Null when that user no longer exists.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"236300957450001"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"purchase_order":{"type":"object","description":"The purchase order as it is now, not as it was when it was sent for approval. The same block as on a list row, plus the fields below.","properties":{"id":{"type":"string","description":"The ID of the purchase order.","example":"773820254140000"},"url":{"type":"string","description":"The API URL of the purchase order.","example":"https://app.apicbase.com/api/v2/procurement/purchase_orders/773820254140000/"},"outlet":{"type":"object","description":"The outlet the order was placed for.","properties":{"id":{"type":"string","description":"The ID of the outlet.","example":"829100725420008"},"name":{"type":"string","description":"The outlet's name.","example":"Brussel"},"url":{"type":"string","description":"The API URL of the outlet.","example":"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"}}},"supplier":{"type":"object","description":"The supplier the order is for.","properties":{"id":{"type":"string","description":"The ID of the supplier.","example":"325220129010007"},"name":{"type":"string","description":"The supplier's name.","example":"Happy Cow Products"},"email":{"type":"array","description":"The supplier's order email addresses.","items":{"type":"string","example":"ordering@happycowproducts.com"}},"url":{"type":"string","description":"The API URL of the supplier.","example":"https://app.apicbase.com/api/v2/suppliers/325220129010007/"},"integrated":{"type":"boolean","description":"Whether the supplier is linked to a supplier account on Apicbase. It does not say how the order reaches the supplier.","example":false}}},"order_remarks":{"type":"string","description":"The order's remarks for the supplier, given when the order was sent.","nullable":true,"example":"Please deliver to the back entrance."},"expected_delivery_date":{"type":"string","description":"The order's expected delivery date and time, as a local date and time without a timezone (`YYYY-MM-DDTHH:MM:SS`), as on the purchase order.","nullable":true,"example":"2026-10-14T09:00:00"},"packages":{"type":"array","description":"The order's lines.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the order line.","example":"374181120170007"},"name":{"type":"string","description":"The stock item's name.","example":"Milk 0% Fat Big Crate (12 x 1 l)"},"packaging_option_label":{"type":"string","description":"The packaging the line is ordered in.","example":"Crate (12 x 1 l)","nullable":true},"quantity_ordered":{"type":"number","description":"The quantity ordered.","example":20},"total_theoretical_price":{"type":"string","description":"The line's amount, as a decimal string with two decimals.","example":"180.00"}}}}}},"purchase_order_status":{"type":"string","description":"The purchase order's current status, in the purchase order's own (upper-case) values.","enum":["IN_PROGRESS","AWAITING_APPROVAL","ORDERED","REJECTED","DELIVERED"],"example":"AWAITING_APPROVAL"},"threshold_context":{"type":"object","description":"Why the order needed approval, recorded when it was sent for approval. It does not change afterwards.","properties":{"applies":{"type":"boolean","description":"Whether a daily threshold was in force for the order's outlet and supplier.","example":true},"day":{"type":"string","description":"The calendar day the threshold was counted over, in the library's timezone.","format":"date","example":"2026-10-12"},"daily_total_at_submit":{"type":"string","description":"The amount already sent to this supplier for this outlet that day, before this order, as a decimal string with two decimals.","nullable":true,"example":"400.00"},"threshold_at_submit":{"type":"string","description":"The daily threshold in force, as a decimal string with two decimals.","nullable":true,"example":"1500.00"},"threshold_level_at_submit":{"type":"string","description":"Where the threshold was configured: on the library, on the supplier, or for this outlet in the supplier's ordering details (`outlet`).","nullable":true,"enum":["library","supplier","outlet"],"example":"supplier"}}},"approver_context":{"type":"object","nullable":true,"description":"Today's orders already sent to this supplier for this outlet, computed at the time of the call, in the library's timezone. Null once the request is no longer `pending`.","properties":{"sent_orders_today_total":{"type":"string","description":"Their total amount, as a decimal string with two decimals.","example":"400.00"},"sent_orders_today_count":{"type":"integer","description":"How many there are.","example":2}}}}},"examples":{"Result":{"value":{"id":"512400817330004","status":"pending","decision_remarks":"","submitted_at":"2026-10-12T08:41:17Z","order_amount_at_submit":"1250.00","submitted_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"},"purchase_order":{"id":"773820254140000","url":"https://app.apicbase.com/api/v2/procurement/purchase_orders/773820254140000/","outlet":{"id":"829100725420008","name":"Brussel","url":"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"},"supplier":{"id":"325220129010007","name":"Happy Cow Products","email":["ordering@happycowproducts.com"],"url":"https://app.apicbase.com/api/v2/suppliers/325220129010007/","integrated":false},"order_remarks":"Please deliver to the back entrance.","expected_delivery_date":"2026-10-14T09:00:00","packages":[{"id":"374181120170007","name":"Milk 0% Fat Big Crate (12 x 1 l)","packaging_option_label":"Crate (12 x 1 l)","quantity_ordered":20,"total_theoretical_price":"180.00"},{"id":"374181120170008","name":"Butter Unsalted (250 g)","packaging_option_label":"Box (40 x 250 g)","quantity_ordered":25,"total_theoretical_price":"1070.00"}]},"purchase_order_status":"AWAITING_APPROVAL","threshold_context":{"applies":true,"day":"2026-10-12","daily_total_at_submit":"400.00","threshold_at_submit":"1500.00","threshold_level_at_submit":"supplier"},"approver_context":{"sent_orders_today_total":"400.00","sent_orders_today_count":2}}}}}}},"403":{"description":"The library does not have the Ordering or the Order Approval module, the token lacks the `procurement` scope, or the user lacks the Approve Orders permission."},"404":{"description":"The order approval does not exist, or is outside what the caller may act on (an outlet-level user only reaches approvals for their active outlet).","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Why the request failed.","example":"Approval request not found."}}},"examples":{"Result":{"value":{"message":"Approval request not found."}}}}}}},"deprecated":false}},"/procurement/order_approvals/{order_approval_id}/approve/":{"post":{"summary":"Approve Order Approval","description":"The order is sent by email or integration in the same transaction as the approval. If sending fails, nothing changes and the approval stays `pending`.","operationId":"approve-order-approval","parameters":[{"name":"order_approval_id","in":"path","required":true,"description":"The ID of the order approval.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"decision_remarks":{"type":"string","description":"Optional note to the requester. Blank or `null` is stored as empty. It is not sent to the supplier.","nullable":true,"example":"Approved, the event needs the extra stock."},"expected_delivery_date":{"type":"string","description":"Optional new delivery date and time for the order. Accepted formats: `YYYY-MM-DDTHH:MM:SS` and `YYYY-MM-DDTHH:MM`, without a timezone. Left out, the order keeps its date and time; a value replaces both. `null` or a date without a time is refused.","example":"2026-10-15T09:00:00"}}},"examples":{"Approve as it is":{"value":{}},"Approve with a note and a new delivery date":{"value":{"decision_remarks":"Approved, the event needs the extra stock.","expected_delivery_date":"2026-10-15T09:00:00"}}}}}},"responses":{"200":{"description":"The order was approved and sent to the supplier.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the order approval.","example":"512400817330004"},"status":{"type":"string","description":"The state of the order approval: `pending` (waiting for a decision), `approved`, `rejected`, or `cancelled`. `cancelled` means the order was taken back for editing before a decision; the order itself was not cancelled.","enum":["pending","approved","rejected","cancelled"],"example":"pending"},"decision_remarks":{"type":"string","description":"The approver's note to the requester. Empty until the request is decided, and never sent to the supplier.","example":""},"submitted_at":{"type":"string","description":"When the order was sent for approval, in UTC.","format":"date-time","example":"2026-10-12T08:41:17Z"},"order_amount_at_submit":{"type":"string","description":"The order's amount when it was sent for approval, as a decimal string with two decimals. It does not change afterwards.","example":"1250.00"},"submitted_by":{"type":"object","nullable":true,"description":"The user who sent the order for approval. Null when that user no longer exists.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"236300957450001"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"purchase_order":{"type":"object","description":"The purchase order as it is now, not as it was when it was sent for approval. The same block as on a list row, plus the fields below.","properties":{"id":{"type":"string","description":"The ID of the purchase order.","example":"773820254140000"},"url":{"type":"string","description":"The API URL of the purchase order.","example":"https://app.apicbase.com/api/v2/procurement/purchase_orders/773820254140000/"},"outlet":{"type":"object","description":"The outlet the order was placed for.","properties":{"id":{"type":"string","description":"The ID of the outlet.","example":"829100725420008"},"name":{"type":"string","description":"The outlet's name.","example":"Brussel"},"url":{"type":"string","description":"The API URL of the outlet.","example":"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"}}},"supplier":{"type":"object","description":"The supplier the order is for.","properties":{"id":{"type":"string","description":"The ID of the supplier.","example":"325220129010007"},"name":{"type":"string","description":"The supplier's name.","example":"Happy Cow Products"},"email":{"type":"array","description":"The supplier's order email addresses.","items":{"type":"string","example":"ordering@happycowproducts.com"}},"url":{"type":"string","description":"The API URL of the supplier.","example":"https://app.apicbase.com/api/v2/suppliers/325220129010007/"},"integrated":{"type":"boolean","description":"Whether the supplier is linked to a supplier account on Apicbase. It does not say how the order reaches the supplier.","example":false}}},"order_remarks":{"type":"string","description":"The order's remarks for the supplier, given when the order was sent.","nullable":true,"example":"Please deliver to the back entrance."},"expected_delivery_date":{"type":"string","description":"The order's expected delivery date and time, as a local date and time without a timezone (`YYYY-MM-DDTHH:MM:SS`), as on the purchase order.","nullable":true,"example":"2026-10-14T09:00:00"},"packages":{"type":"array","description":"The order's lines.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the order line.","example":"374181120170007"},"name":{"type":"string","description":"The stock item's name.","example":"Milk 0% Fat Big Crate (12 x 1 l)"},"packaging_option_label":{"type":"string","description":"The packaging the line is ordered in.","example":"Crate (12 x 1 l)","nullable":true},"quantity_ordered":{"type":"number","description":"The quantity ordered.","example":20},"total_theoretical_price":{"type":"string","description":"The line's amount, as a decimal string with two decimals.","example":"180.00"}}}}}},"purchase_order_status":{"type":"string","description":"The purchase order's current status, in the purchase order's own (upper-case) values.","enum":["IN_PROGRESS","AWAITING_APPROVAL","ORDERED","REJECTED","DELIVERED"],"example":"AWAITING_APPROVAL"},"threshold_context":{"type":"object","description":"Why the order needed approval, recorded when it was sent for approval. It does not change afterwards.","properties":{"applies":{"type":"boolean","description":"Whether a daily threshold was in force for the order's outlet and supplier.","example":true},"day":{"type":"string","description":"The calendar day the threshold was counted over, in the library's timezone.","format":"date","example":"2026-10-12"},"daily_total_at_submit":{"type":"string","description":"The amount already sent to this supplier for this outlet that day, before this order, as a decimal string with two decimals.","nullable":true,"example":"400.00"},"threshold_at_submit":{"type":"string","description":"The daily threshold in force, as a decimal string with two decimals.","nullable":true,"example":"1500.00"},"threshold_level_at_submit":{"type":"string","description":"Where the threshold was configured: on the library, on the supplier, or for this outlet in the supplier's ordering details (`outlet`).","nullable":true,"enum":["library","supplier","outlet"],"example":"supplier"}}},"approver_context":{"type":"object","nullable":true,"description":"Today's orders already sent to this supplier for this outlet, computed at the time of the call, in the library's timezone. Null once the request is no longer `pending`.","properties":{"sent_orders_today_total":{"type":"string","description":"Their total amount, as a decimal string with two decimals.","example":"400.00"},"sent_orders_today_count":{"type":"integer","description":"How many there are.","example":2}}}}},"examples":{"Result":{"value":{"id":"512400817330004","status":"approved","decision_remarks":"Approved, the event needs the extra stock.","submitted_at":"2026-10-12T08:41:17Z","order_amount_at_submit":"1250.00","submitted_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"},"purchase_order":{"id":"773820254140000","url":"https://app.apicbase.com/api/v2/procurement/purchase_orders/773820254140000/","outlet":{"id":"829100725420008","name":"Brussel","url":"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"},"supplier":{"id":"325220129010007","name":"Happy Cow Products","email":["ordering@happycowproducts.com"],"url":"https://app.apicbase.com/api/v2/suppliers/325220129010007/","integrated":false},"order_remarks":"Please deliver to the back entrance.","expected_delivery_date":"2026-10-14T09:00:00","packages":[{"id":"374181120170007","name":"Milk 0% Fat Big Crate (12 x 1 l)","packaging_option_label":"Crate (12 x 1 l)","quantity_ordered":20,"total_theoretical_price":"180.00"},{"id":"374181120170008","name":"Butter Unsalted (250 g)","packaging_option_label":"Box (40 x 250 g)","quantity_ordered":25,"total_theoretical_price":"1070.00"}]},"purchase_order_status":"ORDERED","threshold_context":{"applies":true,"day":"2026-10-12","daily_total_at_submit":"400.00","threshold_at_submit":"1500.00","threshold_level_at_submit":"supplier"},"approver_context":null}}}}}},"400":{"description":"The input is not valid, the delivery date cannot be used, or the order could not be sent. The order is not sent and the approval stays `pending`.","content":{"application/json":{"schema":{"type":"object","description":"Error messages keyed by field.","properties":{"expected_delivery_date":{"type":"array","items":{"type":"string"},"description":"The date is malformed or `null`, in the past, outside the supplier's ordering schedule, or too early for an item's lead time."},"earliest_delivery_date":{"type":"string","description":"Only with a lead-time refusal: the earliest date that covers every item's lead time (`YYYY-MM-DD`).","format":"date","example":"2026-10-16"},"decision_remarks":{"type":"array","items":{"type":"string"},"description":"The note is a list or an object instead of text."},"purchase_order":{"type":"array","items":{"type":"string"},"description":"The order could not be sent, for example because an item is no longer orderable, a packaging option is missing or invalid, or the email or integration failed."},"supplier_email_input":{"type":"array","items":{"type":"string"},"description":"The supplier's email address is invalid."},"rejected_order_remarks":{"type":"object","nullable":true,"description":"Only when the supplier's integration refused the order: its reasons, for the order (`order.reason`) and per item (`items`)."}}},"examples":{"Result":{"value":{"expected_delivery_date":["One or more items cannot be delivered by the selected date because of their lead time."],"earliest_delivery_date":"2026-10-16"}}}}}},"403":{"description":"The library does not have the Ordering or the Order Approval module, the token lacks the `procurement` scope, or the user lacks the Approve Orders permission."},"404":{"description":"The order approval does not exist, or is outside what the caller may act on (an outlet-level user only reaches approvals for their active outlet).","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Why the request failed.","example":"Approval request not found."}}},"examples":{"Result":{"value":{"message":"Approval request not found."}}}}}},"409":{"description":"The request is no longer `pending`, or its order is no longer awaiting approval. A repeated call gets this response instead of acting twice.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Why the request failed.","example":"Someone already handled this request."}}},"examples":{"Result":{"value":{"detail":"Someone already handled this request."}}}}}},"423":{"description":"Another decision on the same order approval is in progress. Retry once it has finished.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Why the request failed.","example":"This order is currently being processed. Please wait and try again."}}},"examples":{"Result":{"value":{"detail":"This order is currently being processed. Please wait and try again."}}}}}}},"deprecated":false}},"/procurement/order_approvals/{order_approval_id}/reject/":{"post":{"summary":"Reject Order Approval","description":"Moves the purchase order to `REJECTED`. Nothing is sent to the supplier, and the requester is notified by email.","operationId":"reject-order-approval","parameters":[{"name":"order_approval_id","in":"path","required":true,"description":"The ID of the order approval.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["decision_remarks"],"properties":{"decision_remarks":{"type":"string","description":"The reason for the rejection, shown to the requester. Must not be blank; surrounding whitespace is trimmed. It is not sent to the supplier.","example":"Over budget this week, please split the order."}}},"examples":{"Request Example":{"value":{"decision_remarks":"Over budget this week, please split the order."}}}}}},"responses":{"200":{"description":"The order was rejected and not sent.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the order approval.","example":"512400817330004"},"status":{"type":"string","description":"The state of the order approval: `pending` (waiting for a decision), `approved`, `rejected`, or `cancelled`. `cancelled` means the order was taken back for editing before a decision; the order itself was not cancelled.","enum":["pending","approved","rejected","cancelled"],"example":"pending"},"decision_remarks":{"type":"string","description":"The approver's note to the requester. Empty until the request is decided, and never sent to the supplier.","example":""},"submitted_at":{"type":"string","description":"When the order was sent for approval, in UTC.","format":"date-time","example":"2026-10-12T08:41:17Z"},"order_amount_at_submit":{"type":"string","description":"The order's amount when it was sent for approval, as a decimal string with two decimals. It does not change afterwards.","example":"1250.00"},"submitted_by":{"type":"object","nullable":true,"description":"The user who sent the order for approval. Null when that user no longer exists.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"236300957450001"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"purchase_order":{"type":"object","description":"The purchase order as it is now, not as it was when it was sent for approval. The same block as on a list row, plus the fields below.","properties":{"id":{"type":"string","description":"The ID of the purchase order.","example":"773820254140000"},"url":{"type":"string","description":"The API URL of the purchase order.","example":"https://app.apicbase.com/api/v2/procurement/purchase_orders/773820254140000/"},"outlet":{"type":"object","description":"The outlet the order was placed for.","properties":{"id":{"type":"string","description":"The ID of the outlet.","example":"829100725420008"},"name":{"type":"string","description":"The outlet's name.","example":"Brussel"},"url":{"type":"string","description":"The API URL of the outlet.","example":"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"}}},"supplier":{"type":"object","description":"The supplier the order is for.","properties":{"id":{"type":"string","description":"The ID of the supplier.","example":"325220129010007"},"name":{"type":"string","description":"The supplier's name.","example":"Happy Cow Products"},"email":{"type":"array","description":"The supplier's order email addresses.","items":{"type":"string","example":"ordering@happycowproducts.com"}},"url":{"type":"string","description":"The API URL of the supplier.","example":"https://app.apicbase.com/api/v2/suppliers/325220129010007/"},"integrated":{"type":"boolean","description":"Whether the supplier is linked to a supplier account on Apicbase. It does not say how the order reaches the supplier.","example":false}}},"order_remarks":{"type":"string","description":"The order's remarks for the supplier, given when the order was sent.","nullable":true,"example":"Please deliver to the back entrance."},"expected_delivery_date":{"type":"string","description":"The order's expected delivery date and time, as a local date and time without a timezone (`YYYY-MM-DDTHH:MM:SS`), as on the purchase order.","nullable":true,"example":"2026-10-14T09:00:00"},"packages":{"type":"array","description":"The order's lines.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the order line.","example":"374181120170007"},"name":{"type":"string","description":"The stock item's name.","example":"Milk 0% Fat Big Crate (12 x 1 l)"},"packaging_option_label":{"type":"string","description":"The packaging the line is ordered in.","example":"Crate (12 x 1 l)","nullable":true},"quantity_ordered":{"type":"number","description":"The quantity ordered.","example":20},"total_theoretical_price":{"type":"string","description":"The line's amount, as a decimal string with two decimals.","example":"180.00"}}}}}},"purchase_order_status":{"type":"string","description":"The purchase order's current status, in the purchase order's own (upper-case) values.","enum":["IN_PROGRESS","AWAITING_APPROVAL","ORDERED","REJECTED","DELIVERED"],"example":"AWAITING_APPROVAL"},"threshold_context":{"type":"object","description":"Why the order needed approval, recorded when it was sent for approval. It does not change afterwards.","properties":{"applies":{"type":"boolean","description":"Whether a daily threshold was in force for the order's outlet and supplier.","example":true},"day":{"type":"string","description":"The calendar day the threshold was counted over, in the library's timezone.","format":"date","example":"2026-10-12"},"daily_total_at_submit":{"type":"string","description":"The amount already sent to this supplier for this outlet that day, before this order, as a decimal string with two decimals.","nullable":true,"example":"400.00"},"threshold_at_submit":{"type":"string","description":"The daily threshold in force, as a decimal string with two decimals.","nullable":true,"example":"1500.00"},"threshold_level_at_submit":{"type":"string","description":"Where the threshold was configured: on the library, on the supplier, or for this outlet in the supplier's ordering details (`outlet`).","nullable":true,"enum":["library","supplier","outlet"],"example":"supplier"}}},"approver_context":{"type":"object","nullable":true,"description":"Today's orders already sent to this supplier for this outlet, computed at the time of the call, in the library's timezone. Null once the request is no longer `pending`.","properties":{"sent_orders_today_total":{"type":"string","description":"Their total amount, as a decimal string with two decimals.","example":"400.00"},"sent_orders_today_count":{"type":"integer","description":"How many there are.","example":2}}}}},"examples":{"Result":{"value":{"id":"512400817330004","status":"rejected","decision_remarks":"Over budget this week, please split the order.","submitted_at":"2026-10-12T08:41:17Z","order_amount_at_submit":"1250.00","submitted_by":{"id":"236300957450001","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"},"purchase_order":{"id":"773820254140000","url":"https://app.apicbase.com/api/v2/procurement/purchase_orders/773820254140000/","outlet":{"id":"829100725420008","name":"Brussel","url":"https://app.apicbase.com/api/v2/accounts/outlets/829100725420008/"},"supplier":{"id":"325220129010007","name":"Happy Cow Products","email":["ordering@happycowproducts.com"],"url":"https://app.apicbase.com/api/v2/suppliers/325220129010007/","integrated":false},"order_remarks":"Please deliver to the back entrance.","expected_delivery_date":"2026-10-14T09:00:00","packages":[{"id":"374181120170007","name":"Milk 0% Fat Big Crate (12 x 1 l)","packaging_option_label":"Crate (12 x 1 l)","quantity_ordered":20,"total_theoretical_price":"180.00"},{"id":"374181120170008","name":"Butter Unsalted (250 g)","packaging_option_label":"Box (40 x 250 g)","quantity_ordered":25,"total_theoretical_price":"1070.00"}]},"purchase_order_status":"REJECTED","threshold_context":{"applies":true,"day":"2026-10-12","daily_total_at_submit":"400.00","threshold_at_submit":"1500.00","threshold_level_at_submit":"supplier"},"approver_context":null}}}}}},"400":{"description":"`decision_remarks` is missing, blank or null.","content":{"application/json":{"schema":{"type":"object","description":"Error messages keyed by field.","properties":{"decision_remarks":{"type":"array","items":{"type":"string"},"description":"Why the reason was refused."}}},"examples":{"Result":{"value":{"decision_remarks":["This field is required."]}}}}}},"403":{"description":"The library does not have the Ordering or the Order Approval module, the token lacks the `procurement` scope, or the user lacks the Approve Orders permission."},"404":{"description":"The order approval does not exist, or is outside what the caller may act on (an outlet-level user only reaches approvals for their active outlet).","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Why the request failed.","example":"Approval request not found."}}},"examples":{"Result":{"value":{"message":"Approval request not found."}}}}}},"409":{"description":"The request is no longer `pending`, or its order is no longer awaiting approval. A repeated call gets this response instead of acting twice.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Why the request failed.","example":"Someone already handled this request."}}},"examples":{"Result":{"value":{"detail":"Someone already handled this request."}}}}}},"423":{"description":"Another decision on the same order approval is in progress. Retry once it has finished.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Why the request failed.","example":"This order is currently being processed. Please wait and try again."}}},"examples":{"Result":{"value":{"detail":"This order is currently being processed. Please wait and try again."}}}}}}},"deprecated":false}},"/procurement/invoice_statuses/":{"get":{"summary":"Get Invoice Status Options","description":"Returns a list of possible values for the invoice_status field.","operationId":"get-invoice-status-options","responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"results\": [\n    {\n      \"value\": 0,\n      \"text\": \"Not yet received\"\n    },\n    {\n      \"value\": 1,\n      \"text\": \"Received\"\n    },\n    {\n      \"value\": 2,\n      \"text\": \"Payable\"\n    },\n    {\n      \"value\": 3,\n      \"text\": \"Paid\"\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"value":{"type":"integer","example":0,"default":0},"text":{"type":"string","example":"Not yet received"}}}}}}}}}},"deprecated":false}},"/procurement/purchase_orders/{purchase_order_id}/invoices/":{"get":{"summary":"Get Invoice Files","description":"Returns a list of invoice files attached to a given purchase order.","operationId":"get-invoice-files","parameters":[{"name":"purchase_order_id","in":"path","description":"A purchase order's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"[\n  {\n    \"id\": \"479000823140006\",\n    \"file_url\": \"https://staging-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/istockphoto-518473490-612x612.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T131749Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=85c9aa103e47949c6f3459f735884dea32e1997870b4d3bd9065625e22bed33e\"\n  },\n  {\n    \"id\": \"979000433160008\",\n    \"file_url\": \"https://staging-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/PyCharm_ReferenceCard.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T131749Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=eff80df65498da44a724c79813eb81bae8311568984e04119bc1d0f3b740ba9b\"\n  }\n]"}},"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"479000823140006"},"file_url":{"type":"string","example":"https://staging-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/istockphoto-518473490-612x612.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T131749Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=85c9aa103e47949c6f3459f735884dea32e1997870b4d3bd9065625e22bed33e"}}}}}}}},"deprecated":false},"post":{"summary":"Attach invoice file (no AI)","description":"Attaches an invoice file to a purchase order.","operationId":"upload-invoice-file","parameters":[{"name":"purchase_order_id","in":"path","description":"A purchase order's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"original_file":{"type":"string","description":"The invoice file.","format":"binary"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"479000653120002\",\n  \"file_url\": \"https://staging-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/INVOICE.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T132221Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=a83203ba424f75530dd2986bb2e78779ea1f03496099f3b4b062058f32ef55c2\"\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"479000653120002"},"file_url":{"type":"string","example":"https://staging-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/INVOICE.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T132221Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=a83203ba424f75530dd2986bb2e78779ea1f03496099f3b4b062058f32ef55c2"}}}}}}},"deprecated":false}},"/procurement/purchase_orders/{purchase_order_id}/invoices/{invoice_id}/":{"delete":{"summary":"Delete Invoice File","description":"Deletes an invoice file attached to a purchase order.","operationId":"delete-invoice-file","parameters":[{"name":"purchase_order_id","in":"path","description":"A purchase order's ID.","schema":{"type":"string"},"required":true},{"name":"invoice_id","in":"path","description":"An invoice file's ID.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":""}}}}}},"deprecated":false}},"/procurement/aggregated_supplier_deliveries/":{"get":{"summary":"Get Aggregated Deliveries","description":"Returns a list of aggregated deliveries in the library.","operationId":"get-aggregated-deliveries","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"purchase_order_id","in":"query","description":"Filter on a purchase order.","schema":{"type":"string"}},{"name":"purchase_order_id__in","in":"query","description":"Filter on multiple purchase orders.","schema":{"type":"array","items":{"type":"string"}}},{"name":"supplier_id","in":"query","description":"Filter on a supplier.","schema":{"type":"string"}},{"name":"outlet_id","in":"query","description":"Filter on an outlet.","schema":{"type":"string"}},{"name":"owned_by_id","in":"query","description":"Filter on a user.","schema":{"type":"string"}},{"name":"received_by_id","in":"query","description":"Filter on a user.","schema":{"type":"string"}},{"name":"delivery_closed","in":"query","description":"Filter on orders that are or are not accepting more deliveries. When true, no more deliveries are expected.","schema":{"type":"boolean"}},{"name":"invoice_number","in":"query","description":"Filter on an invoice number.","schema":{"type":"string"}},{"name":"invoice_status","in":"query","description":"Filter on an invoice status.","schema":{"type":"string","enum":["0","1","2","3"]}},{"name":"ordered_on","in":"query","description":"Filter on the order's ordered on date.","schema":{"type":"string","format":"date"}},{"name":"ordered_on__gt","in":"query","description":"Filter on the order's ordered on date (greater than).","schema":{"type":"string","format":"date"}},{"name":"ordered_on__lt","in":"query","description":"Filter on the order's ordered on date (lower than).","schema":{"type":"string","format":"date"}},{"name":"delivery_date","in":"query","description":"Filter on the first delivery date.","schema":{"type":"string","format":"date"}},{"name":"delivery_date__gt","in":"query","description":"Filter on the first delivery date (greater than).","schema":{"type":"string","format":"date"}},{"name":"delivery_date__lt","in":"query","description":"Filter on the first delivery date (lower than).","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"count\": 1,\n  \"next\": null,\n  \"previous\": null,\n  \"results\": [\n    {\n      \"id\": \"775860528690006\",\n      \"purchase_order\": \"https://app.apicbase.com/api/v2/procurement/purchase_orders/373490200500004/\",\n      \"purchase_order_id\": \"373490200500004\",\n      \"total_actual_price\": \"70.46\",\n      \"aggregated_delivered_packages\": [\n        {\n          \"id\": \"476005347250003\",\n          \"purchase_order_package\": \"974466112050001\",\n          \"quantity_delivered\": \"1.00\",\n          \"quantity_delivered_status\": \"ALL\",\n          \"remarks\": \"\",\n          \"actual_price\": \"4.94\",\n          \"intake_reason\": 1\n        },\n        {\n          \"id\": \"976005437270007\",\n          \"purchase_order_package\": \"174466402030005\",\n          \"quantity_delivered\": \"1.00\",\n          \"quantity_delivered_status\": \"ALL\",\n          \"remarks\": \"\",\n          \"actual_price\": \"15.00\",\n          \"intake_reason\": 0\n        },\n        {\n          \"id\": \"976005257270001\",\n          \"purchase_order_package\": \"174466622020007\",\n          \"quantity_delivered\": \"1.00\",\n          \"quantity_delivered_status\": \"ALL\",\n          \"remarks\": \"\",\n          \"actual_price\": \"49.40\",\n          \"intake_reason\": 1\n        },\n        {\n          \"id\": \"576005567260007\",\n          \"purchase_order_package\": \"274466463050001\",\n          \"quantity_delivered\": \"1.00\",\n          \"quantity_delivered_status\": \"PARTIALLY\",\n          \"remarks\": \"\",\n          \"actual_price\": \"1.12\",\n          \"intake_reason\": 0\n        }\n      ],\n      \"delivery_closed\": true,\n      \"created_date\": \"2022-12-01T15:00:44Z\",\n      \"modified_date\": \"2022-12-01T15:01:17Z\",\n      \"next_delivery_date\": null,\n      \"received_deliveries_summary\": [\n        {\n          \"id\": \"177760676470006\",\n          \"delivery_date\": \"2022-12-01T16:09:00\",\n          \"actual_price\": \"16.12\",\n          \"discount\": \"0.00\",\n          \"returnables_in\": \"0.00\",\n          \"returnables_out\": \"0.00\"\n        },\n        {\n          \"id\": \"377760986480007\",\n          \"delivery_date\": \"2022-12-01T17:01:00\",\n          \"actual_price\": \"54.34\",\n          \"discount\": \"0.00\",\n          \"returnables_in\": \"0.00\",\n          \"returnables_out\": \"0.00\"\n        }\n      ]\n    },\n    {\n      \"id\": \"775860518640001\",\n      \"purchase_order\": \"https://app.apicbase.com/api/v2/procurement/purchase_orders/873200230080006/\",\n      \"purchase_order_id\": \"873200230080006\",\n      \"total_actual_price\": \"0.00\",\n      \"aggregated_delivered_packages\": [],\n      \"delivery_closed\": false,\n      \"created_date\": \"2022-11-30T12:29:33Z\",\n      \"modified_date\": \"2022-11-30T12:29:33Z\",\n      \"next_delivery_date\": null,\n      \"received_deliveries_summary\": []\n    },\n    {\n      \"id\": \"375860308620007\",\n      \"purchase_order\": \"https://app.apicbase.com/api/v2/procurement/purchase_orders/373490682390008/\",\n      \"purchase_order_id\": \"373490682390008\",\n      \"total_actual_price\": \"30.75\",\n      \"aggregated_delivered_packages\": [\n        {\n          \"id\": \"176005817240007\",\n          \"purchase_order_package\": \"474366266420002\",\n          \"quantity_delivered\": \"1.00\",\n          \"quantity_delivered_status\": \"ALL\",\n          \"remarks\": \"\",\n          \"actual_price\": \"0.75\",\n          \"intake_reason\": 1\n        },\n        {\n          \"id\": \"776005927270003\",\n          \"purchase_order_package\": \"174366596420006\",\n          \"quantity_delivered\": \"12.00\",\n          \"quantity_delivered_status\": \"ALL\",\n          \"remarks\": \"\",\n          \"actual_price\": \"30.00\",\n          \"intake_reason\": 0\n        }\n      ],\n      \"delivery_closed\": true,\n      \"created_date\": \"2022-11-30T11:15:59Z\",\n      \"modified_date\": \"2022-11-30T11:16:12Z\",\n      \"next_delivery_date\": null,\n      \"received_deliveries_summary\": [\n        {\n          \"id\": \"777760046480006\",\n          \"delivery_date\": \"2022-11-30T11:15:59\",\n          \"actual_price\": \"30.00\",\n          \"discount\": \"0.00\",\n          \"returnables_in\": \"0.00\",\n          \"returnables_out\": \"0.00\"\n        },\n        {\n          \"id\": \"577760756440001\",\n          \"delivery_date\": \"2022-11-30T11:16:47\",\n          \"actual_price\": \"0.75\",\n          \"discount\": \"0.00\",\n          \"returnables_in\": \"0.00\",\n          \"returnables_out\": \"0.00\"\n        }\n      ]\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":1,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"775860528690006"},"purchase_order":{"type":"string","example":"https://app.apicbase.com/api/v2/procurement/purchase_orders/373490200500004/"},"purchase_order_id":{"type":"string","example":"373490200500004"},"total_actual_price":{"type":"string","example":"70.46"},"aggregated_delivered_packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"476005347250003"},"purchase_order_package":{"type":"string","example":"974466112050001"},"quantity_delivered":{"type":"string","example":"1.00"},"quantity_delivered_status":{"type":"string","example":"ALL"},"remarks":{"type":"string","example":""},"actual_price":{"type":"string","example":"4.94"},"intake_reason":{"type":"integer","example":1,"default":0}}}},"delivery_closed":{"type":"boolean","example":true,"default":true},"created_date":{"type":"string","example":"2022-12-01T15:00:44Z"},"modified_date":{"type":"string","example":"2022-12-01T15:01:17Z"},"next_delivery_date":{},"received_deliveries_summary":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"177760676470006"},"delivery_date":{"type":"string","example":"2022-12-01T16:09:00"},"actual_price":{"type":"string","example":"16.12"},"discount":{"type":"string","example":"0.00"},"returnables_in":{"type":"string","example":"0.00"},"returnables_out":{"type":"string","example":"0.00"}}}}}}}}}}}}},"deprecated":false}},"/procurement/aggregated_supplier_deliveries/{aggregated_delivery_id}/":{"get":{"summary":"Get Aggregated Delivery","description":"Returns detailed information about a single aggregated delivery.","operationId":"get-aggregated-delivery","parameters":[{"name":"aggregated_delivery_id","in":"path","description":"An aggregated delivery's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"775860528690006\",\n  \"purchase_order\": \"https://app.apicbase.com/api/v2/procurement/purchase_orders/373490200500004/\",\n  \"purchase_order_id\": \"373490200500004\",\n  \"total_actual_price\": \"70.46\",\n  \"aggregated_delivered_packages\": [\n    {\n      \"id\": \"476005347250003\",\n      \"purchase_order_package\": \"974466112050001\",\n      \"quantity_delivered\": \"1.00\",\n      \"quantity_delivered_status\": \"ALL\",\n      \"remarks\": \"\",\n      \"actual_price\": \"4.94\",\n      \"intake_reason\": 1\n    },\n    {\n      \"id\": \"976005437270007\",\n      \"purchase_order_package\": \"174466402030005\",\n      \"quantity_delivered\": \"1.00\",\n      \"quantity_delivered_status\": \"ALL\",\n      \"remarks\": \"\",\n      \"actual_price\": \"15.00\",\n      \"intake_reason\": 0\n    },\n    {\n      \"id\": \"976005257270001\",\n      \"purchase_order_package\": \"174466622020007\",\n      \"quantity_delivered\": \"1.00\",\n      \"quantity_delivered_status\": \"ALL\",\n      \"remarks\": \"\",\n      \"actual_price\": \"49.40\",\n      \"intake_reason\": 1\n    },\n    {\n      \"id\": \"576005567260007\",\n      \"purchase_order_package\": \"274466463050001\",\n      \"quantity_delivered\": \"1.00\",\n      \"quantity_delivered_status\": \"PARTIALLY\",\n      \"remarks\": \"\",\n      \"actual_price\": \"1.12\",\n      \"intake_reason\": 0\n    }\n  ],\n  \"delivery_closed\": true,\n  \"created_date\": \"2022-12-01T15:00:44Z\",\n  \"modified_date\": \"2022-12-01T15:01:17Z\",\n  \"next_delivery_date\": null,\n  \"received_deliveries\": [\n    {\n      \"id\": \"177760676470006\",\n      \"url\": \"https://app.apicbase.com/api/v2/procurement/supplier_deliveries/177760676470006/\",\n      \"draft\": false,\n      \"received_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n      },\n      \"delivery_date\": \"2022-12-01T16:09:00\",\n      \"update_stock\": true,\n      \"actual_price\": \"16.12\",\n      \"delivery_remarks\": \"\",\n      \"discount\": \"0.00\",\n      \"discount_remarks\": \"\",\n      \"returnables_in\": \"0.00\",\n      \"returnables_out\": \"0.00\",\n      \"returnables_remarks\": \"\",\n      \"delivered_packages\": [\n        {\n          \"id\": \"978494754440008\",\n          \"purchase_order_package\": {\n            \"id\": \"174466402030005\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"976005437270007\"\n          },\n          \"quantity_delivered\": \"1.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"15.00\",\n          \"intake_reason\": 0,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/439435/\",\n            \"id\": \"439435\"\n          }\n        },\n        {\n          \"id\": \"478494864450001\",\n          \"purchase_order_package\": {\n            \"id\": \"974466112050001\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"476005347250003\"\n          },\n          \"quantity_delivered\": \"0.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"0.00\",\n          \"intake_reason\": 1,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/428119/\",\n            \"id\": \"428119\"\n          }\n        },\n        {\n          \"id\": \"578494674490006\",\n          \"purchase_order_package\": {\n            \"id\": \"174466622020007\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"976005257270001\"\n          },\n          \"quantity_delivered\": \"0.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"0.00\",\n          \"intake_reason\": 1,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/428120/\",\n            \"id\": \"428120\"\n          }\n        },\n        {\n          \"id\": \"678494484410007\",\n          \"purchase_order_package\": {\n            \"id\": \"274466463050001\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"576005567260007\"\n          },\n          \"quantity_delivered\": \"1.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"1.12\",\n          \"intake_reason\": 0,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/428121/\",\n            \"id\": \"428121\"\n          }\n        }\n      ],\n      \"delivery_notes\": [\n        {\n          \"id\": \"380000709120005\",\n          \"file_url\": \"https://app-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/delivery_notes.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T140554Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=b77cb800355349cc749f0631ad4a893f9cde31dfe8c3bd2ff881b6b24581ef65\"\n        },\n        {\n          \"id\": \"480000119100002\",\n          \"file_url\": \"https://app-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/delivery_notes.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T140554Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=2f7439a442a844b8f95cf43d06fdc633f1530a6193c4b16390bf6056906b8b80\"\n        }\n      ]\n    },\n    {\n      \"id\": \"377760986480007\",\n      \"url\": \"https://app.apicbase.com/api/v2/procurement/supplier_deliveries/377760986480007/\",\n      \"draft\": false,\n      \"received_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n      },\n      \"delivery_date\": \"2022-12-01T17:01:00\",\n      \"update_stock\": true,\n      \"actual_price\": \"54.34\",\n      \"delivery_remarks\": \"\",\n      \"discount\": \"0.00\",\n      \"discount_remarks\": \"\",\n      \"returnables_in\": \"0.00\",\n      \"returnables_out\": \"0.00\",\n      \"returnables_remarks\": \"\",\n      \"delivered_packages\": [\n        {\n          \"id\": \"878494594460008\",\n          \"purchase_order_package\": {\n            \"id\": \"974466112050001\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"476005347250003\"\n          },\n          \"quantity_delivered\": \"1.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"4.94\",\n          \"intake_reason\": 0,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/428119/\",\n            \"id\": \"428119\"\n          }\n        },\n        {\n          \"id\": \"678494905470005\",\n          \"purchase_order_package\": {\n            \"id\": \"174466622020007\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"976005257270001\"\n          },\n          \"quantity_delivered\": \"1.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"49.40\",\n          \"intake_reason\": 0,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/428120/\",\n            \"id\": \"428120\"\n          }\n        }\n      ],\n      \"delivery_notes\": []\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"775860528690006"},"purchase_order":{"type":"string","example":"https://app.apicbase.com/api/v2/procurement/purchase_orders/373490200500004/"},"purchase_order_id":{"type":"string","example":"373490200500004"},"total_actual_price":{"type":"string","example":"70.46"},"aggregated_delivered_packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"476005347250003"},"purchase_order_package":{"type":"string","example":"974466112050001"},"quantity_delivered":{"type":"string","example":"1.00"},"quantity_delivered_status":{"type":"string","example":"ALL"},"remarks":{"type":"string","example":""},"actual_price":{"type":"string","example":"4.94"},"intake_reason":{"type":"integer","example":1,"default":0}}}},"delivery_closed":{"type":"boolean","example":true,"default":true},"created_date":{"type":"string","example":"2022-12-01T15:00:44Z"},"modified_date":{"type":"string","example":"2022-12-01T15:01:17Z"},"next_delivery_date":{},"received_deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"177760676470006"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/procurement/supplier_deliveries/177760676470006/"},"draft":{"type":"boolean","example":false,"default":true},"received_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"delivery_date":{"type":"string","example":"2022-12-01T16:09:00"},"update_stock":{"type":"boolean","example":true,"default":true},"actual_price":{"type":"string","example":"16.12"},"delivery_remarks":{"type":"string","example":""},"discount":{"type":"string","example":"0.00"},"discount_remarks":{"type":"string","example":""},"returnables_in":{"type":"string","example":"0.00"},"returnables_out":{"type":"string","example":"0.00"},"returnables_remarks":{"type":"string","example":""},"delivered_packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"978494754440008"},"purchase_order_package":{"type":"object","properties":{"id":{"type":"string","example":"174466402030005"}}},"aggregated_delivery_package":{"type":"object","properties":{"id":{"type":"string","example":"976005437270007"}}},"quantity_delivered":{"type":"string","example":"1.00"},"remarks":{"type":"string","example":""},"actual_price":{"type":"string","example":"15.00"},"intake_reason":{"type":"integer","example":0,"default":0},"has_updated_price":{"type":"boolean","example":true,"default":true},"supplier_package":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/supplier_packages/439435/"},"id":{"type":"string","example":"439435"}}}}}},"delivery_notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"380000709120005"},"file_url":{"type":"string","example":"https://app-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/delivery_notes.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T140554Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=b77cb800355349cc749f0631ad4a893f9cde31dfe8c3bd2ff881b6b24581ef65"}}}}}}}}}}}}},"deprecated":false},"patch":{"summary":"Set the Next Delivery Date","description":"Sets the next delivery date on an aggregated delivery.","operationId":"set-the-next-delivery-date","parameters":[{"name":"aggregated_delivery_id","in":"path","description":"An aggregated delivery's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"next_delivery_date":{"type":"string","description":"The next expected delivery date for an upcoming delivery.","format":"date"}}},"examples":{"Request Example":{"value":{"next_delivery_date":"2022-12-05T15:00:00"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"875860838660003\",\n  \"purchase_order\": \"https://app.apicbase.com/api/v1/procurement/purchase_orders/473490760510004/\",\n  \"purchase_order_id\": \"473490760510004\",\n  \"total_actual_price\": \"29.36\",\n  \"aggregated_delivered_packages\": [\n    {\n      \"id\": \"476005987290004\",\n      \"purchase_order_package\": \"474466083060002\",\n      \"quantity_delivered\": \"2.00\",\n      \"quantity_delivered_status\": \"PARTIALLY\",\n      \"remarks\": \"\",\n      \"actual_price\": \"9.88\",\n      \"intake_reason\": 0\n    },\n    {\n      \"id\": \"376005597280001\",\n      \"purchase_order_package\": \"474466493060003\",\n      \"quantity_delivered\": \"4.00\",\n      \"quantity_delivered_status\": \"ALL\",\n      \"remarks\": \"\",\n      \"actual_price\": \"4.48\",\n      \"intake_reason\": 0\n    },\n    {\n      \"id\": \"376005177290009\",\n      \"purchase_order_package\": \"274466273080006\",\n      \"quantity_delivered\": \"1.00\",\n      \"quantity_delivered_status\": \"ALL\",\n      \"remarks\": \"\",\n      \"actual_price\": \"15.00\",\n      \"intake_reason\": 0\n    }\n  ],\n  \"delivery_closed\": false,\n  \"created_date\": \"2022-12-01T15:09:32.596473+01:00\",\n  \"modified_date\": \"2022-12-01T15:09:32.899134+01:00\",\n  \"next_delivery_date\": \"2022-12-05T15:00:00\",\n  \"received_deliveries\": [\n    {\n      \"id\": \"477760996410007\",\n      \"url\": \"https://app.apicbase.com/api/v1/procurement/supplier_deliveries/477760996410007/\",\n      \"draft\": false,\n      \"received_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n      },\n      \"delivery_date\": \"2022-12-01T17:09:00\",\n      \"update_stock\": true,\n      \"actual_price\": \"29.36\",\n      \"delivery_remarks\": \"\",\n      \"discount\": \"0.00\",\n      \"discount_remarks\": \"\",\n      \"returnables_in\": \"0.00\",\n      \"returnables_out\": \"0.00\",\n      \"returnables_remarks\": \"\",\n      \"delivered_packages\": [\n        {\n          \"id\": \"578494715400001\",\n          \"purchase_order_package\": {\n            \"id\": \"274466273080006\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"376005177290009\"\n          },\n          \"quantity_delivered\": \"1.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"15.00\",\n          \"intake_reason\": 0,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/439435/\",\n            \"id\": \"439435\"\n          }\n        },\n        {\n          \"id\": \"578494325400001\",\n          \"purchase_order_package\": {\n            \"id\": \"474466083060002\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"476005987290004\"\n          },\n          \"quantity_delivered\": \"2.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"9.88\",\n          \"intake_reason\": 0,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/428119/\",\n            \"id\": \"428119\"\n          }\n        },\n        {\n          \"id\": \"878494635410004\",\n          \"purchase_order_package\": {\n            \"id\": \"474466493060003\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"376005597280001\"\n          },\n          \"quantity_delivered\": \"4.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"4.48\",\n          \"intake_reason\": 0,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/428121/\",\n            \"id\": \"428121\"\n          }\n        }\n      ],\n      \"delivery_notes\": []\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"875860838660003"},"purchase_order":{"type":"string","example":"https://app.apicbase.com/api/v1/procurement/purchase_orders/473490760510004/"},"purchase_order_id":{"type":"string","example":"473490760510004"},"total_actual_price":{"type":"string","example":"29.36"},"aggregated_delivered_packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"476005987290004"},"purchase_order_package":{"type":"string","example":"474466083060002"},"quantity_delivered":{"type":"string","example":"2.00"},"quantity_delivered_status":{"type":"string","example":"PARTIALLY"},"remarks":{"type":"string","example":""},"actual_price":{"type":"string","example":"9.88"},"intake_reason":{"type":"integer","example":0,"default":0}}}},"delivery_closed":{"type":"boolean","example":false,"default":true},"created_date":{"type":"string","example":"2022-12-01T15:09:32.596473+01:00"},"modified_date":{"type":"string","example":"2022-12-01T15:09:32.899134+01:00"},"next_delivery_date":{"type":"string","example":"2022-12-05T15:00:00"},"received_deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"477760996410007"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/procurement/supplier_deliveries/477760996410007/"},"draft":{"type":"boolean","example":false,"default":true},"received_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"delivery_date":{"type":"string","example":"2022-12-01T17:09:00"},"update_stock":{"type":"boolean","example":true,"default":true},"actual_price":{"type":"string","example":"29.36"},"delivery_remarks":{"type":"string","example":""},"discount":{"type":"string","example":"0.00"},"discount_remarks":{"type":"string","example":""},"returnables_in":{"type":"string","example":"0.00"},"returnables_out":{"type":"string","example":"0.00"},"returnables_remarks":{"type":"string","example":""},"delivered_packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"578494715400001"},"purchase_order_package":{"type":"object","properties":{"id":{"type":"string","example":"274466273080006"}}},"aggregated_delivery_package":{"type":"object","properties":{"id":{"type":"string","example":"376005177290009"}}},"quantity_delivered":{"type":"string","example":"1.00"},"remarks":{"type":"string","example":""},"actual_price":{"type":"string","example":"15.00"},"intake_reason":{"type":"integer","example":0,"default":0},"has_updated_price":{"type":"boolean","example":true,"default":true},"supplier_package":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v1/products/supplier_packages/439435/"},"id":{"type":"string","example":"439435"}}}}}},"delivery_notes":{"type":"array"}}}}}}}}}},"deprecated":false}},"/procurement/aggregated_supplier_deliveries/{aggregated_delivery_id}/submit/":{"post":{"summary":"Close Deliveries","description":"Closes an order for delivery.","operationId":"close-deliveries","parameters":[{"name":"aggregated_delivery_id","in":"path","description":"An aggregated delivery's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"775860528690006\",\n  \"purchase_order\": \"https://app.apicbase.com/api/v1/procurement/purchase_orders/373490200500004/\",\n  \"purchase_order_id\": \"373490200500004\",\n  \"total_actual_price\": \"70.46\",\n  \"aggregated_delivered_packages\": [\n    {\n      \"id\": \"476005347250003\",\n      \"purchase_order_package\": \"974466112050001\",\n      \"quantity_delivered\": \"1.00\",\n      \"quantity_delivered_status\": \"ALL\",\n      \"remarks\": \"\",\n      \"actual_price\": \"4.94\",\n      \"intake_reason\": 1\n    },\n    {\n      \"id\": \"976005437270007\",\n      \"purchase_order_package\": \"174466402030005\",\n      \"quantity_delivered\": \"1.00\",\n      \"quantity_delivered_status\": \"ALL\",\n      \"remarks\": \"\",\n      \"actual_price\": \"15.00\",\n      \"intake_reason\": 0\n    },\n    {\n      \"id\": \"976005257270001\",\n      \"purchase_order_package\": \"174466622020007\",\n      \"quantity_delivered\": \"1.00\",\n      \"quantity_delivered_status\": \"ALL\",\n      \"remarks\": \"\",\n      \"actual_price\": \"49.40\",\n      \"intake_reason\": 1\n    },\n    {\n      \"id\": \"576005567260007\",\n      \"purchase_order_package\": \"274466463050001\",\n      \"quantity_delivered\": \"1.00\",\n      \"quantity_delivered_status\": \"PARTIALLY\",\n      \"remarks\": \"\",\n      \"actual_price\": \"1.12\",\n      \"intake_reason\": 0\n    }\n  ],\n  \"delivery_closed\": true,\n  \"created_date\": \"2022-12-01T15:00:44.588028+01:00\",\n  \"modified_date\": \"2022-12-01T15:01:17.210052+01:00\",\n  \"next_delivery_date\": null,\n  \"received_deliveries\": [\n    {\n      \"id\": \"177760676470006\",\n      \"url\": \"https://app.apicbase.com/api/v1/procurement/supplier_deliveries/177760676470006/\",\n      \"draft\": false,\n      \"received_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n      },\n      \"delivery_date\": \"2022-12-01T16:09:00\",\n      \"update_stock\": true,\n      \"actual_price\": \"16.12\",\n      \"delivery_remarks\": \"\",\n      \"discount\": \"0.00\",\n      \"discount_remarks\": \"\",\n      \"returnables_in\": \"0.00\",\n      \"returnables_out\": \"0.00\",\n      \"returnables_remarks\": \"\",\n      \"delivered_packages\": [\n        {\n          \"id\": \"978494754440008\",\n          \"purchase_order_package\": {\n            \"id\": \"174466402030005\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"976005437270007\"\n          },\n          \"quantity_delivered\": \"1.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"15.00\",\n          \"intake_reason\": 0,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/439435/\",\n            \"id\": \"439435\"\n          }\n        },\n        {\n          \"id\": \"478494864450001\",\n          \"purchase_order_package\": {\n            \"id\": \"974466112050001\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"476005347250003\"\n          },\n          \"quantity_delivered\": \"0.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"0.00\",\n          \"intake_reason\": 1,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/428119/\",\n            \"id\": \"428119\"\n          }\n        },\n        {\n          \"id\": \"578494674490006\",\n          \"purchase_order_package\": {\n            \"id\": \"174466622020007\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"976005257270001\"\n          },\n          \"quantity_delivered\": \"0.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"0.00\",\n          \"intake_reason\": 1,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/428120/\",\n            \"id\": \"428120\"\n          }\n        },\n        {\n          \"id\": \"678494484410007\",\n          \"purchase_order_package\": {\n            \"id\": \"274466463050001\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"576005567260007\"\n          },\n          \"quantity_delivered\": \"1.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"1.12\",\n          \"intake_reason\": 0,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/428121/\",\n            \"id\": \"428121\"\n          }\n        }\n      ],\n      \"delivery_notes\": [\n        {\n          \"id\": \"380000709120005\",\n          \"file_url\": \"https://app-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/delivery_notes.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T140554Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=b77cb800355349cc749f0631ad4a893f9cde31dfe8c3bd2ff881b6b24581ef65\"\n        },\n        {\n          \"id\": \"480000119100002\",\n          \"file_url\": \"https://app-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/delivery_notes.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T140554Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=2f7439a442a844b8f95cf43d06fdc633f1530a6193c4b16390bf6056906b8b80\"\n        }\n      ]\n    },\n    {\n      \"id\": \"377760986480007\",\n      \"url\": \"https://app.apicbase.com/api/v1/procurement/supplier_deliveries/377760986480007/\",\n      \"draft\": false,\n      \"received_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n      },\n      \"delivery_date\": \"2022-12-01T17:01:00\",\n      \"update_stock\": true,\n      \"actual_price\": \"54.34\",\n      \"delivery_remarks\": \"\",\n      \"discount\": \"0.00\",\n      \"discount_remarks\": \"\",\n      \"returnables_in\": \"0.00\",\n      \"returnables_out\": \"0.00\",\n      \"returnables_remarks\": \"\",\n      \"delivered_packages\": [\n        {\n          \"id\": \"878494594460008\",\n          \"purchase_order_package\": {\n            \"id\": \"974466112050001\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"476005347250003\"\n          },\n          \"quantity_delivered\": \"1.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"4.94\",\n          \"intake_reason\": 0,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/428119/\",\n            \"id\": \"428119\"\n          }\n        },\n        {\n          \"id\": \"678494905470005\",\n          \"purchase_order_package\": {\n            \"id\": \"174466622020007\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"976005257270001\"\n          },\n          \"quantity_delivered\": \"1.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"49.40\",\n          \"intake_reason\": 0,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/428120/\",\n            \"id\": \"428120\"\n          }\n        }\n      ],\n      \"delivery_notes\": []\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"775860528690006"},"purchase_order":{"type":"string","example":"https://app.apicbase.com/api/v1/procurement/purchase_orders/373490200500004/"},"purchase_order_id":{"type":"string","example":"373490200500004"},"total_actual_price":{"type":"string","example":"70.46"},"aggregated_delivered_packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"476005347250003"},"purchase_order_package":{"type":"string","example":"974466112050001"},"quantity_delivered":{"type":"string","example":"1.00"},"quantity_delivered_status":{"type":"string","example":"ALL"},"remarks":{"type":"string","example":""},"actual_price":{"type":"string","example":"4.94"},"intake_reason":{"type":"integer","example":1,"default":0}}}},"delivery_closed":{"type":"boolean","example":true,"default":true},"created_date":{"type":"string","example":"2022-12-01T15:00:44.588028+01:00"},"modified_date":{"type":"string","example":"2022-12-01T15:01:17.210052+01:00"},"next_delivery_date":{},"received_deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"177760676470006"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/procurement/supplier_deliveries/177760676470006/"},"draft":{"type":"boolean","example":false,"default":true},"received_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"delivery_date":{"type":"string","example":"2022-12-01T16:09:00"},"update_stock":{"type":"boolean","example":true,"default":true},"actual_price":{"type":"string","example":"16.12"},"delivery_remarks":{"type":"string","example":""},"discount":{"type":"string","example":"0.00"},"discount_remarks":{"type":"string","example":""},"returnables_in":{"type":"string","example":"0.00"},"returnables_out":{"type":"string","example":"0.00"},"returnables_remarks":{"type":"string","example":""},"delivered_packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"978494754440008"},"purchase_order_package":{"type":"object","properties":{"id":{"type":"string","example":"174466402030005"}}},"aggregated_delivery_package":{"type":"object","properties":{"id":{"type":"string","example":"976005437270007"}}},"quantity_delivered":{"type":"string","example":"1.00"},"remarks":{"type":"string","example":""},"actual_price":{"type":"string","example":"15.00"},"intake_reason":{"type":"integer","example":0,"default":0},"has_updated_price":{"type":"boolean","example":true,"default":true},"supplier_package":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v1/products/supplier_packages/439435/"},"id":{"type":"string","example":"439435"}}}}}},"delivery_notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"380000709120005"},"file_url":{"type":"string","example":"https://app-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/delivery_notes.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T140554Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=b77cb800355349cc749f0631ad4a893f9cde31dfe8c3bd2ff881b6b24581ef65"}}}}}}}}}}}}},"deprecated":false}},"/procurement/supplier_deliveries/":{"get":{"summary":"Get Deliveries","description":"Returns a list of deliveries in the library.","operationId":"get-deliveries","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"string"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"purchase_order_id","in":"query","description":"Filter on a purchase order.","schema":{"type":"string"}},{"name":"purchase_order_id__in","in":"query","description":"Filter on multiple purchase orders.","schema":{"type":"array","items":{"type":"string"}}},{"name":"aggregated_supplier_delivery","in":"query","description":"Filter on an aggregated delivery ID.","schema":{"type":"string"}},{"name":"aggregated_supplier_delivery__in","in":"query","description":"Filter on multiple aggregated delivery IDs.","schema":{"type":"string"}},{"name":"draft","in":"query","description":"Filter on deliveries that are/are not drafts.","schema":{"type":"boolean"}},{"name":"supplier_id","in":"query","description":"Filter on a supplier","schema":{"type":"string"}},{"name":"outlet_id","in":"query","description":"Filter on an outlet.","schema":{"type":"string"}},{"name":"owned_by_id","in":"query","description":"Filter on a user.","schema":{"type":"string"}},{"name":"received_by_id","in":"query","description":"Filter on a user.","schema":{"type":"string"}},{"name":"order_number","in":"query","description":"Filter on the order number of the associated purchase order.","schema":{"type":"string"}},{"name":"invoice_number","in":"query","description":"Filter on the invoice number of the associated purchase order","schema":{"type":"string"}},{"name":"invoice_status","in":"query","description":"Filter on the invoice status of the associated purchase order.","schema":{"type":"string","enum":["0","1","2","3"]}},{"name":"ordered_on","in":"query","description":"Filter on the purchase order's ordered on date.","schema":{"type":"string","format":"date"}},{"name":"ordered_on__gt","in":"query","description":"Filter on the purchase order's ordered on date (greater than).","schema":{"type":"string","format":"date"}},{"name":"ordered_on__lt","in":"query","description":"Filter on the purchase order's ordered on date (lower than).","schema":{"type":"string","format":"date"}},{"name":"delivery_date","in":"query","description":"Filter deliveries on this date.","schema":{"type":"string","format":"date"}},{"name":"delivery_date__gt","in":"query","description":"Filter deliveries on this date (greater than).","schema":{"type":"string","format":"date"}},{"name":"delivery_date__lt","in":"query","description":"Filter deliveries on this date (lower than).","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"count\": 2,\n  \"next\": null,\n  \"previous\": null,\n  \"results\": [\n    {\n      \"id\": \"377760986480007\",\n      \"url\": \"https://app.apicbase.com/api/v2/procurement/supplier_deliveries/377760986480007/\",\n      \"draft\": false,\n      \"received_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n      },\n      \"delivery_date\": \"2022-12-01T17:01:00\",\n      \"update_stock\": true,\n      \"actual_price\": \"54.34\",\n      \"delivery_remarks\": \"\",\n      \"discount\": \"0.00\",\n      \"discount_remarks\": \"\",\n      \"returnables_in\": \"0.00\",\n      \"returnables_out\": \"0.00\",\n      \"returnables_remarks\": \"\",\n      \"delivered_packages\": [\n        {\n          \"id\": \"878494594460008\",\n          \"purchase_order_package\": {\n            \"id\": \"974466112050001\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"476005347250003\"\n          },\n          \"quantity_delivered\": \"1.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"4.94\",\n          \"intake_reason\": 0,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/428119/\",\n            \"id\": \"428119\"\n          }\n        },\n        {\n          \"id\": \"678494905470005\",\n          \"purchase_order_package\": {\n            \"id\": \"174466622020007\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"976005257270001\"\n          },\n          \"quantity_delivered\": \"1.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"49.40\",\n          \"intake_reason\": 0,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v/products/supplier_packages/428120/\",\n            \"id\": \"428120\"\n          }\n        }\n      ],\n      \"delivery_notes\": [],\n      \"purchase_order\": {\n        \"id\": \"373490200500004\",\n        \"url\": \"https://app.apicbase.com/api/v2/procurement/purchase_orders/373490200500004/\",\n        \"order_number\": \"#20221130-1132-8\"\n      },\n      \"aggregated_supplier_delivery\": {\n        \"id\": \"775860528690006\",\n        \"url\": \"https://app.apicbase.com/api/v2/procurement/aggregated_supplier_deliveries/775860528690006/submit/\"\n      }\n    },\n    {\n      \"id\": \"177760676470006\",\n      \"url\": \"https://app.apicbase.com/api/v2/procurement/supplier_deliveries/177760676470006/\",\n      \"draft\": false,\n      \"received_by\": {\n        \"id\": \"236300957450001\",\n        \"username\": \"john.doe@apicbase.com\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n      },\n      \"delivery_date\": \"2022-12-01T16:09:00\",\n      \"update_stock\": true,\n      \"actual_price\": \"16.12\",\n      \"delivery_remarks\": \"\",\n      \"discount\": \"0.00\",\n      \"discount_remarks\": \"\",\n      \"returnables_in\": \"0.00\",\n      \"returnables_out\": \"0.00\",\n      \"returnables_remarks\": \"\",\n      \"delivered_packages\": [\n        {\n          \"id\": \"978494754440008\",\n          \"purchase_order_package\": {\n            \"id\": \"174466402030005\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"976005437270007\"\n          },\n          \"quantity_delivered\": \"1.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"15.00\",\n          \"intake_reason\": 0,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/439435/\",\n            \"id\": \"439435\"\n          }\n        },\n        {\n          \"id\": \"478494864450001\",\n          \"purchase_order_package\": {\n            \"id\": \"974466112050001\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"476005347250003\"\n          },\n          \"quantity_delivered\": \"0.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"0.00\",\n          \"intake_reason\": 1,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/428119/\",\n            \"id\": \"428119\"\n          }\n        },\n        {\n          \"id\": \"578494674490006\",\n          \"purchase_order_package\": {\n            \"id\": \"174466622020007\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"976005257270001\"\n          },\n          \"quantity_delivered\": \"0.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"0.00\",\n          \"intake_reason\": 1,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/428120/\",\n            \"id\": \"428120\"\n          }\n        },\n        {\n          \"id\": \"678494484410007\",\n          \"purchase_order_package\": {\n            \"id\": \"274466463050001\"\n          },\n          \"aggregated_delivery_package\": {\n            \"id\": \"576005567260007\"\n          },\n          \"quantity_delivered\": \"1.00\",\n          \"remarks\": \"\",\n          \"actual_price\": \"1.12\",\n          \"intake_reason\": 0,\n          \"has_updated_price\": true,\n          \"supplier_package\": {\n            \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/428121/\",\n            \"id\": \"428121\"\n          }\n        }\n      ],\n      \"delivery_notes\": [\n        {\n          \"id\": \"380000709120005\",\n          \"file_url\": \"https://app-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/delivery_notes.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T142217Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=87a6ec1198d47fb3bd6a48d467efe64977c973531f98342b4192a16c1ce5a7ab\"\n        },\n        {\n          \"id\": \"480000119100002\",\n          \"file_url\": \"https://app-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/delivery_notes.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T142217Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=714f73859a998fe4583ee35dda1adfbb106efe6dc779e779a9a4a5540d298141\"\n        }\n      ],\n      \"purchase_order\": {\n        \"id\": \"373490200500004\",\n        \"url\": \"https://app.apicbase.com/api/v2/procurement/purchase_orders/373490200500004/\",\n        \"order_number\": \"#20221130-1132-8\"\n      },\n      \"aggregated_supplier_delivery\": {\n        \"id\": \"775860528690006\",\n        \"url\": \"https://app.apicbase.com/api/v2/procurement/aggregated_supplier_deliveries/775860528690006/submit/\"\n      }\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":2,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"377760986480007"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/procurement/supplier_deliveries/377760986480007/"},"draft":{"type":"boolean","example":false,"default":true},"received_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"delivery_date":{"type":"string","example":"2022-12-01T17:01:00"},"update_stock":{"type":"boolean","example":true,"default":true},"actual_price":{"type":"string","example":"54.34"},"delivery_remarks":{"type":"string","example":""},"discount":{"type":"string","example":"0.00"},"discount_remarks":{"type":"string","example":""},"returnables_in":{"type":"string","example":"0.00"},"returnables_out":{"type":"string","example":"0.00"},"returnables_remarks":{"type":"string","example":""},"delivered_packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"878494594460008"},"purchase_order_package":{"type":"object","properties":{"id":{"type":"string","example":"974466112050001"}}},"aggregated_delivery_package":{"type":"object","properties":{"id":{"type":"string","example":"476005347250003"}}},"quantity_delivered":{"type":"string","example":"1.00"},"remarks":{"type":"string","example":""},"actual_price":{"type":"string","example":"4.94"},"intake_reason":{"type":"integer","example":0,"default":0},"has_updated_price":{"type":"boolean","example":true,"default":true},"supplier_package":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/supplier_packages/428119/"},"id":{"type":"string","example":"428119"}}}}}},"delivery_notes":{"type":"array"},"purchase_order":{"type":"object","properties":{"id":{"type":"string","example":"373490200500004"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/procurement/purchase_orders/373490200500004/"},"order_number":{"type":"string","example":"#20221130-1132-8"}}},"aggregated_supplier_delivery":{"type":"object","properties":{"id":{"type":"string","example":"775860528690006"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/procurement/aggregated_supplier_deliveries/775860528690006/submit/"}}}}}}}}}}}},"deprecated":false},"post":{"summary":"Create Delivery Draft","description":"Creates a delivery.","operationId":"create-a-delivery","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["purchase_order"],"properties":{"purchase_order":{"type":"string","description":"A purchase order ID."},"delivery_remarks":{"type":"string","description":"Any optional remarks."},"delivered_packages":{"type":"array","description":"A list of packages delivered.","items":{"properties":{"supplier_package":{"type":"string","description":"A supplier package ID."},"quantity_delivered":{"type":"number","description":"The quantity delivered.","format":"float"},"actual_price":{"type":"number","description":"The real price billed for all items in the package.","format":"float"},"remarks":{"type":"string","description":"Any optional remarks."},"intake_reason":{"type":"string","description":"A number code for an intake reason.","enum":["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"]},"has_updated_price":{"type":"boolean","description":"If true, will update the supplier package's price when submitting the delivery."}},"required":["supplier_package","quantity_delivered","actual_price"],"type":"object"}},"update_stock":{"type":"boolean","description":"If false, will not update stock when the delivery is submitted.","default":true},"discount":{"type":"number","description":"A total discount value applied to the delivery.","format":"float"},"discount_remarks":{"type":"string","description":"Any optional remarks about discounts."},"returnables_in":{"type":"number","description":"Incoming returnables.","format":"float"},"returnables_out":{"type":"number","description":"Outgoing returnables.","format":"float"},"returnables_remarks":{"type":"string","description":"Any optional remarks about returnables."}}},"examples":{"Request Example":{"value":{"purchase_order":"373490790520008","delivery_date":"2022-12-04T12:00:00","delivery_remarks":"Delivery remark","discount":"10.00","discount_remarks":"Discount remarks","returnables_in":"20.00","returnables_out":"30.00","returnables_remarks":"","update_stock":true,"delivered_packages":[{"supplier_package":439435,"quantity_delivered":"3.00","remarks":"Remarks","actual_price":"22.00","intake_reason":0},{"supplier_package":428119,"quantity_delivered":"5.00","actual_price":"23.00"}]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"477760107410006\",\n  \"url\": \"https://app.apicbase.com/api/v1/procurement/supplier_deliveries/477760107410006/\",\n  \"draft\": true,\n  \"received_by\": null,\n  \"delivery_date\": \"2022-12-04T12:00:00\",\n  \"update_stock\": true,\n  \"actual_price\": \"45.00\",\n  \"delivery_remarks\": \"Delivery remark\",\n  \"discount\": \"10.00\",\n  \"discount_remarks\": \"Discount remarks\",\n  \"returnables_in\": \"20.00\",\n  \"returnables_out\": \"30.00\",\n  \"returnables_remarks\": \"\",\n  \"delivered_packages\": [\n    {\n      \"id\": \"678494745440001\",\n      \"purchase_order_package\": {\n        \"id\": \"174466836220001\"\n      },\n      \"aggregated_delivery_package\": {\n        \"id\": \"776005018200003\"\n      },\n      \"quantity_delivered\": \"3.00\",\n      \"remarks\": \"Remarks\",\n      \"actual_price\": \"22.00\",\n      \"intake_reason\": 0,\n      \"has_updated_price\": false,\n      \"supplier_package\": {\n        \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/439435/\",\n        \"id\": \"439435\"\n      }\n    },\n    {\n      \"id\": \"978494655450009\",\n      \"purchase_order_package\": {\n        \"id\": \"774466646220004\"\n      },\n      \"aggregated_delivery_package\": {\n        \"id\": \"776005708250003\"\n      },\n      \"quantity_delivered\": \"5.00\",\n      \"remarks\": \"\",\n      \"actual_price\": \"23.00\",\n      \"intake_reason\": null,\n      \"has_updated_price\": false,\n      \"supplier_package\": {\n        \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/428119/\",\n        \"id\": \"428119\"\n      }\n    }\n  ],\n  \"delivery_notes\": [],\n  \"purchase_order\": {\n    \"id\": \"373490790520008\",\n    \"url\": \"https://app.apicbase.com/api/v1/procurement/purchase_orders/373490790520008/\",\n    \"order_number\": \"#20221202-419-60\"\n  },\n  \"aggregated_supplier_delivery\": {\n    \"id\": \"675860748690006\",\n    \"url\": \"https://app.apicbase.com/api/v1/procurement/aggregated_supplier_deliveries/675860748690006/submit/\"\n  }\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"477760107410006"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/procurement/supplier_deliveries/477760107410006/"},"draft":{"type":"boolean","example":true,"default":true},"received_by":{},"delivery_date":{"type":"string","example":"2022-12-04T12:00:00"},"update_stock":{"type":"boolean","example":true,"default":true},"actual_price":{"type":"string","example":"45.00"},"delivery_remarks":{"type":"string","example":"Delivery remark"},"discount":{"type":"string","example":"10.00"},"discount_remarks":{"type":"string","example":"Discount remarks"},"returnables_in":{"type":"string","example":"20.00"},"returnables_out":{"type":"string","example":"30.00"},"returnables_remarks":{"type":"string","example":""},"delivered_packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"678494745440001"},"purchase_order_package":{"type":"object","properties":{"id":{"type":"string","example":"174466836220001"}}},"aggregated_delivery_package":{"type":"object","properties":{"id":{"type":"string","example":"776005018200003"}}},"quantity_delivered":{"type":"string","example":"3.00"},"remarks":{"type":"string","example":"Remarks"},"actual_price":{"type":"string","example":"22.00"},"intake_reason":{"type":"integer","example":0,"default":0},"has_updated_price":{"type":"boolean","example":false,"default":true},"supplier_package":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v1/products/supplier_packages/439435/"},"id":{"type":"string","example":"439435"}}}}}},"delivery_notes":{"type":"array"},"purchase_order":{"type":"object","properties":{"id":{"type":"string","example":"373490790520008"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/procurement/purchase_orders/373490790520008/"},"order_number":{"type":"string","example":"#20221202-419-60"}}},"aggregated_supplier_delivery":{"type":"object","properties":{"id":{"type":"string","example":"675860748690006"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/procurement/aggregated_supplier_deliveries/675860748690006/submit/"}}}}}}}}},"deprecated":false}},"/procurement/supplier_deliveries/{delivery_id}/":{"get":{"summary":"Get Delivery Details","description":"Returns detailed information about a single delivery.","operationId":"get-delivery-details","parameters":[{"name":"delivery_id","in":"path","description":"A delivery's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"177760676470006\",\n  \"url\": \"https://app.apicbase.com/api/v2/procurement/supplier_deliveries/177760676470006/\",\n  \"draft\": false,\n  \"received_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v2/accounts/users/236300957450001/\"\n  },\n  \"delivery_date\": \"2022-12-01T16:09:00\",\n  \"update_stock\": true,\n  \"actual_price\": \"16.12\",\n  \"delivery_remarks\": \"\",\n  \"discount\": \"0.00\",\n  \"discount_remarks\": \"\",\n  \"returnables_in\": \"0.00\",\n  \"returnables_out\": \"0.00\",\n  \"returnables_remarks\": \"\",\n  \"delivered_packages\": [\n    {\n      \"id\": \"978494754440008\",\n      \"purchase_order_package\": {\n        \"id\": \"174466402030005\"\n      },\n      \"aggregated_delivery_package\": {\n        \"id\": \"976005437270007\"\n      },\n      \"quantity_delivered\": \"1.00\",\n      \"remarks\": \"\",\n      \"actual_price\": \"15.00\",\n      \"intake_reason\": 0,\n      \"has_updated_price\": true,\n      \"supplier_package\": {\n        \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/439435/\",\n        \"id\": \"439435\"\n      }\n    },\n    {\n      \"id\": \"478494864450001\",\n      \"purchase_order_package\": {\n        \"id\": \"974466112050001\"\n      },\n      \"aggregated_delivery_package\": {\n        \"id\": \"476005347250003\"\n      },\n      \"quantity_delivered\": \"0.00\",\n      \"remarks\": \"\",\n      \"actual_price\": \"0.00\",\n      \"intake_reason\": 1,\n      \"has_updated_price\": true,\n      \"supplier_package\": {\n        \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/428119/\",\n        \"id\": \"428119\"\n      }\n    },\n    {\n      \"id\": \"578494674490006\",\n      \"purchase_order_package\": {\n        \"id\": \"174466622020007\"\n      },\n      \"aggregated_delivery_package\": {\n        \"id\": \"976005257270001\"\n      },\n      \"quantity_delivered\": \"0.00\",\n      \"remarks\": \"\",\n      \"actual_price\": \"0.00\",\n      \"intake_reason\": 1,\n      \"has_updated_price\": true,\n      \"supplier_package\": {\n        \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/428120/\",\n        \"id\": \"428120\"\n      }\n    },\n    {\n      \"id\": \"678494484410007\",\n      \"purchase_order_package\": {\n        \"id\": \"274466463050001\"\n      },\n      \"aggregated_delivery_package\": {\n        \"id\": \"576005567260007\"\n      },\n      \"quantity_delivered\": \"1.00\",\n      \"remarks\": \"\",\n      \"actual_price\": \"1.12\",\n      \"intake_reason\": 0,\n      \"has_updated_price\": true,\n      \"supplier_package\": {\n        \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/428121/\",\n        \"id\": \"428121\"\n      }\n    }\n  ],\n  \"delivery_notes\": [\n    {\n      \"id\": \"380000709120005\",\n      \"file_url\": \"https://app-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/delivery_notes.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T142307Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=30086bc00db1f8b7f9f9594afffa4365197754adc835e399413ac40ceb59bd7d\"\n    },\n    {\n      \"id\": \"480000119100002\",\n      \"file_url\": \"https://app-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/delivery_notes.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T142307Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=3731549f8a15135470e3acf59c7b4064565c0e758e4463ee1ec547bbebfa4a19\"\n    }\n  ],\n  \"purchase_order\": {\n    \"id\": \"373490200500004\",\n    \"url\": \"https://app.apicbase.com/api/v2/procurement/purchase_orders/373490200500004/\",\n    \"order_number\": \"#20221130-1132-8\"\n  },\n  \"aggregated_supplier_delivery\": {\n    \"id\": \"775860528690006\",\n    \"url\": \"https://app.apicbase.com/api/v2/procurement/aggregated_supplier_deliveries/775860528690006/submit/\"\n  }\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"177760676470006"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/procurement/supplier_deliveries/177760676470006/"},"draft":{"type":"boolean","example":false,"default":true},"received_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"delivery_date":{"type":"string","example":"2022-12-01T16:09:00"},"update_stock":{"type":"boolean","example":true,"default":true},"actual_price":{"type":"string","example":"16.12"},"delivery_remarks":{"type":"string","example":""},"discount":{"type":"string","example":"0.00"},"discount_remarks":{"type":"string","example":""},"returnables_in":{"type":"string","example":"0.00"},"returnables_out":{"type":"string","example":"0.00"},"returnables_remarks":{"type":"string","example":""},"delivered_packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"978494754440008"},"purchase_order_package":{"type":"object","properties":{"id":{"type":"string","example":"174466402030005"}}},"aggregated_delivery_package":{"type":"object","properties":{"id":{"type":"string","example":"976005437270007"}}},"quantity_delivered":{"type":"string","example":"1.00"},"remarks":{"type":"string","example":""},"actual_price":{"type":"string","example":"15.00"},"intake_reason":{"type":"integer","example":0,"default":0},"has_updated_price":{"type":"boolean","example":true,"default":true},"supplier_package":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/supplier_packages/439435/"},"id":{"type":"string","example":"439435"}}}}}},"delivery_notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"380000709120005"},"file_url":{"type":"string","example":"https://app-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/delivery_notes.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKSR6CMXW%2F20221201%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221201T142307Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHMaDGV1LWNlbnRyYWwtMSJGMEQCIDD2NMNKeSskeXyLXW3Xgd5W8xc01ooMZeUt1dhxWUu5AiAwTr5Sd%2BfpPXF4wIEzCpeZOu2gqsx5JPOru4c2QnPwXSrfBAiM%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDgwNjQ0MDk4MDY5NiIM1JgCgm1KHqveLY20KrMEhR%2FWMuUzsACxA3LfpTeZYzXcsqDxccOqwopnwkbFe%2FxY0%2FD9XPqo9J%2B03UMVWaNNaJQvKMGQrc%2FDg%2FT%2BTsqg%2BNZG4%2Bj86cDJH2WfHo9wwAXqGO978zIGBdEqPEjprq5OONvgK3C1j2ZWmpkrBZVde%2FpwXm7emP0BzIafVsLJn5Xj3FUy1w66zOwtREeGDQKXMCVX0SRFyUHYxwriXlE%2F9OAybH77AwbuAV3n%2FxVpYgYkDOQLqUiVyPif%2BMEsl5T96FOtlaSzk%2FIlkoyZ7MxQ%2BJgyyhyErgAoKNaPce3bvjQ6dE%2FvI9iEf50ayD4QLOCRv962NV5PBZgTGRydma%2BuL%2FwstzlT9r6RvCjTO%2Ff29dz3aYJCV8qITMC957VpR1EA8zCU435nklvtxl9G5LgPPXIAnZn8fZHs%2BwM8tyEC%2BKVQFlm2iCGhCP2hKZizkQpX9gGJZHDzr8pMi5cOgka4qkcZeIeXWPqEgYn1jkMYPP6Rmk3fGpi8CtEaE0dLO%2FiIDV5O3XbjkXCxmwb8H9aAyGnYgcduZUkWT7ANtzt3vqiChQKj3gyGOHeXLZX6RI4pDb7%2FRDSKRfBj10VcKYlkV66JxHQQa1X46SgK4hirVnq2IBDv15Al8TLnRsSoyxAwi7fyNHIsyaFv70IMjWzPB5mKuR6IqUQTxm0199EoxvqEz7BDnI3u2QuEkSYaxvvhAgkxrP2kPe4qSe4Psr8rqZoeSiQdh%2FQCpj%2Bhv8RVn%2FHACyswgominAY6qgGUud4Y0KVQHSHPpI0MLONwu7%2FE9bXXzo12BheI8FhpQorzjy8alspoFk4OLzpQLpzSsa%2BZCbuWSsxoa7rG6WR3B%2BNo4iWVGSm6rwThWdGKecxEx4MQqtlnBH9L6Duac5EfgaykidAIZo6hgHGM9fvako%2BHHr%2BOE8h7z%2BoQUE2EITGBgm4Ewd7pB%2B4duht1Ufs5DZpUFk2YI2Xoh9QFq7%2B%2BS%2B3XFtSMsd8NIw%3D%3D&X-Amz-Signature=30086bc00db1f8b7f9f9594afffa4365197754adc835e399413ac40ceb59bd7d"}}}},"purchase_order":{"type":"object","properties":{"id":{"type":"string","example":"373490200500004"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/procurement/purchase_orders/373490200500004/"},"order_number":{"type":"string","example":"#20221130-1132-8"}}},"aggregated_supplier_delivery":{"type":"object","properties":{"id":{"type":"string","example":"775860528690006"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/procurement/aggregated_supplier_deliveries/775860528690006/submit/"}}}}}}}}},"deprecated":false},"patch":{"summary":"Edit Delivery","description":"Edits a delivery. Works on both draft and submitted deliveries. Submitted deliveries follow extra rules — a price is required when a quantity changes, the delivery total and intake reasons are recalculated, omitted lines are zeroed, and `update_stock` is fixed. See [Editing a submitted delivery](https://developers.apicbase.com/docs/submitting-purchase-orders#editing-a-submitted-delivery).","operationId":"edit-delivery","parameters":[{"name":"delivery_id","in":"path","description":"A delivery's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"delivery_date":{"type":"string","description":"Date and time of delivery.","format":"date"},"update_stock":{"type":"boolean","description":"If false, will not update stock when the delivery is submitted.","default":true},"delivered_packages":{"type":"array","description":"A list of packages delivered","items":{"properties":{"supplier_package":{"type":"string","description":"A supplier package ID."},"quantity_delivered":{"type":"number","description":"The quantity delivered.","format":"float"},"actual_price":{"type":"number","description":"The real price billed for all items in the package.","format":"float"},"remarks":{"type":"string","description":"Any optional remarks."},"intake_reason":{"type":"string","description":"A number code for an intake reason.","enum":["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"]},"has_updated_price":{"type":"boolean","description":"If true, will update the supplier package's price when submitting the delivery."}},"required":["supplier_package","quantity_delivered","actual_price"],"type":"object"}},"delivery_remarks":{"type":"string","description":"Any optional remarks."},"discount":{"type":"number","description":"A total discount value applied to the delivery.","format":"float"},"discount_remarks":{"type":"string","description":"Any optional remarks about discounts."},"returnables_in":{"type":"number","description":"Incoming returnables.","format":"float"},"returnables_out":{"type":"number","description":"Outgoing returnables.","format":"float"},"returnables_remarks":{"type":"string","description":"Any optional remarks about returnables."}}},"examples":{"Request Example":{"value":{"purchase_order":"373490790520008","delivery_date":"2022-12-04T12:00:00","delivery_remarks":"Delivery remark","discount":"10.00","discount_remarks":"Discount remarks","returnables_in":"20.00","returnables_out":"30.00","returnables_remarks":"","update_stock":true,"delivered_packages":[{"supplier_package":439435,"quantity_delivered":"3.00","remarks":"Remarks","actual_price":"22.00","intake_reason":0},{"supplier_package":428119,"quantity_delivered":"5.00","actual_price":"23.00"}]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"477760107410006\",\n  \"url\": \"https://app.apicbase.com/api/v1/procurement/supplier_deliveries/477760107410006/\",\n  \"draft\": true,\n  \"received_by\": null,\n  \"delivery_date\": \"2022-12-04T12:00:00\",\n  \"update_stock\": true,\n  \"actual_price\": \"45.00\",\n  \"delivery_remarks\": \"Delivery remark\",\n  \"discount\": \"10.00\",\n  \"discount_remarks\": \"Discount remarks\",\n  \"returnables_in\": \"20.00\",\n  \"returnables_out\": \"30.00\",\n  \"returnables_remarks\": \"\",\n  \"delivered_packages\": [\n    {\n      \"id\": \"678494745440001\",\n      \"purchase_order_package\": {\n        \"id\": \"174466836220001\"\n      },\n      \"aggregated_delivery_package\": {\n        \"id\": \"776005018200003\"\n      },\n      \"quantity_delivered\": \"3.00\",\n      \"remarks\": \"Remarks\",\n      \"actual_price\": \"22.00\",\n      \"intake_reason\": 0,\n      \"has_updated_price\": false,\n      \"supplier_package\": {\n        \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/439435/\",\n        \"id\": \"439435\"\n      }\n    },\n    {\n      \"id\": \"978494655450009\",\n      \"purchase_order_package\": {\n        \"id\": \"774466646220004\"\n      },\n      \"aggregated_delivery_package\": {\n        \"id\": \"776005708250003\"\n      },\n      \"quantity_delivered\": \"5.00\",\n      \"remarks\": \"\",\n      \"actual_price\": \"23.00\",\n      \"intake_reason\": null,\n      \"has_updated_price\": false,\n      \"supplier_package\": {\n        \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/428119/\",\n        \"id\": \"428119\"\n      }\n    }\n  ],\n  \"delivery_notes\": [],\n  \"purchase_order\": {\n    \"id\": \"373490790520008\",\n    \"url\": \"https://app.apicbase.com/api/v1/procurement/purchase_orders/373490790520008/\",\n    \"order_number\": \"#20221202-419-60\"\n  },\n  \"aggregated_supplier_delivery\": {\n    \"id\": \"675860748690006\",\n    \"url\": \"https://app.apicbase.com/api/v1/procurement/aggregated_supplier_deliveries/675860748690006/submit/\"\n  }\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"477760107410006"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/procurement/supplier_deliveries/477760107410006/"},"draft":{"type":"boolean","example":true,"default":true},"received_by":{},"delivery_date":{"type":"string","example":"2022-12-04T12:00:00"},"update_stock":{"type":"boolean","example":true,"default":true},"actual_price":{"type":"string","example":"45.00"},"delivery_remarks":{"type":"string","example":"Delivery remark"},"discount":{"type":"string","example":"10.00"},"discount_remarks":{"type":"string","example":"Discount remarks"},"returnables_in":{"type":"string","example":"20.00"},"returnables_out":{"type":"string","example":"30.00"},"returnables_remarks":{"type":"string","example":""},"delivered_packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"678494745440001"},"purchase_order_package":{"type":"object","properties":{"id":{"type":"string","example":"174466836220001"}}},"aggregated_delivery_package":{"type":"object","properties":{"id":{"type":"string","example":"776005018200003"}}},"quantity_delivered":{"type":"string","example":"3.00"},"remarks":{"type":"string","example":"Remarks"},"actual_price":{"type":"string","example":"22.00"},"intake_reason":{"type":"integer","example":0,"default":0},"has_updated_price":{"type":"boolean","example":false,"default":true},"supplier_package":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v1/products/supplier_packages/439435/"},"id":{"type":"string","example":"439435"}}}}}},"delivery_notes":{"type":"array"},"purchase_order":{"type":"object","properties":{"id":{"type":"string","example":"373490790520008"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/procurement/purchase_orders/373490790520008/"},"order_number":{"type":"string","example":"#20221202-419-60"}}},"aggregated_supplier_delivery":{"type":"object","properties":{"id":{"type":"string","example":"675860748690006"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/procurement/aggregated_supplier_deliveries/675860748690006/submit/"}}}}}}}}},"deprecated":false},"delete":{"summary":"Cancel Delivery Draft","description":"Cancels a delivery in draft state.","operationId":"cancel-delivery-draft","parameters":[{"name":"delivery_id","in":"path","description":"A delivery's ID.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/procurement/supplier_deliveries/{supplier_delivery_id}/submit/":{"post":{"summary":"Submit Delivery Draft","description":"Submits a delivery in draft state.","operationId":"submit-a-delivery-draft","parameters":[{"name":"supplier_delivery_id","in":"path","description":"A delivery's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"delivery_date":{"type":"string","description":"Date and time of delivery.","format":"date"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"477760107410006\",\n  \"url\": \"https://app.apicbase.com/api/v1/procurement/supplier_deliveries/477760107410006/\",\n  \"draft\": false,\n  \"received_by\": {\n    \"id\": \"236300957450001\",\n    \"username\": \"john.doe@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"url\": \"https://app.apicbase.com/api/v1/accounts/users/236300957450001/\"\n  },\n  \"delivery_date\": \"2022-12-04T12:00:00\",\n  \"update_stock\": true,\n  \"actual_price\": \"45.00\",\n  \"delivery_remarks\": \"Delivery remark\",\n  \"discount\": \"10.00\",\n  \"discount_remarks\": \"Discount remarks\",\n  \"returnables_in\": \"20.00\",\n  \"returnables_out\": \"30.00\",\n  \"returnables_remarks\": \"\",\n  \"delivered_packages\": [\n    {\n      \"id\": \"678494745440001\",\n      \"purchase_order_package\": {\n        \"id\": \"174466836220001\"\n      },\n      \"aggregated_delivery_package\": {\n        \"id\": \"776005018200003\"\n      },\n      \"quantity_delivered\": \"3.00\",\n      \"remarks\": \"Remarks\",\n      \"actual_price\": \"22.00\",\n      \"intake_reason\": 0,\n      \"has_updated_price\": false,\n      \"supplier_package\": {\n        \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/439435/\",\n        \"id\": \"439435\"\n      }\n    },\n    {\n      \"id\": \"978494655450009\",\n      \"purchase_order_package\": {\n        \"id\": \"774466646220004\"\n      },\n      \"aggregated_delivery_package\": {\n        \"id\": \"776005708250003\"\n      },\n      \"quantity_delivered\": \"5.00\",\n      \"remarks\": \"\",\n      \"actual_price\": \"23.00\",\n      \"intake_reason\": 0,\n      \"has_updated_price\": false,\n      \"supplier_package\": {\n        \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/428119/\",\n        \"id\": \"428119\"\n      }\n    },\n    {\n      \"id\": \"178494465420006\",\n      \"purchase_order_package\": {\n        \"id\": \"274466556230008\"\n      },\n      \"aggregated_delivery_package\": {\n        \"id\": \"876005328290007\"\n      },\n      \"quantity_delivered\": \"0.00\",\n      \"remarks\": \"\",\n      \"actual_price\": \"0.00\",\n      \"intake_reason\": 1,\n      \"has_updated_price\": false,\n      \"supplier_package\": {\n        \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/428120/\",\n        \"id\": \"428120\"\n      }\n    }\n  ],\n  \"delivery_notes\": [],\n  \"purchase_order\": {\n    \"id\": \"373490790520008\",\n    \"url\": \"https://app.apicbase.com/api/v1/procurement/purchase_orders/373490790520008/\",\n    \"order_number\": \"#20221202-419-60\"\n  },\n  \"aggregated_supplier_delivery\": {\n    \"id\": \"675860748690006\",\n    \"url\": \"https://app.apicbase.com/api/v1/procurement/aggregated_supplier_deliveries/675860748690006/submit/\"\n  }\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"477760107410006"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/procurement/supplier_deliveries/477760107410006/"},"draft":{"type":"boolean","example":false,"default":true},"received_by":{"type":"object","properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/accounts/users/236300957450001/"}}},"delivery_date":{"type":"string","example":"2022-12-04T12:00:00"},"update_stock":{"type":"boolean","example":true,"default":true},"actual_price":{"type":"string","example":"45.00"},"delivery_remarks":{"type":"string","example":"Delivery remark"},"discount":{"type":"string","example":"10.00"},"discount_remarks":{"type":"string","example":"Discount remarks"},"returnables_in":{"type":"string","example":"20.00"},"returnables_out":{"type":"string","example":"30.00"},"returnables_remarks":{"type":"string","example":""},"delivered_packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"678494745440001"},"purchase_order_package":{"type":"object","properties":{"id":{"type":"string","example":"174466836220001"}}},"aggregated_delivery_package":{"type":"object","properties":{"id":{"type":"string","example":"776005018200003"}}},"quantity_delivered":{"type":"string","example":"3.00"},"remarks":{"type":"string","example":"Remarks"},"actual_price":{"type":"string","example":"22.00"},"intake_reason":{"type":"integer","example":0,"default":0},"has_updated_price":{"type":"boolean","example":false,"default":true},"supplier_package":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v1/products/supplier_packages/439435/"},"id":{"type":"string","example":"439435"}}}}}},"delivery_notes":{"type":"array"},"purchase_order":{"type":"object","properties":{"id":{"type":"string","example":"373490790520008"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/procurement/purchase_orders/373490790520008/"},"order_number":{"type":"string","example":"#20221202-419-60"}}},"aggregated_supplier_delivery":{"type":"object","properties":{"id":{"type":"string","example":"675860748690006"},"url":{"type":"string","example":"https://app.apicbase.com/api/v1/procurement/aggregated_supplier_deliveries/675860748690006/submit/"}}}}}}}}},"deprecated":false,"x-readme":{"samples-languages":["curl"]}}},"/procurement/supplier_deliveries/{delivery_id}/delivered_packages/":{"get":{"summary":"Get Packages in Delivery","description":"Returns a list of packages in a specific delivery.","operationId":"get-packages-in-delivery","parameters":[{"name":"delivery_id","in":"path","description":"A delivery's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"[\n  {\n    \"id\": \"878494306410004\",\n    \"purchase_order_package\": {\n      \"id\": \"774466646220004\"\n    },\n    \"aggregated_delivery_package\": {\n      \"id\": \"776005708250003\"\n    },\n    \"quantity_delivered\": \"5.00\",\n    \"remarks\": \"\",\n    \"actual_price\": \"23.00\",\n    \"intake_reason\": null,\n    \"has_updated_price\": false,\n    \"supplier_package\": {\n      \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/428119/\",\n      \"id\": \"428119\"\n    }\n  },\n  {\n    \"id\": \"678494795450002\",\n    \"purchase_order_package\": {\n      \"id\": \"174466836220001\"\n    },\n    \"aggregated_delivery_package\": {\n      \"id\": \"776005018200003\"\n    },\n    \"quantity_delivered\": \"3.00\",\n    \"remarks\": \"Remarks\",\n    \"actual_price\": \"22.00\",\n    \"intake_reason\": 0,\n    \"has_updated_price\": false,\n    \"supplier_package\": {\n      \"url\": \"https://app.apicbase.com/api/v2/products/supplier_packages/439435/\",\n      \"id\": \"439435\"\n    }\n  }\n]"}},"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"878494306410004"},"purchase_order_package":{"type":"object","properties":{"id":{"type":"string","example":"774466646220004"}}},"aggregated_delivery_package":{"type":"object","properties":{"id":{"type":"string","example":"776005708250003"}}},"quantity_delivered":{"type":"string","example":"5.00"},"remarks":{"type":"string","example":""},"actual_price":{"type":"string","example":"23.00"},"intake_reason":{},"has_updated_price":{"type":"boolean","example":false,"default":true},"supplier_package":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/supplier_packages/428119/"},"id":{"type":"string","example":"428119"}}}}}}}}}},"deprecated":false},"post":{"summary":"Add Package to Delivery","description":"Adds a package to a delivery. Works on both draft and submitted deliveries. See [Editing a submitted delivery](https://developers.apicbase.com/docs/submitting-purchase-orders#editing-a-submitted-delivery).","operationId":"add-package-to-delivery-draft","parameters":[{"name":"delivery_id","in":"path","description":"A delivery's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"RAW_BODY":{"type":"object","description":"A package to be added to the delivery draft.","required":["supplier_package","quantity_delivered","actual_price"],"properties":{"supplier_package":{"type":"string","description":"A supplier package ID."},"quantity_delivered":{"type":"number","description":"The quantity delivered.","format":"float"},"actual_price":{"type":"number","description":"The real price billed for all items in the package.","format":"float"},"remarks":{"type":"string","description":"Any optional remarks."},"intake_reason":{"type":"string","description":"A number code for an intake reason.","enum":["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"]},"has_updated_price":{"type":"boolean","description":"If true, will update the supplier package's price when submitting the delivery."}}}}},"examples":{"Request Example":{"value":{"supplier_package":"439435","quantity_delivered":"3.00","remarks":"Remarks","actual_price":"22.00","intake_reason":0}}}}}},"responses":{"200":{"description":"200","content":{"text/plain":{"examples":{"Result":{"value":"{\n  \"id\": \"678494216450005\",\n  \"purchase_order_package\": {\n    \"id\": \"174466836220001\"\n  },\n  \"aggregated_delivery_package\": {\n    \"id\": \"776005018200003\"\n  },\n  \"quantity_delivered\": \"3.00\",\n  \"remarks\": \"Remarks\",\n  \"actual_price\": \"22.00\",\n  \"intake_reason\": 0,\n  \"has_updated_price\": false,\n  \"supplier_package\": {\n    \"url\": \"https://app.apicbase.com/api/v1/products/supplier_packages/439435/\",\n    \"id\": \"439435\"\n  }\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"678494216450005"},"purchase_order_package":{"type":"object","properties":{"id":{"type":"string","example":"174466836220001"}}},"aggregated_delivery_package":{"type":"object","properties":{"id":{"type":"string","example":"776005018200003"}}},"quantity_delivered":{"type":"string","example":"3.00"},"remarks":{"type":"string","example":"Remarks"},"actual_price":{"type":"string","example":"22.00"},"intake_reason":{"type":"integer","example":0,"default":0},"has_updated_price":{"type":"boolean","example":false,"default":true},"supplier_package":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v1/products/supplier_packages/439435/"},"id":{"type":"string","example":"439435"}}}}}}}}},"deprecated":false}},"/procurement/supplier_deliveries/{delivery_id}/delivered_packages/{delivery_package_id}/":{"patch":{"summary":"Edit Package in Delivery","description":"Edits a package in a delivery. Works on both draft and submitted deliveries. On a submitted delivery a quantity change requires `actual_price`, and intake reasons may be recalculated. See [Editing a submitted delivery](https://developers.apicbase.com/docs/submitting-purchase-orders#editing-a-submitted-delivery).","operationId":"edit-package-in-delivery-draft","parameters":[{"name":"delivery_id","in":"path","description":"A delivery's ID.","schema":{"type":"string"},"required":true},{"name":"delivery_package_id","in":"path","description":"The ID of a package in the delivery.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"quantity_delivered":{"type":"number","description":"The quantity delivered.","format":"float"},"actual_price":{"type":"number","description":"The real price billed for all items in the package.","format":"float"},"remarks":{"type":"string","description":"Any optional remarks."},"intake_reason":{"type":"string","description":"A number code for an intake reason.","enum":["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"]},"has_updated_price":{"type":"boolean","description":"If true, will update the supplier package's price when submitting the delivery."}}},"examples":{"Request Example":{"value":{"quantity_delivered":"3.00","remarks":"Remarks","actual_price":"22.00","intake_reason":0}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"678494216450005\",\n  \"purchase_order_package\": {\n    \"id\": \"174466836220001\"\n  },\n  \"aggregated_delivery_package\": {\n    \"id\": \"776005018200003\"\n  },\n  \"quantity_delivered\": \"3.00\",\n  \"remarks\": \"Remarks\",\n  \"actual_price\": \"22.00\",\n  \"intake_reason\": 0,\n  \"has_updated_price\": false,\n  \"supplier_package\": {\n    \"url\": \"https://staging.apicbase.com/api/v1/products/supplier_packages/439435/\",\n    \"id\": \"439435\"\n  }\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"678494216450005"},"purchase_order_package":{"type":"object","properties":{"id":{"type":"string","example":"174466836220001"}}},"aggregated_delivery_package":{"type":"object","properties":{"id":{"type":"string","example":"776005018200003"}}},"quantity_delivered":{"type":"string","example":"3.00"},"remarks":{"type":"string","example":"Remarks"},"actual_price":{"type":"string","example":"22.00"},"intake_reason":{"type":"integer","example":0,"default":0},"has_updated_price":{"type":"boolean","example":false,"default":true},"supplier_package":{"type":"object","properties":{"url":{"type":"string","example":"https://staging.apicbase.com/api/v1/products/supplier_packages/439435/"},"id":{"type":"string","example":"439435"}}}}}}}}},"deprecated":false},"delete":{"summary":"Delete Package in Delivery","description":"Removes a package from a delivery. On a draft delivery the line is permanently deleted. On a submitted delivery it is not removed but reset to `quantity_delivered = 0` and `intake_reason = \"Not delivered\"`. See [Editing a submitted delivery](https://developers.apicbase.com/docs/submitting-purchase-orders#editing-a-submitted-delivery).","operationId":"delete-package-in-delivery-draft","parameters":[{"name":"delivery_id","in":"path","description":"A delivery's ID.","schema":{"type":"string"},"required":true},{"name":"delivery_package_id","in":"path","description":"The ID of a package in the delivery.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/procurement/intake_reasons/":{"get":{"summary":"Get Intake Reason Codes","description":"Returns a list of intake reasons and their descriptions.","operationId":"get-intake-reason-codes","responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"results\": [\n    {\n      \"value\": 0,\n      \"text\": \"Accepted\",\n      \"accepted\": true\n    },\n    {\n      \"value\": 1,\n      \"text\": \"Not delivered\",\n      \"accepted\": false\n    },\n    {\n      \"value\": 2,\n      \"text\": \"Canceled\",\n      \"accepted\": false\n    },\n    {\n      \"value\": 3,\n      \"text\": \"Damaged (returned)\",\n      \"accepted\": false\n    },\n    {\n      \"value\": 4,\n      \"text\": \"Quality issue (returned)\",\n      \"accepted\": false\n    },\n    {\n      \"value\": 5,\n      \"text\": \"Wrongly delivered (returned)\",\n      \"accepted\": false\n    },\n    {\n      \"value\": 6,\n      \"text\": \"Wrongly delivered (accepted)\",\n      \"accepted\": true\n    },\n    {\n      \"value\": 7,\n      \"text\": \"Wrongly ordered (returned)\",\n      \"accepted\": false\n    },\n    {\n      \"value\": 8,\n      \"text\": \"Wrongly ordered (accepted)\",\n      \"accepted\": true\n    },\n    {\n      \"value\": 9,\n      \"text\": \"Delivered too much (returned)\",\n      \"accepted\": false\n    },\n    {\n      \"value\": 10,\n      \"text\": \"Delivered too much (accepted)\",\n      \"accepted\": true\n    },\n    {\n      \"value\": 11,\n      \"text\": \"Late delivery (returned)\",\n      \"accepted\": false\n    },\n    {\n      \"value\": 12,\n      \"text\": \"Late delivery (accepted)\",\n      \"accepted\": true\n    },\n    {\n      \"value\": 13,\n      \"text\": \"Pricing issue (returned)\",\n      \"accepted\": false\n    },\n    {\n      \"value\": 14,\n      \"text\": \"Pricing issue (accepted)\",\n      \"accepted\": true\n    },\n    {\n      \"value\": 15,\n      \"text\": \"Under-delivered (returned)\",\n      \"accepted\": false\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"value":{"type":"integer","example":0,"default":0},"text":{"type":"string","example":"Accepted"},"accepted":{"type":"boolean","example":true,"default":true}}}}}}}}}},"deprecated":false}},"/procurement/supplier_deliveries/{delivery_id}/delivery_notes/":{"get":{"summary":"Get Delivery Note Files","description":"Returns a list of delivery note files attached to a given delivery.","operationId":"get-delivery-note-files","parameters":[{"name":"delivery_id","in":"path","description":"A delivery's id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"[\n  {\n    \"id\": \"480000629180007\",\n    \"file_url\": \"https://app-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/delivery_notes_LCTwvaR.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMCOYQYWQJ%2F20221202%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221202T111521Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEIr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDGV1LWNlbnRyYWwtMSJHMEUCIQD1nAvUf629M6B%2FVMf1Ne9aVFAxe7sFrIfpV479fP58%2BgIgJTpd%2BXt3MZFCFMZRlKJ17FQfKoPYzY1aXWM31Zc5G4Iq3wQIo%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARAAGgw4MDY0NDA5ODA2OTYiDKf8HuBgIMWIu4%2BkKSqzBMuODAvzX7sIDIJ9Ur5qtTqoeKaoPvJR%2BLpHUWPk2QqMiBis1Yymf59m%2BZTdakcM7VCYMga6AabJJW09fhKBURoU1YsrxGuLmDE6x7ruXgHYW%2F6RtoBRhWM5nZCJJgK%2BFCIdMMbzvAXt9wJAuubAMSceR4jGIvXV621Vl1KRdEtmLMsGxDN3cEY4oE6Gsqb7ZxU5EpZ5HyZIrOzN%2FcN44qNBMwUFvW30FhbCIFD0hfKdRrE7%2BEld%2BU7eRQiSt%2F7LAnqravIPVT%2BTQLSmwT7yhgTMnLR9%2Fa%2FNrUC6lBJ8eAvjg7Hvh%2BA0bqTU9VSj4nxJpLfKxTbaE%2FPYqt3xR0jOb5mlJ3SB8t2ohmJcDoLJhLrBpQ759fmsHwsAFbzHCzA2kS0yrJWVS9uQFK8oRj6h7SCpVbukbN4SOauud8P%2B2tXgA0ie8vSuyoiZacni%2FygwluE%2Fb3LHD9AxdgB4HxfrXcsgjZhfWgAdlIHggdGCSCEdalb0MGDRsPLg2%2FxnAWv9KevXt89D9OExDQbkiFNxA93z5gaRD%2FSUmFc%2FYwnPsi%2BJnHEErKHtLYK8rLIGf7SNbOesXDDmKrk16%2FdwXNe%2Bbe8BYAy3vs6%2FEKeBTsIOXp05JqJpFRFoXeypGFiA2Iit5%2Brnrj14dlk0RZHWtVA3DevvaEndHLXBd2dNYuT6hVftzavQgOdLkBbR3Mhaz8lU2GdkS1v%2F3K4GxB67y9zeehKzNLpnbLzuDPOfTyumOPxpqhnWMKWTp5wGOqkBdbSGse5HUaqnsxfXku%2FIQ4iikrwbiLz8c1WXAJCdofZUbJT3v1VXbf%2BGXKTp6%2FtJmPbv9d2Mig1ojVQJRuepwvSijynalnuD2mCx2j4ezpouA79OkPYtYnyZtRVjPS8C%2BcauRA6jVQJnXzGJoAtEubZEXJZqIUgbOew2aR25wFgr1CdKIGuTTGMgiWH99Wz2eaItMFPVRX4AOD6V%2BZQqmXq%2BUwvBIPJu0g%3D%3D&X-Amz-Signature=4ecfde60a6687416f86f9bbefd9e11e4116c1aec913cbe0d1ec91ee13901c727\"\n  },\n  {\n    \"id\": \"880000839160008\",\n    \"file_url\": \"https://app-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/delivery_notes_PqL6p4W.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMCOYQYWQJ%2F20221202%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221202T111521Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEIr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDGV1LWNlbnRyYWwtMSJHMEUCIQD1nAvUf629M6B%2FVMf1Ne9aVFAxe7sFrIfpV479fP58%2BgIgJTpd%2BXt3MZFCFMZRlKJ17FQfKoPYzY1aXWM31Zc5G4Iq3wQIo%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARAAGgw4MDY0NDA5ODA2OTYiDKf8HuBgIMWIu4%2BkKSqzBMuODAvzX7sIDIJ9Ur5qtTqoeKaoPvJR%2BLpHUWPk2QqMiBis1Yymf59m%2BZTdakcM7VCYMga6AabJJW09fhKBURoU1YsrxGuLmDE6x7ruXgHYW%2F6RtoBRhWM5nZCJJgK%2BFCIdMMbzvAXt9wJAuubAMSceR4jGIvXV621Vl1KRdEtmLMsGxDN3cEY4oE6Gsqb7ZxU5EpZ5HyZIrOzN%2FcN44qNBMwUFvW30FhbCIFD0hfKdRrE7%2BEld%2BU7eRQiSt%2F7LAnqravIPVT%2BTQLSmwT7yhgTMnLR9%2Fa%2FNrUC6lBJ8eAvjg7Hvh%2BA0bqTU9VSj4nxJpLfKxTbaE%2FPYqt3xR0jOb5mlJ3SB8t2ohmJcDoLJhLrBpQ759fmsHwsAFbzHCzA2kS0yrJWVS9uQFK8oRj6h7SCpVbukbN4SOauud8P%2B2tXgA0ie8vSuyoiZacni%2FygwluE%2Fb3LHD9AxdgB4HxfrXcsgjZhfWgAdlIHggdGCSCEdalb0MGDRsPLg2%2FxnAWv9KevXt89D9OExDQbkiFNxA93z5gaRD%2FSUmFc%2FYwnPsi%2BJnHEErKHtLYK8rLIGf7SNbOesXDDmKrk16%2FdwXNe%2Bbe8BYAy3vs6%2FEKeBTsIOXp05JqJpFRFoXeypGFiA2Iit5%2Brnrj14dlk0RZHWtVA3DevvaEndHLXBd2dNYuT6hVftzavQgOdLkBbR3Mhaz8lU2GdkS1v%2F3K4GxB67y9zeehKzNLpnbLzuDPOfTyumOPxpqhnWMKWTp5wGOqkBdbSGse5HUaqnsxfXku%2FIQ4iikrwbiLz8c1WXAJCdofZUbJT3v1VXbf%2BGXKTp6%2FtJmPbv9d2Mig1ojVQJRuepwvSijynalnuD2mCx2j4ezpouA79OkPYtYnyZtRVjPS8C%2BcauRA6jVQJnXzGJoAtEubZEXJZqIUgbOew2aR25wFgr1CdKIGuTTGMgiWH99Wz2eaItMFPVRX4AOD6V%2BZQqmXq%2BUwvBIPJu0g%3D%3D&X-Amz-Signature=2e5186ed20b3fb6d371f1ed9b62b1be9f903cff4effefc389dc1431d7309c895\"\n  }\n]"}},"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"480000629180007"},"file_url":{"type":"string","example":"https://app-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/delivery_notes_LCTwvaR.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMCOYQYWQJ%2F20221202%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221202T111521Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEIr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDGV1LWNlbnRyYWwtMSJHMEUCIQD1nAvUf629M6B%2FVMf1Ne9aVFAxe7sFrIfpV479fP58%2BgIgJTpd%2BXt3MZFCFMZRlKJ17FQfKoPYzY1aXWM31Zc5G4Iq3wQIo%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARAAGgw4MDY0NDA5ODA2OTYiDKf8HuBgIMWIu4%2BkKSqzBMuODAvzX7sIDIJ9Ur5qtTqoeKaoPvJR%2BLpHUWPk2QqMiBis1Yymf59m%2BZTdakcM7VCYMga6AabJJW09fhKBURoU1YsrxGuLmDE6x7ruXgHYW%2F6RtoBRhWM5nZCJJgK%2BFCIdMMbzvAXt9wJAuubAMSceR4jGIvXV621Vl1KRdEtmLMsGxDN3cEY4oE6Gsqb7ZxU5EpZ5HyZIrOzN%2FcN44qNBMwUFvW30FhbCIFD0hfKdRrE7%2BEld%2BU7eRQiSt%2F7LAnqravIPVT%2BTQLSmwT7yhgTMnLR9%2Fa%2FNrUC6lBJ8eAvjg7Hvh%2BA0bqTU9VSj4nxJpLfKxTbaE%2FPYqt3xR0jOb5mlJ3SB8t2ohmJcDoLJhLrBpQ759fmsHwsAFbzHCzA2kS0yrJWVS9uQFK8oRj6h7SCpVbukbN4SOauud8P%2B2tXgA0ie8vSuyoiZacni%2FygwluE%2Fb3LHD9AxdgB4HxfrXcsgjZhfWgAdlIHggdGCSCEdalb0MGDRsPLg2%2FxnAWv9KevXt89D9OExDQbkiFNxA93z5gaRD%2FSUmFc%2FYwnPsi%2BJnHEErKHtLYK8rLIGf7SNbOesXDDmKrk16%2FdwXNe%2Bbe8BYAy3vs6%2FEKeBTsIOXp05JqJpFRFoXeypGFiA2Iit5%2Brnrj14dlk0RZHWtVA3DevvaEndHLXBd2dNYuT6hVftzavQgOdLkBbR3Mhaz8lU2GdkS1v%2F3K4GxB67y9zeehKzNLpnbLzuDPOfTyumOPxpqhnWMKWTp5wGOqkBdbSGse5HUaqnsxfXku%2FIQ4iikrwbiLz8c1WXAJCdofZUbJT3v1VXbf%2BGXKTp6%2FtJmPbv9d2Mig1ojVQJRuepwvSijynalnuD2mCx2j4ezpouA79OkPYtYnyZtRVjPS8C%2BcauRA6jVQJnXzGJoAtEubZEXJZqIUgbOew2aR25wFgr1CdKIGuTTGMgiWH99Wz2eaItMFPVRX4AOD6V%2BZQqmXq%2BUwvBIPJu0g%3D%3D&X-Amz-Signature=4ecfde60a6687416f86f9bbefd9e11e4116c1aec913cbe0d1ec91ee13901c727"}}}}}}}},"deprecated":false},"post":{"summary":"Upload Delivery Note File","description":"Attaches a delivery note file to a delivery.","operationId":"upload-delivery-note-file","parameters":[{"name":"delivery_id","in":"path","description":"A delivery's id","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"original_file":{"type":"string","description":"The delivery note file.","format":"binary"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"480000629180007\",\n  \"file_url\": \"https://staging-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/delivery_notes_LCTwvaR.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKDFFDCL4%2F20221202%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221202T111416Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEIn%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDGV1LWNlbnRyYWwtMSJHMEUCIQDV73wmIuFG45FgUPq75eLuzaRoluwMInAit4pFF%2BmWKQIgMxpOfyfBEUBG1SVSBDUXB3X3D2521t2xH2smzsbKs08q3wQIov%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARAAGgw4MDY0NDA5ODA2OTYiDOV8ebEO2wV%2FKVgm0CqzBAcTq20M%2BPLd8yW2URXxxTRU2qMGqz5x6rawxxuk68DJeCeetZ6%2FETcgyRJ%2Fs3%2Bt7Mt1UBxBSDxvWWavvwDvwjrxCH3BdwC%2FUURS5UBS6NWncoBinEIVSTlcN%2FIiuT7v6rLbrrBo6XGBwh2deqaKRSlVx0Wc5yZCtKtMNeNV42AqLECt4s78yeTR1%2FScBi7APQOBn12AgshRpP7D9qDtVKJngwk9t1EESarlKSb4c3fspPq2pzBX2n1cU2RTr7%2BM1zIYPZZxykCCaIkzL5IQac3fRox3lowquezEDxccJu08y8qsCScVO4A1VMjUl%2BTStcEwcfsKnHgJflD5xf%2BbE3LcgyoQgsJe94%2FFTL%2BChfkvDJh%2BNVsrlM%2F6NGN4nZQk%2BktlO24qBWA6FBmAP7zXu9EfBuE3CxShdjR0uZcIira4HB4OwQjRKeoBVKmScwSO0RCafwWZbKnO2mhnJGeb07bz9EFE69OmO01J89Xrr2xA9g2WI%2FUAuOwcQMymqhcSG5Oe2zNdH4IfpJY2NNyz%2Fw7zjU5zd2RMUcUVadEs9Wj%2BrHdGQsRqHVfQRlYYZZOkCyDidNHE49q7lKNzwk2FzJzV4NhvRZvpmY%2Bz562SgHpe2nkOK3Vk0eyFFpGiRemBQMdXcjYR556Nl%2FME9fhdHOXdhLMy2NR1T3poLfRvZnFADovdO8PI3nyd8LSxYs2KbL7y5bn%2F2hdZ1mcyHeXEUf8S0DFkXbVz11ssV1wqbrGEPYjXMPj1ppwGOqkBRO%2BtLV4isxQQaNS4db%2BKhkgur47l6vYXURTmJs4MreK8xB5rSmyMmCRouzXJZCOzACTsLaVdF0A3ECa3%2F%2FR45eT%2BEjA1ptu1p0GR8sa%2Fz5ThDPU6Ufsvucetmsxh1cFzkMEnCZmfqrSaFVGCmAcUGKWSFw%2BT2E33BCetI8g4GCR3Dr%2F8CiVfg3nIg53%2F6yIafbdW0i7WVbqNjW7j9K%2FPacOQf524EHF6Fw%3D%3D&X-Amz-Signature=9841cc3602b89b79f67bf9e89a8ec42c08b6fa41cc099742f519bec329b2d5d7\"\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"480000629180007"},"file_url":{"type":"string","example":"https://staging-apicbasevault.s3.amazonaws.com/document_import_files/apicbase-home/delivery_notes_LCTwvaR.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3XQ5A2DMKDFFDCL4%2F20221202%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221202T111416Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEIn%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDGV1LWNlbnRyYWwtMSJHMEUCIQDV73wmIuFG45FgUPq75eLuzaRoluwMInAit4pFF%2BmWKQIgMxpOfyfBEUBG1SVSBDUXB3X3D2521t2xH2smzsbKs08q3wQIov%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARAAGgw4MDY0NDA5ODA2OTYiDOV8ebEO2wV%2FKVgm0CqzBAcTq20M%2BPLd8yW2URXxxTRU2qMGqz5x6rawxxuk68DJeCeetZ6%2FETcgyRJ%2Fs3%2Bt7Mt1UBxBSDxvWWavvwDvwjrxCH3BdwC%2FUURS5UBS6NWncoBinEIVSTlcN%2FIiuT7v6rLbrrBo6XGBwh2deqaKRSlVx0Wc5yZCtKtMNeNV42AqLECt4s78yeTR1%2FScBi7APQOBn12AgshRpP7D9qDtVKJngwk9t1EESarlKSb4c3fspPq2pzBX2n1cU2RTr7%2BM1zIYPZZxykCCaIkzL5IQac3fRox3lowquezEDxccJu08y8qsCScVO4A1VMjUl%2BTStcEwcfsKnHgJflD5xf%2BbE3LcgyoQgsJe94%2FFTL%2BChfkvDJh%2BNVsrlM%2F6NGN4nZQk%2BktlO24qBWA6FBmAP7zXu9EfBuE3CxShdjR0uZcIira4HB4OwQjRKeoBVKmScwSO0RCafwWZbKnO2mhnJGeb07bz9EFE69OmO01J89Xrr2xA9g2WI%2FUAuOwcQMymqhcSG5Oe2zNdH4IfpJY2NNyz%2Fw7zjU5zd2RMUcUVadEs9Wj%2BrHdGQsRqHVfQRlYYZZOkCyDidNHE49q7lKNzwk2FzJzV4NhvRZvpmY%2Bz562SgHpe2nkOK3Vk0eyFFpGiRemBQMdXcjYR556Nl%2FME9fhdHOXdhLMy2NR1T3poLfRvZnFADovdO8PI3nyd8LSxYs2KbL7y5bn%2F2hdZ1mcyHeXEUf8S0DFkXbVz11ssV1wqbrGEPYjXMPj1ppwGOqkBRO%2BtLV4isxQQaNS4db%2BKhkgur47l6vYXURTmJs4MreK8xB5rSmyMmCRouzXJZCOzACTsLaVdF0A3ECa3%2F%2FR45eT%2BEjA1ptu1p0GR8sa%2Fz5ThDPU6Ufsvucetmsxh1cFzkMEnCZmfqrSaFVGCmAcUGKWSFw%2BT2E33BCetI8g4GCR3Dr%2F8CiVfg3nIg53%2F6yIafbdW0i7WVbqNjW7j9K%2FPacOQf524EHF6Fw%3D%3D&X-Amz-Signature=9841cc3602b89b79f67bf9e89a8ec42c08b6fa41cc099742f519bec329b2d5d7"}}}}}}},"deprecated":false}},"/procurement/supplier_deliveries/{delivery_id}/delivery_notes/{delivery_note_id}/":{"delete":{"summary":"Delete Delivery Note File","description":"Deletes a delivery note file attached to a delivery.","operationId":"delete-delivery-note-file","parameters":[{"name":"delivery_id","in":"path","description":"A delivery's ID.","schema":{"type":"string"},"required":true},{"name":"delivery_note_id","in":"path","description":"The ID of a delivery note in the delivery.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/procurement/receive_external_orders/":{"post":{"summary":"Receive External Delivery","description":"Creates and submits an external delivery.","operationId":"receive-external-delivery","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["outlet","supplier"],"properties":{"outlet":{"type":"string","description":"An outlet ID."},"supplier":{"type":"string","description":"A supplier ID."},"delivery_date":{"type":"string","description":"The delivery's actual delivery date and time. Can not be in the future. Defaults to now.","format":"date-time"},"update_stock":{"type":"boolean","description":"Whether the delivered items should be added to stock. Default is False.","default":false},"purchase_order_packages":{"type":"array","items":{"properties":{"supplier_package":{"type":"string","description":"A supplier package ID."},"quantity_delivered":{"type":"number","description":"A quantity of items being being delivered.","format":"float"},"remarks":{"type":"string","description":"Any optional remarks about the delivery."},"price":{"type":"number","description":"The total price of the delivered items. Default is the package's current price.","format":"float"},"update_price":{"type":"boolean","description":"Whether the given price should also update the package's price. Default is False.","default":false},"intake_reason":{"type":"integer","description":"An optional intake reason code. Default is 0.","default":0,"format":"int32"}},"required":["supplier_package","quantity_delivered"],"type":"object"}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"273490113910000\",\n  \"order_number\": \"#20230925-1066-97\",\n  \"status\": \"DELIVERED\",\n  \"supplier\": {\n    \"id\": \"125040938170008\",\n    \"company_name\": \"Mama Pasta\",\n    \"email\": [],\n    \"url\": \"https://api.apicbase.com/api/v2/suppliers/125040938170008/\",\n    \"integrated\": true\n  },\n  \"outlet\": {\n    \"id\": \"729100266010004\",\n    \"name\": \"Antwerpen\",\n    \"url\": \"https://api.apicbase.com/api/v2/accounts/outlets/729100266010004/\"\n  },\n  \"ordered_on\": null,\n  \"owned_by\": {\n    \"id\": \"136000910080000\",\n    \"username\": \"john.smith@apicbase.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Smith\",\n    \"url\": \"https://api.apicbase.com/api/v2/accounts/users/136000910080000/\"\n  },\n  \"order_remarks\": null,\n  \"packages\": [\n    {\n      \"id\": \"474566081170001\",\n      \"stock_item\": {\n        \"id\": \"821969454150001\",\n        \"name\": \"Pasta Spaghetti Speciale (1000 g)\",\n        \"url\": \"https://api.apicbase.com/api/v2/products/stock_items/821969454150001/\"\n      },\n      \"supplier_package\": {\n        \"id\": \"821938414300001\",\n        \"supplier_article_number\": \"24070\",\n        \"theoretical_price_per_package\": \"2.89\",\n        \"url\": \"https://api.apicbase.com/api/v2/products/supplier_packages/821938414300001/\"\n      },\n      \"accounting_category\": null,\n      \"quantity_ordered\": 5,\n      \"total_theoretical_price\": \"14.45\"\n    }\n  ],\n  \"expected_delivery_date\": null,\n  \"viewed_by_supplier\": false,\n  \"viewed_by_supplier_at\": null,\n  \"fetched_by_supplier\": false,\n  \"fetched_by_supplier_at\": null,\n  \"invoice_number\": null,\n  \"invoice_status\": \"0\",\n  \"delivery_remarks\": \"\",\n  \"discount\": null,\n  \"discount_remarks\": \"\",\n  \"returnables_in\": null,\n  \"returnables_out\": null,\n  \"returnables_remarks\": \"\",\n  \"manual_price_after_discount_returnables\": null,\n  \"theoretical_price\": \"14.45\",\n  \"supplier_customer_number\": null,\n  \"delivery_closed\": true,\n  \"invoice_documents\": []\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"273490113910000"},"order_number":{"type":"string","example":"#20230925-1066-97"},"status":{"type":"string","example":"DELIVERED"},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"125040938170008"},"company_name":{"type":"string","example":"Mama Pasta"},"email":{"type":"array"},"url":{"type":"string","example":"https://api.apicbase.com/api/v2/suppliers/125040938170008/"},"integrated":{"type":"boolean","example":true,"default":true}}},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"729100266010004"},"name":{"type":"string","example":"Antwerpen"},"url":{"type":"string","example":"https://api.apicbase.com/api/v2/accounts/outlets/729100266010004/"}}},"ordered_on":{},"owned_by":{"type":"object","properties":{"id":{"type":"string","example":"136000910080000"},"username":{"type":"string","example":"john.smith@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Smith"},"url":{"type":"string","example":"https://api.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"order_remarks":{},"packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"474566081170001"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"821969454150001"},"name":{"type":"string","example":"Pasta Spaghetti Speciale (1000 g)"},"url":{"type":"string","example":"https://api.apicbase.com/api/v2/products/stock_items/821969454150001/"}}},"supplier_package":{"type":"object","properties":{"id":{"type":"string","example":"821938414300001"},"supplier_article_number":{"type":"string","example":"24070"},"theoretical_price_per_package":{"type":"string","example":"2.89"},"url":{"type":"string","example":"https://api.apicbase.com/api/v2/products/supplier_packages/821938414300001/"}}},"accounting_category":{},"quantity_ordered":{"type":"integer","example":5,"default":0},"total_theoretical_price":{"type":"string","example":"14.45"}}}},"expected_delivery_date":{},"viewed_by_supplier":{"type":"boolean","example":false,"default":true},"viewed_by_supplier_at":{},"fetched_by_supplier":{"type":"boolean","example":false,"default":true},"fetched_by_supplier_at":{},"invoice_number":{},"invoice_status":{"type":"string","example":"0"},"delivery_remarks":{"type":"string","example":""},"discount":{},"discount_remarks":{"type":"string","example":""},"returnables_in":{},"returnables_out":{},"returnables_remarks":{"type":"string","example":""},"manual_price_after_discount_returnables":{},"theoretical_price":{"type":"string","example":"14.45"},"supplier_customer_number":{},"delivery_closed":{"type":"boolean","example":true,"default":true},"invoice_documents":{"type":"array"}}}}}}},"deprecated":false}},"/invoices/":{"post":{"summary":"Create Invoice Record","description":"Creates a record for an invoice.","operationId":"create-invoice","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["outlet","supplier","invoice_number","purchase_orders","invoice_date","total_amount"],"properties":{"outlet":{"type":"string","description":"The ID of the outlet."},"supplier":{"type":"string","description":"The ID of the supplier."},"invoice_number":{"type":"string","description":"The invoice number."},"purchase_orders":{"type":"array","description":"List of IDs of purchase orders","items":{"type":"string"}},"invoice_date":{"type":"string","description":"The date of the invoice.","format":"date"},"due_date":{"type":"string","description":"The invoice's due date.","format":"date"},"total_amount":{"type":"number","description":"The total amount invoiced.","format":"float"},"is_credit_note":{"type":"boolean","default":false}}},"examples":{"Request Example":{"value":{"outlet":"529100044450000","supplier":"825110696650006","invoice_number":"0101170","purchase_orders":["673490305980006","473490725920008"],"invoice_date":"2024-01-02","due_date":"2024-01-03","total_amount":100.5,"is_credit_note":false}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"id\": \"783000912540008\",\n\t\"outlet\": {\n\t\t\"id\": \"621300052780000\",\n\t\t\"name\": \"outlet-9876\"\n\t},\n\t\"supplier\": {\n\t\t\"id\": \"932410823750004\",\n\t\t\"name\": \"company-name-54321\",\n\t\t\"internal_supplier_id\": \"SUP-0042\"\n\t},\n\t\"invoice_number\": \"0987654\",\n\t\"purchase_orders\": [\n\t\t{\n\t\t\t\"id\": \"564380912570003\",\n\t\t\t\"order_number\": \"#20240712-9876-42\",\n\t\t\t\"ordered_on\": \"2024-07-12T14:25:18.698528+02:00\",\n\t\t\t\"delivery_date\": \"2024-07-15T10:28:15.320855+02:00\",\n\t\t\t\"ordered_by\": {\n\t\t\t\t\"id\": \"248000534080000\",\n\t\t\t\t\"name\": \"Example User\"\n\t\t\t},\n\t\t\t\"total_amount\": 0.0,\n\t\t\t\"total_amount_sentence\": \"€ 0.00\",\n\t\t\t\"supplier\": {\n\t\t\t\t\"id\": \"932410823750004\",\n\t\t\t\t\"name\": \"company-name-54321\"\n\t\t\t},\n\t\t\t\"deliveries\": [\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"888870624590001\",\n\t\t\t\t\t\"delivery_date\": \"2024-07-15T10:28:15.320855+02:00\",\n\t\t\t\t\t\"received_by\": {\n\t\t\t\t\t\t\"id\": \"248000534080000\",\n\t\t\t\t\t\t\"name\": \"Example User\"\n\t\t\t\t\t},\n\t\t\t\t\t\"total_amount\": 0.0,\n\t\t\t\t\t\"total_amount_sentence\": \"€ 0.00\",\n\t\t\t\t\t\"files\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"url\": \"/media/document_import_files/example-company/document_3wErTyU.jpg\",\n\t\t\t\t\t\t\t\"name\": \"document_import_files/example-company/document_3wErTyU.jpg\",\n\t\t\t\t\t\t\t\"short_name\": \"document_3wErTyU.jpg\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"delivery_closed\": false,\n\t\t\t\"url\": \"http://example.com:8000/orders/delivered/12345/edit\"\n\t\t},\n\t\t{\n\t\t\t\"id\": \"763490305980007\",\n\t\t\t\"order_number\": \"#20240715-9876-18\",\n\t\t\t\"ordered_on\": \"2024-07-15T16:22:08.335608+02:00\",\n\t\t\t\"delivery_date\": \"2024-07-18T09:41:37.982322+02:00\",\n\t\t\t\"ordered_by\": {\n\t\t\t\t\"id\": \"248000534080000\",\n\t\t\t\t\"name\": \"Example User\"\n\t\t\t},\n\t\t\t\"total_amount\": 0.0,\n\t\t\t\"total_amount_sentence\": \"€ 0.00\",\n\t\t\t\"supplier\": {\n\t\t\t\t\"id\": \"932410823750004\",\n\t\t\t\t\"name\": \"company-name-54321\"\n\t\t\t},\n\t\t\t\"deliveries\": [\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"888760704830002\",\n\t\t\t\t\t\"delivery_date\": \"2024-07-18T09:41:37.982322+02:00\",\n\t\t\t\t\t\"received_by\": {\n\t\t\t\t\t\t\"id\": \"248000534080000\",\n\t\t\t\t\t\t\"name\": \"Example User\"\n\t\t\t\t\t},\n\t\t\t\t\t\"total_amount\": 0.0,\n\t\t\t\t\t\"total_amount_sentence\": \"€ 0.00\",\n\t\t\t\t\t\"files\": []\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"delivery_closed\": false,\n\t\t\t\"url\": \"http://example.com:8000/orders/delivered/12346/edit\"\n\t\t}\n\t],\n\t\"total_amount\": \"175.25000\",\n\t\"total_amount_sentence\": \"€ 175.25\",\n\t\"purchase_orders_total_amount\": \"12.00000\",\n\t\"purchase_orders_total_amount_sentence\": \"€ 12.00\",\n\t\"total_amount_difference\": \"11.00000\",\n\t\"total_amount_difference_sentence\": \"€ 11.00\",\n\t\"total_amount_difference_percentage\": \"91.67\",\n\t\"invoice_date\": \"2024-03-15\",\n\t\"due_date\": \"2024-04-15\",\n\t\"created_at\": \"2025-04-10T11:26:47.876442+01:00\",\n\t\"updated_at\": \"2025-04-10T11:26:47.885919+01:00\",\n\t\"created_by\": {\n\t\t\"id\": \"248000534080000\",\n\t\t\"name\": \"Example User\"\n\t},\n\t\"processing_status\": \"MANUAL\",\n\t\"approval_status\": \"RECEIVED\",\n\t\"approved_by\": null,\n\t\"is_credit_note\": false,\n\t\"files\": [],\n\t\"comments\": [],\n\t\"history\": [\n\t\t{\n\t\t\t\"created_at\": \"2025-04-10T10:26:47.885698+00:00\",\n\t\t\t\"created_by\": {\n\t\t\t\t\"id\": \"248000534080000\",\n\t\t\t\t\"name\": \"Example User\"\n\t\t\t},\n\t\t\t\"params\": {},\n\t\t\t\"type\": \"INVOICE_CREATED\"\n\t\t}\n\t],\n\t\"processing_error\": null\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"783000912540008"},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"621300052780000"},"name":{"type":"string","example":"outlet-9876"}}},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"932410823750004"},"name":{"type":"string","example":"company-name-54321"},"internal_supplier_id":{"type":"string","nullable":true,"description":"Your own code for the supplier, as set on the supplier. Returned as stored: `null` or an empty string when it is not set.","example":"SUP-0042"}}},"invoice_number":{"type":"string","example":"0987654"},"purchase_orders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"564380912570003"},"order_number":{"type":"string","example":"#20240712-9876-42"},"ordered_on":{"type":"string","example":"2024-07-12T14:25:18.698528+02:00"},"delivery_date":{"type":"string","example":"2024-07-15T10:28:15.320855+02:00"},"ordered_by":{"type":"object","properties":{"id":{"type":"string","example":"248000534080000"},"name":{"type":"string","example":"Example User"}}},"total_amount":{"type":"integer","example":0,"default":0},"total_amount_sentence":{"type":"string","example":"€ 0.00"},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"932410823750004"},"name":{"type":"string","example":"company-name-54321"}}},"deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"888870624590001"},"delivery_date":{"type":"string","example":"2024-07-15T10:28:15.320855+02:00"},"received_by":{"type":"object","properties":{"id":{"type":"string","example":"248000534080000"},"name":{"type":"string","example":"Example User"}}},"total_amount":{"type":"integer","example":0,"default":0},"total_amount_sentence":{"type":"string","example":"€ 0.00"},"files":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"/media/document_import_files/example-company/document_3wErTyU.jpg"},"name":{"type":"string","example":"document_import_files/example-company/document_3wErTyU.jpg"},"short_name":{"type":"string","example":"document_3wErTyU.jpg"}}}}}}},"delivery_closed":{"type":"boolean"},"url":{"type":"string","example":"http://example.com:8000/orders/delivered/12345/edit"}}}},"total_amount":{"type":"string","example":"175.25000"},"total_amount_sentence":{"type":"string","example":"€ 175.25"},"purchase_orders_total_amount":{"type":"string","description":"Sum of linked purchase orders amounts.","example":"12.00000"},"purchase_orders_total_amount_sentence":{"type":"string","description":"Sum of linked purchase orders amounts with currency symbol.","example":"€ 12.00"},"total_amount_difference":{"type":"string","nullable":true,"description":"Difference between invoice total and purchase orders total.","example":"11.00000"},"total_amount_difference_sentence":{"type":"string","nullable":true,"description":"Difference between invoice total and purchase orders total with currency symbol.","example":"€ 11.00"},"total_amount_difference_percentage":{"type":"string","nullable":true,"description":"Percentage difference between invoice total and purchase orders total.","example":"91.67"},"invoice_date":{"type":"string","example":"2024-03-15"},"due_date":{"type":"string","example":"2024-04-15"},"created_at":{"type":"string","example":"2025-04-10T11:26:47.876442+01:00"},"updated_at":{"type":"string","example":"2025-04-10T11:26:47.885919+01:00"},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"248000534080000"},"name":{"type":"string","example":"Example User"}}},"processing_status":{"type":"string","example":"MANUAL"},"approval_status":{"type":"string","example":"RECEIVED"},"approved_by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"248000534080000"},"name":{"type":"string","example":"Example User"}}},"is_credit_note":{"type":"boolean","example":false,"default":true},"files":{"type":"array"},"comments":{"type":"array"},"history":{"type":"array","items":{"type":"object","properties":{"created_at":{"type":"string","example":"2025-04-10T10:26:47.885698+00:00"},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"248000534080000"},"name":{"type":"string","example":"Example User"}}},"params":{"type":"object","properties":{}},"type":{"type":"string","example":"INVOICE_CREATED"}}}},"processing_error":{}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"409":{"description":"Conflict — an invoice with the same number already exists for this supplier in the outlet.","content":{"application/json":{"examples":{"Result":{"value":["INVOICE_NUMBER_DUPLICATED_EXCEPTION","An invoice with the same invoice number already exists for this supplier.",{"invoice_number":"0987654","supplier":"company-name-54321"}]}},"schema":{"type":"array","items":{},"example":["INVOICE_NUMBER_DUPLICATED_EXCEPTION","An invoice with the same invoice number already exists for this supplier.",{"invoice_number":"0987654","supplier":"company-name-54321"}]}}}}},"deprecated":false},"get":{"summary":"Get Invoices","description":"Returns a list of invoice records in a library.","operationId":"get-invoices","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32","default":1}},{"name":"page_size","in":"query","description":"The number of items to return per page. The maximum is 200.","schema":{"type":"integer","format":"int32","default":10}},{"name":"ordering","in":"query","description":"Allow to order the items in the result. The possible values are: invoice_date, due_date, supplier_name, total_amount, created_at, invoice_number, processing_status, approval_status. You can also reverse order by prepending \"-\" to the value.","schema":{"type":"string"}},{"name":"search","in":"query","description":"Allow to search for items. The inputted value will be searched in the following fields: Supplier name, invoice number, purchase order number.","schema":{"type":"string"}},{"name":"outlet_ids","in":"query","description":"A list of outlet IDs to filter the items by.","schema":{"type":"string"}},{"name":"supplier_ids","in":"query","description":"A list of supplier IDs to filter the items by.","schema":{"type":"string"}},{"name":"processing_statuses","in":"query","description":"A list of processing statuses to filter the items by.","schema":{"type":"string"}},{"name":"approval_statuses","in":"query","description":"A list of approval statuses to filter the items by.","schema":{"type":"string"}},{"name":"approved_by","in":"query","description":"A list of user IDs that approved the invoice to filter the items by.","schema":{"type":"string"}},{"name":"created_by","in":"query","description":"A list of user IDs that created the invoice to filter the items by.","schema":{"type":"string"}},{"name":"invoice_type","in":"query","description":"A list of invoice types to filter the items by.","schema":{"type":"string"}},{"name":"bulk_importation_id","in":"query","description":"For orders generated by a bulk import, this is the ID of the import request that generated them.","schema":{"type":"string"}},{"name":"invoice_date","in":"query","description":"Filter by exact invoice date (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"invoice_date__gt","in":"query","description":"Filter invoices with invoice_date greater than specified date.","schema":{"type":"string","format":"date"}},{"name":"invoice_date__lt","in":"query","description":"Filter invoices with invoice_date less than specified date.","schema":{"type":"string","format":"date"}},{"name":"due_date","in":"query","description":"Filter by exact due date (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"due_date__gt","in":"query","description":"Filter invoices with due_date greater than specified date.","schema":{"type":"string","format":"date"}},{"name":"due_date__lt","in":"query","description":"Filter invoices with due_date less than specified date.","schema":{"type":"string","format":"date"}},{"name":"created_at","in":"query","description":"Filter by exact creation date (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"created_at__gt","in":"query","description":"Filter invoices created after specified date.","schema":{"type":"string","format":"date"}},{"name":"created_at__lt","in":"query","description":"Filter invoices created before specified date.","schema":{"type":"string","format":"date"}},{"name":"updated_at","in":"query","description":"Filter by exact update date (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"updated_at__gt","in":"query","description":"Filter invoices updated after specified date.","schema":{"type":"string","format":"date"}},{"name":"updated_at__lt","in":"query","description":"Filter invoices updated before specified date.","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"count\": 425,\n\t\"next\": \"http://example.com/api/v2/invoices/?page=2\",\n\t\"previous\": null,\n\t\"results\": [\n\t\t{\n\t\t\t\"id\": \"123456789012345\",\n\t\t\t\"outlet\": {\n\t\t\t\t\"id\": \"987654321098765\",\n\t\t\t\t\"name\": \"outlet-abc\"\n\t\t\t},\n\t\t\t\"supplier\": {\n\t\t\t\t\"id\": \"456789012345678\",\n\t\t\t\t\"name\": \"acme-supplies\",\n\t\t\t\t\"internal_supplier_id\": \"SUP-0042\"\n\t\t\t},\n\t\t\t\"invoice_number\": null,\n\t\t\t\"purchase_orders\": [\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"135792468024680\",\n\t\t\t\t\t\"order_number\": \"#20240512-abc-42\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"246813579135792\",\n\t\t\t\t\t\"order_number\": \"#20240510-abc-40\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"total_amount\": null,\n\t\t\t\"total_amount_sentence\": null,\n\t\t\t\"total_amount_net\": null,\n\t\t\t\"total_amount_net_sentence\": null,\n\t\t\t\"total_amount_gross\": null,\n\t\t\t\"total_amount_gross_sentence\": null,\n\t\t\t\"extracted_amount_net\": null,\n\t\t\t\"extracted_amount_net_sentence\": null,\n\t\t\t\"extracted_amount_gross\": null,\n\t\t\t\"extracted_amount_gross_sentence\": null,\n\t\t\t\"total_tax_sentence\": null,\n\t\t\t\"invoice_date\": null,\n\t\t\t\"due_date\": null,\n\t\t\t\"created_at\": \"2025-02-15T14:20:31.555307+01:00\",\n\t\t\t\"updated_at\": \"2025-02-15T14:20:31.555329+01:00\",\n\t\t\t\"created_by\": {\n\t\t\t\t\"id\": \"998877665544332\",\n\t\t\t\t\"name\": \"SYSTEM\"\n\t\t\t},\n\t\t\t\"processing_status\": \"ERROR\",\n\t\t\t\"approval_status\": \"RECEIVED\",\n\t\t\t\"approved_by\": null,\n\t\t\t\"is_credit_note\": false,\n\t\t\t\"line_level_invoices_visible\": true\n\t\t},\n\t\t{\n\t\t\t\"id\": \"987654321098765\",\n\t\t\t\"outlet\": {\n\t\t\t\t\"id\": \"987654321098765\",\n\t\t\t\t\"name\": \"outlet-abc\"\n\t\t\t},\n\t\t\t\"supplier\": {\n\t\t\t\t\"id\": \"456789012345678\",\n\t\t\t\t\"name\": \"acme-supplies\",\n\t\t\t\t\"internal_supplier_id\": \"SUP-0042\"\n\t\t\t},\n\t\t\t\"invoice_number\": null,\n\t\t\t\"purchase_orders\": [\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"135792468024680\",\n\t\t\t\t\t\"order_number\": \"#20240512-abc-42\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"246813579135792\",\n\t\t\t\t\t\"order_number\": \"#20240510-abc-40\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"total_amount\": \"325.75000\",\n\t\t\t\"total_amount_sentence\": \"€ 325.75\",\n\t\t\t\"total_amount_net\": \"307.31000\",\n\t\t\t\"total_amount_net_sentence\": \"€ 307.31\",\n\t\t\t\"total_amount_gross\": \"325.75000\",\n\t\t\t\"total_amount_gross_sentence\": \"€ 325.75\",\n\t\t\t\"extracted_amount_net\": \"307.31000\",\n\t\t\t\"extracted_amount_net_sentence\": \"€ 307.31\",\n\t\t\t\"extracted_amount_gross\": \"325.75000\",\n\t\t\t\"extracted_amount_gross_sentence\": \"€ 325.75\",\n\t\t\t\"total_tax_sentence\": \"€ 18.44\",\n\t\t\t\"purchase_orders_total_amount\": \"12.00000\",\n\t\t\t\"purchase_orders_total_amount_sentence\": \"€ 12.00\",\n\t\t\t\"total_amount_difference\": \"11.00000\",\n\t\t\t\"total_amount_difference_sentence\": \"€ 11.00\",\n\t\t\t\"total_amount_difference_percentage\": \"91.67\",\n\t\t\t\"invoice_date\": \"2024-06-18\",\n\t\t\t\"due_date\": \"2024-07-18\",\n\t\t\t\"created_at\": \"2025-01-25T10:35:14.895902+01:00\",\n\t\t\t\"updated_at\": \"2025-01-25T10:35:22.010914+01:00\",\n\t\t\t\"created_by\": {\n\t\t\t\t\"id\": \"998877665544332\",\n\t\t\t\t\"name\": \"SYSTEM\"\n\t\t\t},\n\t\t\t\"processing_status\": \"INCOMPLETE\",\n\t\t\t\"approval_status\": \"RECEIVED\",\n\t\t\t\"approved_by\": null,\n\t\t\t\"is_credit_note\": false,\n\t\t\t\"line_level_invoices_visible\": true\n\t\t},\n\t\t{\n\t\t\t\"id\": \"246813579135792\",\n\t\t\t\"outlet\": {\n\t\t\t\t\"id\": \"987654321098765\",\n\t\t\t\t\"name\": \"outlet-abc\"\n\t\t\t},\n\t\t\t\"supplier\": {\n\t\t\t\t\"id\": \"456789012345678\",\n\t\t\t\t\"name\": \"acme-supplies\",\n\t\t\t\t\"internal_supplier_id\": \"SUP-0042\"\n\t\t\t},\n\t\t\t\"invoice_number\": null,\n\t\t\t\"purchase_orders\": [\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"135792468024680\",\n\t\t\t\t\t\"order_number\": \"#20240512-abc-42\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"246813579135792\",\n\t\t\t\t\t\"order_number\": \"#20240510-abc-40\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"total_amount\": null,\n\t\t\t\"total_amount_sentence\": null,\n\t\t\t\"total_amount_net\": null,\n\t\t\t\"total_amount_net_sentence\": null,\n\t\t\t\"total_amount_gross\": null,\n\t\t\t\"total_amount_gross_sentence\": null,\n\t\t\t\"extracted_amount_net\": null,\n\t\t\t\"extracted_amount_net_sentence\": null,\n\t\t\t\"extracted_amount_gross\": null,\n\t\t\t\"extracted_amount_gross_sentence\": null,\n\t\t\t\"total_tax_sentence\": null,\n\t\t\t\"invoice_date\": null,\n\t\t\t\"due_date\": null,\n\t\t\t\"created_at\": \"2025-01-10T09:19:13.425767+01:00\",\n\t\t\t\"updated_at\": \"2025-01-10T09:19:13.425783+01:00\",\n\t\t\t\"created_by\": {\n\t\t\t\t\"id\": \"998877665544332\",\n\t\t\t\t\"name\": \"SYSTEM\"\n\t\t\t},\n\t\t\t\"processing_status\": \"TO_BE_PROCESSED\",\n\t\t\t\"approval_status\": \"RECEIVED\",\n\t\t\t\"approved_by\": null,\n\t\t\t\"is_credit_note\": false,\n\t\t\t\"line_level_invoices_visible\": true\n\t\t},\n\t\t{\n\t\t\t\"id\": \"135792468024680\",\n\t\t\t\"outlet\": {\n\t\t\t\t\"id\": \"987654321098765\",\n\t\t\t\t\"name\": \"outlet-abc\"\n\t\t\t},\n\t\t\t\"supplier\": null,\n\t\t\t\"invoice_number\": null,\n\t\t\t\"purchase_orders\": [],\n\t\t\t\"total_amount\": \"478.50000\",\n\t\t\t\"total_amount_sentence\": \"€ 478.50\",\n\t\t\t\"total_amount_net\": \"451.42000\",\n\t\t\t\"total_amount_net_sentence\": \"€ 451.42\",\n\t\t\t\"total_amount_gross\": \"478.50000\",\n\t\t\t\"total_amount_gross_sentence\": \"€ 478.50\",\n\t\t\t\"extracted_amount_net\": \"451.42000\",\n\t\t\t\"extracted_amount_net_sentence\": \"€ 451.42\",\n\t\t\t\"extracted_amount_gross\": \"478.50000\",\n\t\t\t\"extracted_amount_gross_sentence\": \"€ 478.50\",\n\t\t\t\"total_tax_sentence\": \"€ 27.08\",\n\t\t\t\"invoice_date\": \"2023-10-05\",\n\t\t\t\"due_date\": \"2023-11-04\",\n\t\t\t\"created_at\": \"2025-01-05T11:15:04.035136+01:00\",\n\t\t\t\"updated_at\": \"2025-01-05T11:15:08.892103+01:00\",\n\t\t\t\"created_by\": {\n\t\t\t\t\"id\": \"998877665544332\",\n\t\t\t\t\"name\": \"SYSTEM\"\n\t\t\t},\n\t\t\t\"processing_status\": \"INCOMPLETE\",\n\t\t\t\"approval_status\": \"RECEIVED\",\n\t\t\t\"approved_by\": null,\n\t\t\t\"is_credit_note\": false,\n\t\t\t\"line_level_invoices_visible\": true\n\t\t},\n\t\t{\n\t\t\t\"id\": \"112233445566778\",\n\t\t\t\"outlet\": null,\n\t\t\t\"supplier\": null,\n\t\t\t\"invoice_number\": null,\n\t\t\t\"purchase_orders\": [],\n\t\t\t\"total_amount\": null,\n\t\t\t\"total_amount_sentence\": null,\n\t\t\t\"total_amount_net\": null,\n\t\t\t\"total_amount_net_sentence\": null,\n\t\t\t\"total_amount_gross\": null,\n\t\t\t\"total_amount_gross_sentence\": null,\n\t\t\t\"extracted_amount_net\": null,\n\t\t\t\"extracted_amount_net_sentence\": null,\n\t\t\t\"extracted_amount_gross\": null,\n\t\t\t\"extracted_amount_gross_sentence\": null,\n\t\t\t\"total_tax_sentence\": null,\n\t\t\t\"invoice_date\": null,\n\t\t\t\"due_date\": null,\n\t\t\t\"created_at\": \"2024-12-15T09:04:51.663755+01:00\",\n\t\t\t\"updated_at\": \"2024-12-15T09:04:51.663770+01:00\",\n\t\t\t\"created_by\": {\n\t\t\t\t\"id\": \"998877665544332\",\n\t\t\t\t\"name\": \"SYSTEM\"\n\t\t\t},\n\t\t\t\"processing_status\": \"TO_BE_PROCESSED\",\n\t\t\t\"approval_status\": \"RECEIVED\",\n\t\t\t\"approved_by\": null,\n\t\t\t\"is_credit_note\": false,\n\t\t\t\"line_level_invoices_visible\": true\n\t\t},\n\t\t{\n\t\t\t\"id\": \"998877665544332\",\n\t\t\t\"outlet\": null,\n\t\t\t\"supplier\": null,\n\t\t\t\"invoice_number\": null,\n\t\t\t\"purchase_orders\": [],\n\t\t\t\"total_amount\": \"3527.85000\",\n\t\t\t\"total_amount_sentence\": \"€ 3527.85\",\n\t\t\t\"total_amount_net\": null,\n\t\t\t\"total_amount_net_sentence\": null,\n\t\t\t\"total_amount_gross\": null,\n\t\t\t\"total_amount_gross_sentence\": null,\n\t\t\t\"extracted_amount_net\": null,\n\t\t\t\"extracted_amount_net_sentence\": null,\n\t\t\t\"extracted_amount_gross\": null,\n\t\t\t\"extracted_amount_gross_sentence\": null,\n\t\t\t\"total_tax_sentence\": null,\n\t\t\t\"invoice_date\": null,\n\t\t\t\"due_date\": null,\n\t\t\t\"created_at\": \"2024-12-15T12:20:35.337309+01:00\",\n\t\t\t\"updated_at\": \"2024-12-15T12:20:40.240347+01:00\",\n\t\t\t\"created_by\": {\n\t\t\t\t\"id\": \"998877665544332\",\n\t\t\t\t\"name\": \"SYSTEM\"\n\t\t\t},\n\t\t\t\"processing_status\": \"TO_BE_PROCESSED\",\n\t\t\t\"approval_status\": \"RECEIVED\",\n\t\t\t\"approved_by\": null,\n\t\t\t\"is_credit_note\": false,\n\t\t\t\"line_level_invoices_visible\": true\n\t\t},\n\t\t{\n\t\t\t\"id\": \"223344556677889\",\n\t\t\t\"outlet\": {\n\t\t\t\t\"id\": \"987654321098765\",\n\t\t\t\t\"name\": \"outlet-abc\"\n\t\t\t},\n\t\t\t\"supplier\": {\n\t\t\t\t\"id\": \"456789012345678\",\n\t\t\t\t\"name\": \"acme-supplies\",\n\t\t\t\t\"internal_supplier_id\": \"SUP-0042\"\n\t\t\t},\n\t\t\t\"invoice_number\": null,\n\t\t\t\"purchase_orders\": [\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"135792468024680\",\n\t\t\t\t\t\"order_number\": \"#20240512-abc-42\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"246813579135792\",\n\t\t\t\t\t\"order_number\": \"#20240510-abc-40\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"total_amount\": \"325.75000\",\n\t\t\t\"total_amount_sentence\": \"€ 325.75\",\n\t\t\t\"total_amount_net\": \"307.31000\",\n\t\t\t\"total_amount_net_sentence\": \"€ 307.31\",\n\t\t\t\"total_amount_gross\": \"325.75000\",\n\t\t\t\"total_amount_gross_sentence\": \"€ 325.75\",\n\t\t\t\"extracted_amount_net\": \"307.31000\",\n\t\t\t\"extracted_amount_net_sentence\": \"€ 307.31\",\n\t\t\t\"extracted_amount_gross\": \"325.75000\",\n\t\t\t\"extracted_amount_gross_sentence\": \"€ 325.75\",\n\t\t\t\"total_tax_sentence\": \"€ 18.44\",\n\t\t\t\"purchase_orders_total_amount\": \"12.00000\",\n\t\t\t\"purchase_orders_total_amount_sentence\": \"€ 12.00\",\n\t\t\t\"total_amount_difference\": \"11.00000\",\n\t\t\t\"total_amount_difference_sentence\": \"€ 11.00\",\n\t\t\t\"total_amount_difference_percentage\": \"91.67\",\n\t\t\t\"invoice_date\": \"2024-06-18\",\n\t\t\t\"due_date\": \"2024-07-18\",\n\t\t\t\"created_at\": \"2025-01-20T08:59:15.970072+01:00\",\n\t\t\t\"updated_at\": \"2025-01-20T08:59:21.593415+01:00\",\n\t\t\t\"created_by\": {\n\t\t\t\t\"id\": \"998877665544332\",\n\t\t\t\t\"name\": \"SYSTEM\"\n\t\t\t},\n\t\t\t\"processing_status\": \"INCOMPLETE\",\n\t\t\t\"approval_status\": \"RECEIVED\",\n\t\t\t\"approved_by\": null,\n\t\t\t\"is_credit_note\": false,\n\t\t\t\"line_level_invoices_visible\": true\n\t\t},\n\t\t{\n\t\t\t\"id\": \"334455667788990\",\n\t\t\t\"outlet\": {\n\t\t\t\t\"id\": \"987654321098765\",\n\t\t\t\t\"name\": \"outlet-abc\"\n\t\t\t},\n\t\t\t\"supplier\": {\n\t\t\t\t\"id\": \"456789012345678\",\n\t\t\t\t\"name\": \"acme-supplies\",\n\t\t\t\t\"internal_supplier_id\": \"SUP-0042\"\n\t\t\t},\n\t\t\t\"invoice_number\": null,\n\t\t\t\"purchase_orders\": [\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"135792468024680\",\n\t\t\t\t\t\"order_number\": \"#20240512-abc-42\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"246813579135792\",\n\t\t\t\t\t\"order_number\": \"#20240510-abc-40\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"total_amount\": \"325.75000\",\n\t\t\t\"total_amount_sentence\": \"€ 325.75\",\n\t\t\t\"total_amount_net\": \"307.31000\",\n\t\t\t\"total_amount_net_sentence\": \"€ 307.31\",\n\t\t\t\"total_amount_gross\": \"325.75000\",\n\t\t\t\"total_amount_gross_sentence\": \"€ 325.75\",\n\t\t\t\"extracted_amount_net\": \"307.31000\",\n\t\t\t\"extracted_amount_net_sentence\": \"€ 307.31\",\n\t\t\t\"extracted_amount_gross\": \"325.75000\",\n\t\t\t\"extracted_amount_gross_sentence\": \"€ 325.75\",\n\t\t\t\"total_tax_sentence\": \"€ 18.44\",\n\t\t\t\"purchase_orders_total_amount\": \"12.00000\",\n\t\t\t\"purchase_orders_total_amount_sentence\": \"€ 12.00\",\n\t\t\t\"total_amount_difference\": \"11.00000\",\n\t\t\t\"total_amount_difference_sentence\": \"€ 11.00\",\n\t\t\t\"total_amount_difference_percentage\": \"91.67\",\n\t\t\t\"invoice_date\": \"2024-06-18\",\n\t\t\t\"due_date\": \"2024-07-18\",\n\t\t\t\"created_at\": \"2025-01-18T14:34:02.358590+01:00\",\n\t\t\t\"updated_at\": \"2025-01-18T14:34:08.112964+01:00\",\n\t\t\t\"created_by\": {\n\t\t\t\t\"id\": \"998877665544332\",\n\t\t\t\t\"name\": \"SYSTEM\"\n\t\t\t},\n\t\t\t\"processing_status\": \"INCOMPLETE\",\n\t\t\t\"approval_status\": \"RECEIVED\",\n\t\t\t\"approved_by\": null,\n\t\t\t\"is_credit_note\": false,\n\t\t\t\"line_level_invoices_visible\": true\n\t\t},\n\t\t{\n\t\t\t\"id\": \"445566778899001\",\n\t\t\t\"outlet\": null,\n\t\t\t\"supplier\": null,\n\t\t\t\"invoice_number\": null,\n\t\t\t\"purchase_orders\": [],\n\t\t\t\"total_amount\": null,\n\t\t\t\"total_amount_sentence\": null,\n\t\t\t\"total_amount_net\": null,\n\t\t\t\"total_amount_net_sentence\": null,\n\t\t\t\"total_amount_gross\": null,\n\t\t\t\"total_amount_gross_sentence\": null,\n\t\t\t\"extracted_amount_net\": null,\n\t\t\t\"extracted_amount_net_sentence\": null,\n\t\t\t\"extracted_amount_gross\": null,\n\t\t\t\"extracted_amount_gross_sentence\": null,\n\t\t\t\"total_tax_sentence\": null,\n\t\t\t\"invoice_date\": null,\n\t\t\t\"due_date\": null,\n\t\t\t\"created_at\": \"2024-12-10T15:25:26.839056+01:00\",\n\t\t\t\"updated_at\": \"2024-12-10T15:25:26.839072+01:00\",\n\t\t\t\"created_by\": {\n\t\t\t\t\"id\": \"998877665544332\",\n\t\t\t\t\"name\": \"SYSTEM\"\n\t\t\t},\n\t\t\t\"processing_status\": \"ERROR\",\n\t\t\t\"approval_status\": \"RECEIVED\",\n\t\t\t\"approved_by\": null,\n\t\t\t\"is_credit_note\": false,\n\t\t\t\"line_level_invoices_visible\": true\n\t\t},\n\t\t{\n\t\t\t\"id\": \"556677889900112\",\n\t\t\t\"outlet\": null,\n\t\t\t\"supplier\": null,\n\t\t\t\"invoice_number\": null,\n\t\t\t\"purchase_orders\": [],\n\t\t\t\"total_amount\": null,\n\t\t\t\"total_amount_sentence\": null,\n\t\t\t\"total_amount_net\": null,\n\t\t\t\"total_amount_net_sentence\": null,\n\t\t\t\"total_amount_gross\": null,\n\t\t\t\"total_amount_gross_sentence\": null,\n\t\t\t\"extracted_amount_net\": null,\n\t\t\t\"extracted_amount_net_sentence\": null,\n\t\t\t\"extracted_amount_gross\": null,\n\t\t\t\"extracted_amount_gross_sentence\": null,\n\t\t\t\"total_tax_sentence\": null,\n\t\t\t\"invoice_date\": null,\n\t\t\t\"due_date\": null,\n\t\t\t\"created_at\": \"2024-12-22T13:45:36.655527+01:00\",\n\t\t\t\"updated_at\": \"2024-12-22T13:45:36.655536+01:00\",\n\t\t\t\"created_by\": {\n\t\t\t\t\"id\": \"998877665544332\",\n\t\t\t\t\"name\": \"SYSTEM\"\n\t\t\t},\n\t\t\t\"processing_status\": \"ERROR\",\n\t\t\t\"approval_status\": \"RECEIVED\",\n\t\t\t\"approved_by\": null,\n\t\t\t\"is_credit_note\": false,\n\t\t\t\"line_level_invoices_visible\": true\n\t\t}\n\t]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":425,"default":0},"next":{"type":"string","example":"http://example.com/api/v2/invoices/?page=2"},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"123456789012345"},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"987654321098765"},"name":{"type":"string","example":"outlet-abc"}}},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"456789012345678"},"name":{"type":"string","example":"acme-supplies"},"internal_supplier_id":{"type":"string","nullable":true,"description":"Your own code for the supplier, as set on the supplier. Returned as stored: `null` or an empty string when it is not set.","example":"SUP-0042"}}},"invoice_number":{},"purchase_orders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"135792468024680"},"order_number":{"type":"string","example":"#20240512-abc-42"}}}},"total_amount":{},"total_amount_sentence":{},"total_amount_net":{"type":"string","nullable":true,"description":"Sum of the line items' `line_extension_amount`. Null when the invoice has no line items or `line_level_invoices_visible` is false.","example":"307.31000"},"total_amount_net_sentence":{"type":"string","nullable":true,"description":"`total_amount_net` with the currency symbol.","example":"€ 307.31"},"total_amount_gross":{"type":"string","nullable":true,"description":"Sum of the line items' `line_extension_amount` and `tax_amount`. When no line item has a tax amount, the total VAT read from the invoice file is added instead. Null when the invoice has no line items or `line_level_invoices_visible` is false.","example":"325.75000"},"total_amount_gross_sentence":{"type":"string","nullable":true,"description":"`total_amount_gross` with the currency symbol.","example":"€ 325.75"},"extracted_amount_net":{"type":"string","nullable":true,"description":"Net total printed on the invoice, after document-level discounts and charges, as read from the invoice file or as corrected by a user. Null when `line_level_invoices_visible` is false.","example":"307.31000"},"extracted_amount_net_sentence":{"type":"string","nullable":true,"description":"`extracted_amount_net` with the currency symbol.","example":"€ 307.31"},"extracted_amount_gross":{"type":"string","nullable":true,"description":"Total including VAT printed on the invoice, as read from the invoice file or as corrected by a user. Null when `line_level_invoices_visible` is false.","example":"325.75000"},"extracted_amount_gross_sentence":{"type":"string","nullable":true,"description":"`extracted_amount_gross` with the currency symbol.","example":"€ 325.75"},"total_tax_sentence":{"type":"string","nullable":true,"description":"VAT implied by the totals, with the currency symbol: `extracted_amount_gross` minus `extracted_amount_net` when both are set, otherwise `total_amount_gross` minus `total_amount_net`. Null when neither pair is complete. Null when `line_level_invoices_visible` is false.","example":"€ 18.44"},"purchase_orders_total_amount":{"type":"string","description":"Sum of linked purchase orders amounts.","example":"12.00000"},"purchase_orders_total_amount_sentence":{"type":"string","description":"Sum of linked purchase orders amounts with currency symbol.","example":"€ 12.00"},"total_amount_difference":{"type":"string","nullable":true,"description":"Difference between invoice total and purchase orders total.","example":"11.00000"},"total_amount_difference_sentence":{"type":"string","nullable":true,"description":"Difference between invoice total and purchase orders total with currency symbol.","example":"€ 11.00"},"total_amount_difference_percentage":{"type":"string","nullable":true,"description":"Percentage difference between invoice total and purchase orders total.","example":"91.67"},"invoice_date":{},"due_date":{},"created_at":{"type":"string","example":"2025-02-15T14:20:31.555307+01:00"},"updated_at":{"type":"string","example":"2025-02-15T14:20:31.555329+01:00"},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"998877665544332"},"name":{"type":"string","example":"SYSTEM"}}},"processing_status":{"type":"string","example":"ERROR"},"approval_status":{"type":"string","example":"RECEIVED"},"approved_by":{"type":"object","nullable":true,"description":"The user who approved the invoice. Set when the invoice moves to `APPROVED`, kept when it moves on to `PAID`, and cleared when it moves to any other status. Null on an approved invoice means it was approved automatically.","properties":{"id":{"type":"string","example":"998877665544332"},"name":{"type":"string","example":"SYSTEM"}}},"is_credit_note":{"type":"boolean","example":false,"default":true},"line_level_invoices_visible":{"type":"boolean","description":"Whether the line-level fields are returned, which requires the Invoice Line Level module on the library. When false, the net, gross and extracted totals and `total_tax_sentence` are null.","example":true}}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/invoices/{invoice_id}/":{"get":{"summary":"Get Invoice Details","description":"Returns an invoice with its linked purchase orders and files and, when the library has the Invoice Line Level module, its line items and the totals read from the invoice file.","operationId":"get-invoice","parameters":[{"name":"invoice_id","in":"path","description":"The ID of an invoice.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"id\": \"123456789012345\",\n\t\"outlet\": {\n\t\t\"id\": \"987654321098765\",\n\t\t\"name\": \"outlet-2468\"\n\t},\n\t\"supplier\": {\n\t\t\"id\": \"456789012345678\",\n\t\t\"name\": \"acme-supply-corp\",\n\t\t\"internal_supplier_id\": \"SUP-0042\"\n\t},\n\t\"invoice_number\": \"INV-2023-456\",\n\t\"purchase_orders\": [\n\t\t{\n\t\t\t\"id\": \"567890123456789\",\n\t\t\t\"order_number\": \"#20230515-2468-42\",\n\t\t\t\"ordered_on\": \"2023-05-15T10:22:35.123456+02:00\",\n\t\t\t\"delivery_date\": \"2023-05-18T09:15:22.654321+02:00\",\n\t\t\t\"ordered_by\": {\n\t\t\t\t\"id\": \"234567890123456\",\n\t\t\t\t\"name\": \"John Smith\"\n\t\t\t},\n\t\t\t\"total_amount\": 37.0,\n\t\t\t\"total_amount_sentence\": \"€ 37.00\",\n\t\t\t\"supplier\": {\n\t\t\t\t\"id\": \"456789012345678\",\n\t\t\t\t\"name\": \"acme-supply-corp\",\n\t\t\t\t\"internal_supplier_id\": \"SUP-0042\"\n\t\t\t},\n\t\t\t\"deliveries\": [\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"678901234567890\",\n\t\t\t\t\t\"delivery_date\": \"2023-05-18T09:15:22.654321+02:00\",\n\t\t\t\t\t\"received_by\": {\n\t\t\t\t\t\t\"id\": \"234567890123456\",\n\t\t\t\t\t\t\"name\": \"John Smith\"\n\t\t\t\t\t},\n\t\t\t\t\t\"total_amount\": 37.0,\n\t\t\t\t\t\"total_amount_sentence\": \"€ 37.00\",\n\t\t\t\t\t\"files\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"url\": \"/media/document_import_files/example-company/invoice_scan_123.jpg\",\n\t\t\t\t\t\t\t\"name\": \"document_import_files/example-company/invoice_scan_123.jpg\",\n\t\t\t\t\t\t\t\"short_name\": \"invoice_scan_123.jpg\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"delivery_closed\": false,\n\t\t\t\"url\": \"http://example.com/orders/delivered/12345/edit\"\n\t\t},\n\t\t{\n\t\t\t\"id\": \"789012345678901\",\n\t\t\t\"order_number\": \"#20230512-2468-37\",\n\t\t\t\"ordered_on\": \"2023-05-12T14:30:45.789012+02:00\",\n\t\t\t\"delivery_date\": \"2023-05-17T08:45:12.345678+02:00\",\n\t\t\t\"ordered_by\": {\n\t\t\t\t\"id\": \"234567890123456\",\n\t\t\t\t\"name\": \"John Smith\"\n\t\t\t},\n\t\t\t\"total_amount\": 0.0,\n\t\t\t\"total_amount_sentence\": \"€ 0.00\",\n\t\t\t\"supplier\": {\n\t\t\t\t\"id\": \"456789012345678\",\n\t\t\t\t\"name\": \"acme-supply-corp\",\n\t\t\t\t\"internal_supplier_id\": \"SUP-0042\"\n\t\t\t},\n\t\t\t\"deliveries\": [\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"890123456789012\",\n\t\t\t\t\t\"delivery_date\": \"2023-05-17T08:45:12.345678+02:00\",\n\t\t\t\t\t\"received_by\": {\n\t\t\t\t\t\t\"id\": \"234567890123456\",\n\t\t\t\t\t\t\"name\": \"John Smith\"\n\t\t\t\t\t},\n\t\t\t\t\t\"total_amount\": 0.0,\n\t\t\t\t\t\"total_amount_sentence\": \"€ 0.00\",\n\t\t\t\t\t\"files\": []\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"delivery_closed\": false,\n\t\t\t\"url\": \"http://example.com/orders/delivered/12344/edit\"\n\t\t}\n\t],\n\t\"total_amount\": \"46.12000\",\n\t\"total_amount_sentence\": \"€ 46.12\",\n\t\"total_amount_net\": \"37.80000\",\n\t\"total_amount_net_sentence\": \"€ 37.80\",\n\t\"total_amount_gross\": \"40.07000\",\n\t\"total_amount_gross_sentence\": \"€ 40.07\",\n\t\"extracted_amount_net\": \"42.80000\",\n\t\"extracted_amount_net_sentence\": \"€ 42.80\",\n\t\"extracted_amount_gross\": \"46.12000\",\n\t\"extracted_amount_gross_sentence\": \"€ 46.12\",\n\t\"total_tax_sentence\": \"€ 3.32\",\n\t\"purchase_orders_total_amount\": \"37.00000\",\n\t\"purchase_orders_total_amount_sentence\": \"€ 37.00\",\n\t\"total_amount_difference\": \"5.80000\",\n\t\"total_amount_difference_sentence\": \"€ 5.80\",\n\t\"total_amount_difference_percentage\": \"15.68\",\n\t\"invoice_date\": \"2023-05-10\",\n\t\"due_date\": \"2023-06-10\",\n\t\"created_at\": \"2023-05-20T11:23:45.123456+01:00\",\n\t\"updated_at\": \"2023-05-20T11:23:45.234567+01:00\",\n\t\"created_by\": {\n\t\t\"id\": \"234567890123456\",\n\t\t\"name\": \"John Smith\"\n\t},\n\t\"processing_status\": \"PROCESSED\",\n\t\"approval_status\": \"RECEIVED\",\n\t\"approved_by\": null,\n\t\"is_credit_note\": false,\n\t\"line_level_invoices_visible\": true,\n\t\"files\": [\n\t\t{\n\t\t\t\"id\": \"437000917130003\",\n\t\t\t\"type\": \"INVOICE\",\n\t\t\t\"file\": {\n\t\t\t\t\"url\": \"/media/document_import_files/acme-co/Invoice_INV-QA-380814148888_aaeLcmc.pdf\",\n\t\t\t\t\"name\": \"document_import_files/acme-co/Invoice_INV-QA-380814148888_aaeLcmc.pdf\",\n\t\t\t\t\"short_name\": \"Invoice_INV-QA-380814148888_aaeLcmc.pdf\"\n\t\t\t}\n\t\t}\n\t],\n\t\"line_items\": [\n\t\t{\n\t\t\t\"apic_id\": \"936110725430004\",\n\t\t\t\"line_number\": 1,\n\t\t\t\"line_id\": \"1\",\n\t\t\t\"item_name\": \"Sourdough bread 800 g\",\n\t\t\t\"item_description\": null,\n\t\t\t\"quantity\": \"10.00000\",\n\t\t\t\"unit_code\": \"PCE\",\n\t\t\t\"price_amount\": \"2.5000\",\n\t\t\t\"line_extension_amount\": \"25.00\",\n\t\t\t\"line_total_gross\": 26.5,\n\t\t\t\"tax_amount\": \"1.50\",\n\t\t\t\"tax_percentage\": \"6.00\",\n\t\t\t\"credit\": false,\n\t\t\t\"manually_edited\": false,\n\t\t\t\"supplier_article_number\": \"BRD-0042\",\n\t\t\t\"delivery_note_number\": \"DN-800537529\",\n\t\t\t\"article_classification\": \"ORDERED_KNOWN\",\n\t\t\t\"confidence\": 0.97,\n\t\t\t\"is_extracted\": true,\n\t\t\t\"ingredient_url\": \"/library/ingredient/226040915630008/\",\n\t\t\t\"llm_narrative\": \"\",\n\t\t\t\"llm_verdict\": \"\",\n\t\t\t\"llm_confidence\": null,\n\t\t\t\"mismatch_type\": \"matched\",\n\t\t\t\"gr_quantity\": 10.0,\n\t\t\t\"gr_price\": 2.5,\n\t\t\t\"gr_amount\": 25.0,\n\t\t\t\"purchase_order_package\": {\n\t\t\t\t\"id\": 673490305980011.0,\n\t\t\t\t\"purchase_order_id\": 567890123456789.0,\n\t\t\t\t\"order_number\": \"#20230515-2468-42\",\n\t\t\t\t\"article_name\": \"Sourdough bread 800 g\",\n\t\t\t\t\"ordered_quantity\": 10,\n\t\t\t\t\"unit_price\": 2.5\n\t\t\t},\n\t\t\t\"pairing_manually_set\": false,\n\t\t\t\"resolution_status\": \"unresolved\",\n\t\t\t\"dispute_reason\": \"\",\n\t\t\t\"credit_request\": null\n\t\t},\n\t\t{\n\t\t\t\"apic_id\": \"936110725430005\",\n\t\t\t\"line_number\": 2,\n\t\t\t\"line_id\": \"2\",\n\t\t\t\"item_name\": \"Butter 250 g\",\n\t\t\t\"item_description\": null,\n\t\t\t\"quantity\": \"4.00000\",\n\t\t\t\"unit_code\": \"PCE\",\n\t\t\t\"price_amount\": \"3.2000\",\n\t\t\t\"line_extension_amount\": \"12.80\",\n\t\t\t\"line_total_gross\": 13.57,\n\t\t\t\"tax_amount\": \"0.77\",\n\t\t\t\"tax_percentage\": \"6.00\",\n\t\t\t\"credit\": false,\n\t\t\t\"manually_edited\": false,\n\t\t\t\"supplier_article_number\": \"DAI-0107\",\n\t\t\t\"delivery_note_number\": \"DN-800537529\",\n\t\t\t\"article_classification\": \"ORDERED_KNOWN\",\n\t\t\t\"confidence\": 0.94,\n\t\t\t\"is_extracted\": true,\n\t\t\t\"ingredient_url\": \"/library/ingredient/226040915630013/\",\n\t\t\t\"llm_narrative\": \"Invoiced at 3.20 per piece; 3.00 was agreed on the order and recorded at delivery.\",\n\t\t\t\"llm_verdict\": \"real_issue\",\n\t\t\t\"llm_confidence\": 0.92,\n\t\t\t\"mismatch_type\": \"price_mismatch\",\n\t\t\t\"gr_quantity\": 4.0,\n\t\t\t\"gr_price\": 3.0,\n\t\t\t\"gr_amount\": 12.0,\n\t\t\t\"purchase_order_package\": {\n\t\t\t\t\"id\": 673490305980012.0,\n\t\t\t\t\"purchase_order_id\": 567890123456789.0,\n\t\t\t\t\"order_number\": \"#20230515-2468-42\",\n\t\t\t\t\"article_name\": \"Butter 250 g\",\n\t\t\t\t\"ordered_quantity\": 4,\n\t\t\t\t\"unit_price\": 3.0\n\t\t\t},\n\t\t\t\"pairing_manually_set\": false,\n\t\t\t\"resolution_status\": \"disputed\",\n\t\t\t\"dispute_reason\": \"Price above the 3.00 agreed on the order.\",\n\t\t\t\"credit_request\": {\n\t\t\t\t\"apic_id\": 836110725480001.0,\n\t\t\t\t\"created_at\": \"2023-05-22T09:14:03.512340Z\"\n\t\t\t}\n\t\t}\n\t],\n\t\"invoice_totals\": {\n\t\t\"subtotal\": \"42.80\",\n\t\t\"total_tax\": \"3.32\",\n\t\t\"total_amount\": \"46.12\",\n\t\t\"amount_due\": \"46.12\",\n\t\t\"previous_unpaid_balance\": null,\n\t\t\"allowances_charges\": [\n\t\t\t{\n\t\t\t\t\"charge_indicator\": true,\n\t\t\t\t\"amount\": \"5.00000\",\n\t\t\t\t\"rate\": null,\n\t\t\t\t\"reason\": \"Delivery costs\",\n\t\t\t\t\"tax_category\": \"21\"\n\t\t\t}\n\t\t],\n\t\t\"tax_breakdown\": [\n\t\t\t{\n\t\t\t\t\"rate\": \"6.00000\",\n\t\t\t\t\"tax_amount\": \"2.27000\",\n\t\t\t\t\"taxable_base\": \"37.80000\",\n\t\t\t\t\"tax_category\": \"S\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"rate\": \"21.00000\",\n\t\t\t\t\"tax_amount\": \"1.05000\",\n\t\t\t\t\"taxable_base\": \"5.00000\",\n\t\t\t\t\"tax_category\": \"S\"\n\t\t\t}\n\t\t]\n\t},\n\t\"comments\": [\n\t\t{\n\t\t\t\"content\": \"This invoice needs to be reviewed\",\n\t\t\t\"created_at\": \"2025-11-12T12:23:41Z\",\n\t\t\t\"created_by\": {\n\t\t\t\t\"id\": \"336010094470006\",\n\t\t\t\t\"name\": \"Ramil Bikbulatov\"\n\t\t\t}\n\t\t}\n\t],\n\t\"history\": [\n\t\t{\n\t\t\t\"created_at\": \"2025-10-01T11:53:57Z\",\n\t\t\t\"created_by\": {\n\t\t\t\t\"id\": \"536110897050000\",\n\t\t\t\t\"name\": \"QANoteditabecheck QANoteditablecheck\"\n\t\t\t},\n\t\t\t\"params\": {\n\t\t\t\t\"origin\": \"UPLOAD\",\n\t\t\t\t\"type\": \"INVOICE_CREATED\"\n\t\t\t},\n\t\t\t\"type\": \"INVOICE_CREATED\"\n\t\t},\n\t\t{\n\t\t\t\"created_at\": \"2025-10-01T11:53:59Z\",\n\t\t\t\"created_by\": {\n\t\t\t\t\"id\": \"536110897050000\",\n\t\t\t\t\"name\": \"QANoteditabecheck QANoteditablecheck\"\n\t\t\t},\n\t\t\t\"params\": {\n\t\t\t\t\"url\": \"/media/document_import_files/ramil-library/Invoice_INV-QA-380814148888_aaeLcmc.pdf\"\n\t\t\t},\n\t\t\t\"type\": \"INVOICE_FILE_UPLOADED\"\n\t\t}\n\t],\n\t\"processing_error\": null\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"123456789012345"},"outlet":{"type":"object","properties":{"id":{"type":"string","example":"987654321098765"},"name":{"type":"string","example":"outlet-2468"}}},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"456789012345678"},"name":{"type":"string","example":"acme-supply-corp"},"internal_supplier_id":{"type":"string","nullable":true,"description":"Your own code for the supplier, as set on the supplier. Returned as stored: `null` or an empty string when it is not set.","example":"SUP-0042"}}},"invoice_number":{"type":"string","example":"INV-2023-456"},"purchase_orders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"567890123456789"},"order_number":{"type":"string","example":"#20230515-2468-42"},"ordered_on":{"type":"string","example":"2023-05-15T10:22:35.123456+02:00"},"delivery_date":{"type":"string","example":"2023-05-18T09:15:22.654321+02:00"},"ordered_by":{"type":"object","properties":{"id":{"type":"string","example":"234567890123456"},"name":{"type":"string","example":"John Smith"}}},"total_amount":{"type":"integer","example":0,"default":0},"total_amount_sentence":{"type":"string","example":"€ 0.00"},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"456789012345678"},"name":{"type":"string","example":"acme-supply-corp"},"internal_supplier_id":{"type":"string","nullable":true,"description":"Your own code for the supplier, as set on the supplier. Returned as stored: `null` or an empty string when it is not set.","example":"SUP-0042"}}},"deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"678901234567890"},"delivery_date":{"type":"string","example":"2023-05-18T09:15:22.654321+02:00"},"received_by":{"type":"object","properties":{"id":{"type":"string","example":"234567890123456"},"name":{"type":"string","example":"John Smith"}}},"total_amount":{"type":"integer","example":0,"default":0},"total_amount_sentence":{"type":"string","example":"€ 0.00"},"files":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"/media/document_import_files/example-company/invoice_scan_123.jpg"},"name":{"type":"string","example":"document_import_files/example-company/invoice_scan_123.jpg"},"short_name":{"type":"string","example":"invoice_scan_123.jpg"}}}}}}},"delivery_closed":{"type":"boolean"},"url":{"type":"string","example":"http://example.com/orders/delivered/12345/edit"}}}},"total_amount":{"type":"string","example":"75.25000"},"total_amount_sentence":{"type":"string","example":"€ 75.25"},"total_amount_net":{"type":"string","nullable":true,"description":"Sum of the line items' `line_extension_amount`. Null when the invoice has no line items or `line_level_invoices_visible` is false.","example":"37.80000"},"total_amount_net_sentence":{"type":"string","nullable":true,"description":"`total_amount_net` with the currency symbol.","example":"€ 37.80"},"total_amount_gross":{"type":"string","nullable":true,"description":"Sum of the line items' `line_extension_amount` and `tax_amount`. When no line item has a tax amount, the total VAT read from the invoice file is added instead. Null when the invoice has no line items or `line_level_invoices_visible` is false.","example":"40.07000"},"total_amount_gross_sentence":{"type":"string","nullable":true,"description":"`total_amount_gross` with the currency symbol.","example":"€ 40.07"},"extracted_amount_net":{"type":"string","nullable":true,"description":"Net total printed on the invoice, after document-level discounts and charges, as read from the invoice file or as corrected by a user. Null when `line_level_invoices_visible` is false.","example":"42.80000"},"extracted_amount_net_sentence":{"type":"string","nullable":true,"description":"`extracted_amount_net` with the currency symbol.","example":"€ 42.80"},"extracted_amount_gross":{"type":"string","nullable":true,"description":"Total including VAT printed on the invoice, as read from the invoice file or as corrected by a user. Null when `line_level_invoices_visible` is false.","example":"46.12000"},"extracted_amount_gross_sentence":{"type":"string","nullable":true,"description":"`extracted_amount_gross` with the currency symbol.","example":"€ 46.12"},"total_tax_sentence":{"type":"string","nullable":true,"description":"VAT implied by the totals, with the currency symbol: `extracted_amount_gross` minus `extracted_amount_net` when both are set, otherwise `total_amount_gross` minus `total_amount_net`. Null when neither pair is complete. Null when `line_level_invoices_visible` is false.","example":"€ 3.32"},"purchase_orders_total_amount":{"type":"string","description":"Sum of linked purchase orders amounts.","example":"12.00000"},"purchase_orders_total_amount_sentence":{"type":"string","description":"Sum of linked purchase orders amounts with currency symbol.","example":"€ 12.00"},"total_amount_difference":{"type":"string","nullable":true,"description":"Difference between invoice total and purchase orders total.","example":"11.00000"},"total_amount_difference_sentence":{"type":"string","nullable":true,"description":"Difference between invoice total and purchase orders total with currency symbol.","example":"€ 11.00"},"total_amount_difference_percentage":{"type":"string","nullable":true,"description":"Percentage difference between invoice total and purchase orders total.","example":"91.67"},"invoice_date":{"type":"string","example":"2023-05-10"},"due_date":{"type":"string","example":"2023-06-10"},"created_at":{"type":"string","example":"2023-05-20T11:23:45.123456+01:00"},"updated_at":{"type":"string","example":"2023-05-20T11:23:45.234567+01:00"},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"234567890123456"},"name":{"type":"string","example":"John Smith"}}},"processing_status":{"type":"string","example":"MANUAL"},"approval_status":{"type":"string","example":"RECEIVED"},"approved_by":{"type":"object","nullable":true,"description":"The user who approved the invoice. Set when the invoice moves to `APPROVED`, kept when it moves on to `PAID`, and cleared when it moves to any other status. Null on an approved invoice means it was approved automatically.","properties":{"id":{"type":"string","example":"234567890123456"},"name":{"type":"string","example":"John Smith"}}},"is_credit_note":{"type":"boolean","example":false,"default":true},"line_level_invoices_visible":{"type":"boolean","description":"Whether the line-level fields are returned, which requires the Invoice Line Level module on the library. When false, `line_items` is empty, and the net, gross and extracted totals, `total_tax_sentence` and `invoice_totals` are null.","example":true},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"437000917130003"},"type":{"type":"string","example":"INVOICE","enum":["INVOICE","OTHER"]},"file":{"type":"object","properties":{"url":{"type":"string","example":"/media/document_import_files/acme-co/2000_WxdtIGx.jpg"},"name":{"type":"string","example":"document_import_files/acme-co/2000_WxdtIGx.jpg"},"short_name":{"type":"string","example":"2000_WxdtIGx.jpg"}}}}}},"line_items":{"type":"array","description":"The invoice's lines, in the order of the document, followed by the lines added by hand. Empty when `line_level_invoices_visible` is false.","items":{"type":"object","properties":{"apic_id":{"type":"string","description":"The ID of the line item.","example":"936110725430004"},"line_number":{"type":"integer","nullable":true,"description":"Position of the line on the document, as read from the invoice file. Null on a line added by hand, and on some lines read from the file.","example":1},"line_id":{"type":"string","nullable":true,"description":"The line's own identifier on the document, when it has one, such as the line ID of an e-invoice.","example":"1"},"item_name":{"type":"string","nullable":true,"description":"Name of the article on the line, as read from the invoice file or as edited by a user.","example":"Sourdough bread 800 g"},"item_description":{"type":"string","nullable":true,"description":"Additional description printed on the line.","example":"Sliced"},"quantity":{"type":"string","nullable":true,"description":"Invoiced quantity.","example":"10.00000"},"unit_code":{"type":"string","nullable":true,"description":"Unit of the quantity, as read from the invoice file, for example `PCE` or `kg`.","example":"PCE"},"price_amount":{"type":"string","nullable":true,"description":"Net unit price.","example":"2.5000"},"line_extension_amount":{"type":"string","nullable":true,"description":"Net amount of the line, before VAT and before any document-level discount or charge.","example":"25.00"},"line_total_gross":{"type":"number","nullable":true,"description":"`line_extension_amount` plus `tax_amount`. Equal to `line_extension_amount` when `tax_amount` is null, and null when `line_extension_amount` is null.","example":26.5},"tax_amount":{"type":"string","nullable":true,"description":"VAT amount of the line. It can differ from `line_extension_amount` times `tax_percentage` when the document applies a discount to its total, because the VAT is then computed on the discounted amount.","example":"1.50"},"tax_percentage":{"type":"string","nullable":true,"description":"VAT rate of the line, in percent. Null on documents that only state VAT per rate at the bottom; see `invoice_totals.tax_breakdown`.","example":"6.00"},"credit":{"type":"boolean","description":"True when the line amount read from the invoice file is negative, such as a returned article. Left out on a line added by hand.","example":false},"manually_edited":{"type":"boolean","description":"True when a user changed the line's values after it was read from the invoice file, or added the line by hand.","example":false},"supplier_article_number":{"type":"string","nullable":true,"description":"The supplier's article number printed on the line.","example":"BRD-0042"},"delivery_note_number":{"type":"string","nullable":true,"description":"Delivery note number printed on the line, when the invoice gives one per line.","example":"DN-800537529"},"article_classification":{"type":"string","nullable":true,"enum":["ORDERED_KNOWN","UNORDERED_KNOWN","UNORDERED_UNKNOWN"],"description":"How the line relates to the catalog and the linked purchase orders. `ORDERED_KNOWN`: paired to a line of a linked purchase order. `UNORDERED_KNOWN`: matched to one of the supplier's packages, but not to a purchase order line. `UNORDERED_UNKNOWN`: matched to neither. Null on a line that has not been matched yet.","example":"ORDERED_KNOWN"},"confidence":{"type":"number","nullable":true,"description":"Lowest confidence, from 0 to 1, among the values read for this line from the invoice file. Null on a line added by hand, on e-invoices and on older invoices.","example":0.97},"is_extracted":{"type":"boolean","description":"True when the line was read from the invoice file, false when it was added by hand.","example":true},"ingredient_url":{"type":"string","nullable":true,"description":"Path of the page, in the Apicbase web app, of the ingredient the line is matched to. It is not an API URL: the number in it is the ingredient ID. Null when the line is not matched to a supplier package.","example":"/library/ingredient/226040915630008/"},"llm_narrative":{"type":"string","description":"Explanation, written by the AI review, of how the line compares with what was delivered. Empty when the line has not been reviewed.","example":"Invoiced at 2.50 per piece, as on the order and the delivery."},"llm_verdict":{"type":"string","enum":["","ok","real_issue","ai_error_remaining","unresolved"],"description":"Verdict of the AI review. `ok`: the line agrees with what was delivered. `real_issue`: a genuine difference to follow up, such as a quantity or price that differs from the delivery, or a line that is not on the order. `ai_error_remaining`: the line was probably misread from the invoice file. `unresolved`: not enough information to decide. Empty when the line has not been reviewed, and cleared when its pairing changes.","example":"ok"},"llm_confidence":{"type":"number","nullable":true,"description":"Confidence of the AI review, from 0 to 1. Null when the line has not been reviewed.","example":0.92},"mismatch_type":{"type":"string","enum":["matched","no_po_line","quantity_mismatch","price_mismatch","not_comparable"],"description":"Result of comparing the line with its purchase order line, within the invoice tolerance margin set for the outlet or library. `matched`: quantity and unit price agree, or the line's net amount agrees with the received quantity at the agreed price. `no_po_line`: the line is not paired to a purchase order line. `quantity_mismatch`: the quantity differs from the quantity received, or from the quantity ordered when nothing was received yet. `price_mismatch`: the unit price differs from the agreed price on the order. `not_comparable`: a figure needed for the comparison is missing. A user's decision on the line is in `resolution_status`, not here.","example":"matched"},"gr_quantity":{"type":"number","nullable":true,"description":"Quantity received for the paired purchase order line. Null when the line is not paired or nothing was received.","example":10},"gr_price":{"type":"number","nullable":true,"description":"Unit price recorded when the paired purchase order line was received. Null when the line is not paired or nothing was received.","example":2.5},"gr_amount":{"type":"number","nullable":true,"description":"Amount recorded for the quantity received on the paired purchase order line. Null when the line is not paired or nothing was received.","example":25},"purchase_order_package":{"type":"object","nullable":true,"description":"The purchase order line this line is paired to. Null when it is not paired. Its IDs are returned as numbers.","properties":{"id":{"type":"number","description":"ID of the purchase order line.","example":673490305980011},"purchase_order_id":{"type":"number","description":"ID of the purchase order. Convert it to a string before comparing it with the `id` of an entry in `purchase_orders`.","example":567890123456789},"order_number":{"type":"string","example":"#20230515-2468-42"},"article_name":{"type":"string","nullable":true,"description":"Name of the article on the purchase order: the supplier's product name, or else the stock item name.","example":"Sourdough bread 800 g"},"ordered_quantity":{"type":"number","nullable":true,"description":"Quantity ordered.","example":10},"unit_price":{"type":"number","nullable":true,"description":"Net unit price agreed on the order.","example":2.5}}},"pairing_manually_set":{"type":"boolean","description":"True when a user set or removed the pairing, rather than the automatic matching.","example":false},"resolution_status":{"type":"string","enum":["unresolved","accepted","disputed"],"description":"A user's decision on a difference on the line. `accepted`: kept as invoiced. `disputed`: flagged to take up with the supplier; see `dispute_reason`.","example":"unresolved"},"dispute_reason":{"type":"string","description":"Why the line was disputed, as entered by the user. Empty unless `resolution_status` is `disputed`.","example":""},"credit_request":{"type":"object","nullable":true,"description":"The credit request that includes this line. Null when no credit request includes it.","properties":{"apic_id":{"type":"number","description":"ID of the credit request, returned as a number.","example":836110725480001},"created_at":{"type":"string","format":"date-time","description":"When the credit request was created, in UTC.","example":"2023-05-22T09:14:03.512340Z"}}}}}},"invoice_totals":{"type":"object","nullable":true,"description":"Totals as read from the invoice file, without user corrections. Null when the invoice has no processed file or `line_level_invoices_visible` is false.","properties":{"subtotal":{"type":"string","nullable":true,"description":"Net total, after document-level discounts and charges.","example":"42.80"},"total_tax":{"type":"string","nullable":true,"description":"Total VAT.","example":"3.32"},"total_amount":{"type":"string","nullable":true,"description":"Total including VAT.","example":"46.12"},"amount_due":{"type":"string","nullable":true,"description":"Amount to pay, when the document states it.","example":"46.12"},"previous_unpaid_balance":{"type":"string","nullable":true,"description":"Unpaid balance carried over from earlier invoices, when the document states it.","example":null},"allowances_charges":{"type":"array","description":"Discounts and charges that apply to the whole document rather than to a line.","items":{"type":"object","properties":{"charge_indicator":{"type":"boolean","description":"`false` for a discount, which lowers the net total, `true` for a charge, which raises it.","example":true},"amount":{"type":"string","description":"Amount of the discount or charge, always positive: `charge_indicator` gives the direction.","example":"5.00000"},"rate":{"type":"string","nullable":true,"description":"Percentage the amount was computed with, when the document shows one, for example `10.00000` for a 10% discount.","example":null},"reason":{"type":"string","nullable":true,"description":"Reason as printed on the document.","example":"Delivery costs"},"tax_category":{"type":"string","nullable":true,"description":"VAT rate or category the discount or charge falls under, when the document states one.","example":"21"}}}},"tax_breakdown":{"type":"array","description":"VAT per rate, as stated at the bottom of the document.","items":{"type":"object","properties":{"rate":{"type":"string","description":"VAT rate, in percent.","example":"6.00000"},"tax_amount":{"type":"string","description":"VAT at this rate.","example":"2.27000"},"taxable_base":{"type":"string","nullable":true,"description":"Net amount taxed at this rate.","example":"37.80000"},"tax_category":{"type":"string","nullable":true,"description":"VAT category code, when the document shows one, such as `S` on an e-invoice.","example":"S"}}}}}},"comments":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","example":"This invoice needs to be reviewed"},"created_at":{"type":"string","example":"2025-11-12T12:23:41Z"},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"336010094470006"},"name":{"type":"string","example":"Ramil Bikbulatov"}}}}}},"history":{"type":"array","items":{"type":"object","properties":{"created_at":{"type":"string","example":"2023-05-20T10:23:45.123456+00:00"},"created_by":{"type":"object","properties":{"id":{"type":"string","example":"234567890123456"},"name":{"type":"string","example":"John Smith"}}},"params":{"type":"object","properties":{}},"type":{"type":"string","example":"INVOICE_CREATED"}}}},"processing_error":{}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"message\": \"Resource not found\"\n}"}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false},"patch":{"summary":"Update Invoice Record","description":"Updates the information of a single invoice record.","operationId":"update-invoice","parameters":[{"name":"invoice_id","in":"path","description":"The ID of an invoice.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"outlet":{"type":"string","description":"The ID of the outlet."},"supplier":{"type":"string","description":"The ID of the supplier."},"invoice_number":{"type":"string"},"purchase_orders":{"type":"array","description":"List of IDs of purchase orders","items":{"type":"string"}},"invoice_date":{"type":"string","format":"date"},"due_date":{"type":"string","format":"date"},"total_amount":{"type":"number","format":"float"},"is_credit_note":{"type":"boolean"}}},"examples":{"Request Example":{"value":{"outlet":"529100044450000","supplier":"825110696650006","invoice_number":"0101170","purchase_orders":["673490305980006","473490725920008"],"invoice_date":"2024-01-02","due_date":"2024-01-03","total_amount":100.5,"is_credit_note":false}}}}}},"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":""}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"message\": \"Resource not found\"\n}"}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}},"409":{"description":"Conflict: an invoice with the same number already exists for this supplier in the outlet, or `purchase_orders` leaves out a linked purchase order while the invoice has a credit request that was not withdrawn.","content":{"application/json":{"examples":{"Duplicate invoice number":{"value":["INVOICE_NUMBER_DUPLICATED_EXCEPTION","An invoice with the same invoice number already exists for this supplier.",{"invoice_number":"0987654","supplier":"company-name-54321"}]},"Open credit request":{"value":{"detail":"A credit request is open on this invoice, so its purchase orders cannot be unlinked. Ask support to withdraw the credit request first.","credit_request_ids":["836110725480001"]}}},"schema":{"oneOf":[{"type":"array","title":"Duplicate invoice number","description":"Error code, message, and the invoice number and supplier name that clash.","items":{},"example":["INVOICE_NUMBER_DUPLICATED_EXCEPTION","An invoice with the same invoice number already exists for this supplier.",{"invoice_number":"0987654","supplier":"company-name-54321"}]},{"type":"object","title":"Open credit request","properties":{"detail":{"type":"string","description":"Explanation, in the language of the request.","example":"A credit request is open on this invoice, so its purchase orders cannot be unlinked. Ask support to withdraw the credit request first."},"credit_request_ids":{"type":"array","description":"IDs of the credit requests that block the change.","items":{"type":"string"},"example":["836110725480001"]}}}]}}}}},"deprecated":false},"delete":{"summary":"Delete Invoice","description":"Deletes an invoice record.","operationId":"delete-invoice","parameters":[{"name":"invoice_id","in":"path","description":"The ID of an invoice.","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":""}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"message\": \"Resource not found\"\n}"}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false}},"/invoices/{invoice_id}/approval_status/":{"patch":{"summary":"Update Invoice Approval Status","description":"Updates the approval_status field of a specific invoice record.","operationId":"update-invoice-approval-status","parameters":[{"name":"invoice_id","in":"path","description":"The ID of an invoice.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["approval_status"],"properties":{"approval_status":{"type":"string","enum":["RECEIVED","PENDING_APPROVAL","FLAGGED","APPROVED","REJECTED","PAID"]}}},"examples":{"Request Example":{"value":{"approval_status":"APPROVED"}}}}}},"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":""}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"message\": \"Resource not found\"\n}"}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false}},"/invoices/bulk_upload/":{"post":{"summary":"Upload Invoices (with AI)","description":"Upload a single or multiple invoices in a batch.","operationId":"bulk-upload-invoices","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["outlet"],"properties":{"outlet":{"type":"string","description":"The ID of the outlet."},"supplier":{"type":"string","description":"The ID of the supplier."},"purchase_orders":{"type":"string","description":"Comma-separated list of IDs of purchase orders."},"file":{"type":"array","items":{"type":"string","format":"binary"}}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"bulk_importation_id\": \"4375f51a-0843-492f-b493-f6aaef1336d5\",\n\t\"errors\": [{\n\t\t\"detail\": [\n\t\t\t\"INVOICE_FILE_DUPLICATED_EXCEPTION\",\n\t\t\t\"This file was already uploaded for another invoice\",\n\t\t\t{\n\t\t\t\t\"invoice_file_id\": \"419\",\n\t\t\t\t\"invoice_number\": \"20250205\",\n\t\t\t\t\"invoice_id\": \"512\",\n\t\t\t\t\"uploaded_at\": \"2025-03-04T14:12:49.282523+00:00\",\n\t\t\t\t\"url\": \"/media/document_import_files/acme-co/28155_edited_3_XbWHISs.pdf\"\n\t\t\t}\n\t\t]\n\t}]\n}"}},"schema":{"type":"object","properties":{"bulk_importation_id":{"type":"string","example":"4375f51a-0843-492f-b493-f6aaef1336d5"},"errors":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"array"}}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/invoices/{invoice_id}/files":{"post":{"summary":"Upload Invoice File","description":"Uploads a single invoice file to a specific invoice.","operationId":"upload-invoice","parameters":[{"name":"invoice_id","in":"path","description":"The ID of an invoice.","schema":{"type":"string"},"required":true},{"name":"content-type","in":"header","schema":{"type":"string","default":"multipart/form-data"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["original_file","file_type"],"properties":{"original_file":{"type":"string","description":"The file to upload.","format":"binary"},"file_type":{"type":"string","description":"Type of file: INVOICE (for invoice/credit note files) or OTHER (for supplementary files).","enum":["INVOICE","OTHER"]}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"id\": \"937000802430008\",\n\t\"type\": \"OTHER\",\n\t\"file\": {\n\t\t\"url\": \"/media/document_import_files/acme-co/2000_WxdtIGx.jpg\",\n\t\t\"name\": \"document_import_files/acme-co/2000_WxdtIGx.jpg\",\n\t\t\"short_name\": \"2000_WxdtIGx.jpg\"\n\t}\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"937000802430008"},"type":{"type":"string","example":"OTHER"},"file":{"type":"object","properties":{"url":{"type":"string","example":"/media/document_import_files/acme-co/2000_WxdtIGx.jpg"},"name":{"type":"string","example":"document_import_files/acme-co/2000_WxdtIGx.jpg"},"short_name":{"type":"string","example":"2000_WxdtIGx.jpg"}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"message\": \"Resource not found\"\n}"}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false}},"/invoices/{invoice_id}/files/{invoice_file_id}":{"delete":{"summary":"Delete Uploaded Invoice File","description":"Deletes a specific invoice file of an invoice.","operationId":"delete-uploaded-invoice","parameters":[{"name":"invoice_id","in":"path","description":"The ID of an invoice.","schema":{"type":"string"},"required":true},{"name":"invoice_file_id","in":"path","description":"The ID of an invoice file.","schema":{"type":"integer","format":"int32"},"required":true}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"message\": \"Resource not found\"\n}"}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false}},"/invoices/{invoice_id}/comments/":{"post":{"summary":"Create Invoice Comment","description":"Adds a new comment to a specific invoice record.","operationId":"create-invoice-comment","parameters":[{"name":"invoice_id","in":"path","description":"The ID of an invoice.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["content"],"properties":{"content":{"type":"string","description":"The content of the comment."}}},"examples":{"Request Example":{"value":{"content":"This invoice needs to be reviewed"}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"message\": \"Resource not found\"\n}"}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false}},"/invoices/{invoice_id}/comments/{comment_index}":{"patch":{"summary":"Update Invoice Comment","description":"Updates a comment on an invoice record.","operationId":"update-invoice-comment","parameters":[{"name":"invoice_id","in":"path","description":"The ID of an invoice.","schema":{"type":"string"},"required":true},{"name":"comment_index","in":"path","description":"The index of the comment. As the comments are an ordered list, the index is the position of the comment in the list.","schema":{"type":"integer","format":"int32"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["content"],"properties":{"content":{"type":"string","description":"The content of the comment."}}},"examples":{"Request Example":{"value":{"content":"This invoice needs to be reviewed"}}}}}},"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"message\": \"Resource not found\"\n}"}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false},"delete":{"summary":"Delete Invoice Comment","description":"Deletes a comment on an invoice record.","operationId":"delete-invoice-comment","parameters":[{"name":"invoice_id","in":"path","description":"The ID of an invoice.","schema":{"type":"string"},"required":true},{"name":"comment_index","in":"path","description":"The index of the comment. As the comments are an ordered list, the index is the position of the comment in the list.","schema":{"type":"integer","format":"int32"},"required":true}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"message\": \"Resource not found\"\n}"}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false}},"/invoices/{invoice_id}/purchase_orders/{purchase_order_id}/":{"post":{"summary":"Link Invoice to Purchase Order","description":"Creates a link between an invoice and a purchase order.","operationId":"link-invoice-to-purchase-order","parameters":[{"name":"invoice_id","in":"path","description":"The ID of an invoice.","schema":{"type":"string"},"required":true},{"name":"purchase_order_id","in":"path","description":"The ID of a purchase order.","schema":{"type":"integer","format":"int32"},"required":true}],"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"id\": \"567890123456789\",\n\t\"order_number\": \"#20230515-2468-42\",\n\t\"ordered_on\": \"2023-05-15T10:22:35.123456+02:00\",\n\t\"delivery_date\": \"2023-05-18T09:15:22.654321+02:00\",\n\t\"ordered_by\": {\n\t\t\"id\": \"234567890123456\",\n\t\t\"name\": \"John Smith\"\n\t},\n\t\"total_amount\": 37.0,\n\t\"total_amount_sentence\": \"€ 37.00\",\n\t\"total_amount_with_returnables\": 39.5,\n\t\"total_amount_with_returnables_sentence\": \"€ 39.50\",\n\t\"supplier\": {\n\t\t\"id\": \"456789012345678\",\n\t\t\"name\": \"acme-supply-corp\",\n\t\t\"internal_supplier_id\": \"SUP-0042\"\n\t},\n\t\"deliveries\": [\n\t\t{\n\t\t\t\"id\": \"678901234567890\",\n\t\t\t\"delivery_date\": \"2023-05-18T09:15:22.654321+02:00\",\n\t\t\t\"received_by\": {\n\t\t\t\t\"id\": \"234567890123456\",\n\t\t\t\t\"name\": \"John Smith\"\n\t\t\t},\n\t\t\t\"total_amount\": 37.0,\n\t\t\t\"total_amount_sentence\": \"€ 37.00\",\n\t\t\t\"files\": [\n\t\t\t\t{\n\t\t\t\t\t\"url\": \"/media/document_import_files/example-company/invoice_scan_123.jpg\",\n\t\t\t\t\t\"name\": \"document_import_files/example-company/invoice_scan_123.jpg\",\n\t\t\t\t\t\"short_name\": \"invoice_scan_123.jpg\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"delivery_closed\": false,\n\t\"url\": \"http://example.com/orders/delivered/12345/edit\"\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"567890123456789"},"order_number":{"type":"string","example":"#20230515-2468-42"},"ordered_on":{"type":"string","example":"2023-05-15T10:22:35.123456+02:00"},"delivery_date":{"type":"string","example":"2023-05-18T09:15:22.654321+02:00"},"ordered_by":{"type":"object","properties":{"id":{"type":"string","example":"234567890123456"},"name":{"type":"string","example":"John Smith"}}},"total_amount":{"type":"number","description":"Value of the goods received on the purchase order.","example":37},"total_amount_sentence":{"type":"string","example":"€ 37.00"},"total_amount_with_returnables":{"type":"number","description":"`total_amount` after the delivery's discount, returnables and delivery fee, or the amount entered by hand on the delivery when there is one.","example":39.5},"total_amount_with_returnables_sentence":{"type":"string","example":"€ 39.50"},"supplier":{"type":"object","properties":{"id":{"type":"string","example":"456789012345678"},"name":{"type":"string","example":"acme-supply-corp"},"internal_supplier_id":{"type":"string","nullable":true,"description":"Your own code for the supplier, as set on the supplier. Returned as stored: `null` or an empty string when it is not set.","example":"SUP-0042"}}},"deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"678901234567890"},"delivery_date":{"type":"string","example":"2023-05-18T09:15:22.654321+02:00"},"received_by":{"type":"object","properties":{"id":{"type":"string","example":"234567890123456"},"name":{"type":"string","example":"John Smith"}}},"total_amount":{"type":"number","description":"Value of the goods received in this delivery.","example":37},"total_amount_sentence":{"type":"string","example":"€ 37.00"},"files":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"/media/document_import_files/example-company/invoice_scan_123.jpg"},"name":{"type":"string","example":"document_import_files/example-company/invoice_scan_123.jpg"},"short_name":{"type":"string","example":"invoice_scan_123.jpg"}}}}}}},"delivery_closed":{"type":"boolean"},"url":{"type":"string","example":"http://example.com/orders/delivered/12345/edit"}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"message\": \"Resource not found\"\n}"}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false},"delete":{"summary":"Unlink Invoice from Purchase Order","description":"Deletes a link between an invoice and a purchase order.","operationId":"unlink-invoice-from-purchase-order","parameters":[{"name":"invoice_id","in":"path","description":"The ID of an invoice.","schema":{"type":"string"},"required":true},{"name":"purchase_order_id","in":"path","description":"The ID of a purchase order.","schema":{"type":"integer","format":"int32"},"required":true}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"message\": \"Resource not found\"\n}"}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}},"409":{"description":"The invoice has a credit request that was not withdrawn, so its purchase orders cannot be unlinked.","content":{"application/json":{"examples":{"Result":{"value":{"detail":"A credit request is open on this invoice, so its purchase orders cannot be unlinked. Ask support to withdraw the credit request first.","credit_request_ids":["836110725480001"]}}},"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Explanation, in the language of the request.","example":"A credit request is open on this invoice, so its purchase orders cannot be unlinked. Ask support to withdraw the credit request first."},"credit_request_ids":{"type":"array","description":"IDs of the credit requests that block the change.","items":{"type":"string"},"example":["836110725480001"]}}}}}}},"deprecated":false}},"/invoices/bulk_export/":{"post":{"summary":"Bulk Export Invoices","description":"Exports the selected invoices as a CSV file, with one row per invoice or one row per invoice line.","operationId":"bulk-export-invoices","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["outlet"],"properties":{"outlet":{"type":"string","description":"The ID of the outlet."},"selected_ids":{"type":"array","description":"IDs of the invoices to export. When not empty, `filters` is ignored. With `has_selected_all` set to `true`, these invoices are excluded and every other invoice is exported. `outlet` and `detail_level` always apply.","items":{"type":"string"}},"filters":{"type":"object","description":"Filters to apply to the invoices. Used only when `selected_ids` is empty; then `has_selected_all` is ignored.","properties":{"approval_statuses":{"type":"array","description":"A list of approval statuses to filter by. Possible values: RECEIVED, PENDING_APPROVAL, FLAGGED, APPROVED, REJECTED, PAID","items":{"type":"string"}},"approved_by":{"type":"array","description":"A list of IDs of users that approved invoices to filter by.","items":{"type":"string"}},"created_by":{"type":"array","description":"A list of IDs of users that created invoices to filter by.","items":{"type":"string"}},"invoice_type":{"type":"array","description":"A list of invoice types to filter by. Possible values: INVOICE, CREDIT_NOTE","items":{"type":"string"}},"processing_statuses":{"type":"array","description":"A list of processing statuses to filter by. Possible values: TO_BE_PROCESSED, IN_PROGRESS, PROCESSED, ERROR, MANUAL, INCOMPLETE","items":{"type":"string"}},"supplier_ids":{"type":"array","description":"A list of supplier IDs to filter by.","items":{"type":"string"}}}},"has_selected_all":{"type":"boolean","description":"Whether all invoices should be exported. With `selected_ids`, every invoice except those listed is exported, and `filters` is ignored. Without `selected_ids`, it is ignored when `filters` is set."},"detail_level":{"type":"string","enum":["totals","lines"],"default":"totals","description":"What one row of the file stands for. `totals`, the default, returns one row per invoice; `lines` returns one row per invoice line and needs the Invoice Line Level module."}}},"examples":{"Request Example":{"value":{"outlet":"529100044450000","filters":{"approval_statuses":["PENDING_APPROVAL","FLAGGED"]}}},"Request Example - line detail":{"value":{"outlet":"529100044450000","has_selected_all":true,"detail_level":"lines"}}}}}},"responses":{"200":{"description":"200","content":{"*/*":{"examples":{"Result - detail_level: totals (default)":{"value":"Supplier Name,Invoice #,Apicbase PO #,Total Invoice Amount,Total PO Amount,Difference,Difference %,Invoice Date,Due Date,Processing Status,Approval Status\nSupplier Sample,041109,#20240624-1444-12,€ 100.50,€ 1384.00,€ -1283.50,-92.74,2024-01-02,2024-01-03,MANUAL,RECEIVED\nSupplier Sample,041102,#20240624-1444-12,€ 100.50,€ 1384.00,€ -1283.50,-92.74,2024-01-02,2024-01-03,ERROR,RECEIVED\nSupplier Sample,041107,#20240624-1444-12,€ 100.50,€ 1384.00,€ -1283.50,-92.74,2024-01-02,2024-01-03,TO_BE_PROCESSED,RECEIVED\nSupplier Sample,041108,#20240624-1444-12,€ 100.50,€ 1384.00,€ -1283.50,-92.74,2024-01-02,2024-01-03,ERROR,RECEIVED"},"Result - detail_level: lines":{"value":"Supplier Name,Invoice #,Apicbase PO #,Total Invoice Amount,Total PO Amount,Difference,Difference %,Invoice Date,Due Date,Processing Status,Approval Status,Line #,Product Code,Item Name,Quantity,Unit,Unit Price,Line Total,Tax %,Tax Amount,Line Total (gross),Delivery Note #\nSupplier Sample,041109,#20240624-1444-12,€ 100.50,€ 1384.00,€ -1283.50,-92.74,2024-01-02,2024-01-03,MANUAL,RECEIVED,1,ART-1,Sourdough,2.00000,PCE,10.0000,20.00,6.00,1.20,21.20,DN-800537529\nSupplier Sample,041109,#20240624-1444-12,€ 100.50,€ 1384.00,€ -1283.50,-92.74,2024-01-02,2024-01-03,MANUAL,RECEIVED,2,ART-2,Baguette,2.00000,PCE,10.0000,20.00,6.00,1.20,21.20,DN-800537529\nSupplier Sample,041102,#20240624-1444-12,€ 100.50,€ 1384.00,€ -1283.50,-92.74,2024-01-02,2024-01-03,ERROR,RECEIVED,,,,,,,,,,,"}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"403":{"description":"`detail_level` is `lines` and the library does not have the Invoice Line Level module, or the user cannot view invoices.","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"message\": \"Line-level invoice detail is not enabled for this library.\"\n}"}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Line-level invoice detail is not enabled for this library."}}}}}}},"deprecated":false}},"/invoices/bulk_delete/":{"post":{"summary":"Bulk Delete Invoices","description":"Deletes multiple invoices at once.","operationId":"bulk-delete-invoices","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["outlet"],"properties":{"outlet":{"type":"string","description":"The ID of the outlet."},"selected_ids":{"type":"array","description":"List of specific invoice IDs to select. If not empty, all other fields will be ignored.","items":{"type":"string"}},"filters":{"type":"object","description":"Filters to apply to the invoices. If not empty, the 'has_selected_all' field will be ignored.","properties":{"approval_statuses":{"type":"array","description":"A list of approval statuses to filter by. Possible values: RECEIVED, PENDING_APPROVAL, FLAGGED, APPROVED, REJECTED, PAID","items":{"type":"string"}},"approved_by":{"type":"array","description":"A list of IDs of users that approved invoices to filter by.","items":{"type":"string"}},"created_by":{"type":"array","description":"A list of IDs of users that created invoices to filter by.","items":{"type":"string"}},"invoice_type":{"type":"array","description":"A list of invoice types to filter by. Possible values: INVOICE, CREDIT_NOTE","items":{"type":"string"}},"processing_statuses":{"type":"array","description":"A list of processing statuses to filter by. Possible values: TO_BE_PROCESSED, IN_PROGRESS, PROCESSED, ERROR, MANUAL, INCOMPLETE","items":{"type":"string"}},"supplier_ids":{"type":"array","description":"A list of supplier IDs to filter by.","items":{"type":"string"}}}},"has_selected_all":{"type":"boolean","description":"Whether all invoices should be deleted. It will be considered only if the other fields are empty."}}},"examples":{"Request Example":{"value":{"outlet":"529100044450000","filters":{"processing_statuses":["ERROR","INCOMPLETE"]}}}}}}},"responses":{"204":{"description":"204"},"400":{"description":"400"}},"deprecated":false}},"/procurement/incoming_orders/":{"get":{"summary":"Get Incoming Orders","description":"Returns a list of incoming orders for a supplier outlet.","operationId":"get-incoming-orders","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"supplier_outlet","in":"query","description":"Filter by the internal supplier outlet ID fulfilling the order.","schema":{"type":"string"}},{"name":"ordering_outlet","in":"query","description":"Filter by the outlet ID that placed the original purchase order.","schema":{"type":"string"}},{"name":"control_number","in":"query","description":"Filter on an exact order number.","schema":{"type":"string"}},{"name":"control_number__contains","in":"query","description":"Filter on a order number containing the specified string.","schema":{"type":"string"}},{"name":"po_number","in":"query","schema":{"type":"string","default":"Filter on an exact purchase order number."}},{"name":"po_number__contains","in":"query","description":"Filter on a purchase order number containing the specified string.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by incoming order status.","schema":{"type":"string","enum":["RECEIVED","PICKED","SENT"]}},{"name":"status__in","in":"query","description":"Filter by multiple incoming order statuses. Comma-separated values.","schema":{"type":"array","items":{"type":"string"}}},{"name":"ordered_by","in":"query","description":"Filter by the user ID who ordered the original purchase order.","schema":{"type":"string"}},{"name":"delivery_closed","in":"query","description":"Filter on orders that are or are not accepting more deliveries.","schema":{"type":"string"}},{"name":"ordered_on","in":"query","description":"Filter on the exact 'ordered on' date of the purchase order.","schema":{"type":"string"}},{"name":"ordered_on__gt","in":"query","description":"Filter orders where the purchase order's 'ordered on' date is after the specified date.","schema":{"type":"string"}},{"name":"ordered_on__lt","in":"query","description":"Filter orders where the purchase order's 'ordered on' date is before the specified date.","schema":{"type":"string"}},{"name":"received_on","in":"query","description":"Filter on the exact 'received_on' date of the purchase order.","schema":{"type":"string"}},{"name":"received_on__gt","in":"query","description":"Filter orders where the purchase order's 'received_on' date is after the specified date.","schema":{"type":"string"}},{"name":"received_on__lt","in":"query","description":"Filter orders where the purchase order's 'received_on' date is before the specified date.","schema":{"type":"string"}},{"name":"expected_delivery_date","in":"query","description":"Filter on the exact expected delivery date of the purchase order.","schema":{"type":"string"}},{"name":"expected_delivery_date__gt","in":"query","description":"Filter orders where the purchase order's expected delivery date is after the specified date.","schema":{"type":"string"}},{"name":"expected_delivery_date__lt","in":"query","description":"Filter orders where the purchase order's expected delivery date is before the specified date.","schema":{"type":"string"}},{"name":"discount","in":"query","description":"Filter on the exact discount amount of the purchase order.","schema":{"type":"string"}},{"name":"discount__gt","in":"query","description":"Filter orders where the purchase order's discount is greater than the specified amount.","schema":{"type":"string"}},{"name":"discount__lt","in":"query","description":"Filter orders where the purchase order's discount is less than the specified amount.","schema":{"type":"string"}},{"name":"sent_by","in":"query","description":"Filter by the user ID who sent the order.","schema":{"type":"string"}},{"name":"sent_on","in":"query","description":"Filter on the exact 'sent on' date of the order.","schema":{"type":"string"}},{"name":"sent_on__gt","in":"query","description":"Filter orders where the 'sent on' date is after the specified date.","schema":{"type":"string"}},{"name":"sent_on__lt","in":"query","description":"Filter orders where the 'sent on' date is before the specified date.","schema":{"type":"string"}},{"name":"has_updated_stock","in":"query","description":"Filter on whether the order has updated stock when sent.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"count\": 5683,\n\t\"next\": \"http://app.apicbase.com/api/v2/procurement/incoming_orders/?ordering=sent_on&page=2\",\n\t\"previous\": null,\n\t\"results\": [\n\t\t{\n\t\t\t\"id\": \"379000460060007\",\n\t\t\t\"control_number\": \"#20XXXXXX-XXX-1\",\n\t\t\t\"po_number\": \"#20XXXXXX-XXXX-1\",\n\t\t\t\"status\": \"SENT\",\n\t\t\t\"supplier_outlet\": {\n\t\t\t\t\"id\": \"229000616500002\",\n\t\t\t\t\"name\": \"outlet-XXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/229000616500002/\"\n\t\t\t},\n\t\t\t\"ordering_outlet\": {\n\t\t\t\t\"id\": \"929100431000000\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/929100431000000/\"\n\t\t\t},\n\t\t\t\"added_by\": {\n\t\t\t\t\"id\": \"325040858170005\",\n\t\t\t\t\"email\": [\n\t\t\t\t\t\"john.doe@email.com\"\n\t\t\t\t],\n\t\t\t\t\"name\": \"supplier-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/suppliers/325040858170005/\",\n\t\t\t\t\"integrated\": false\n\t\t\t},\n\t\t\t\"expected_delivery_date\": \"2019-07-11T10:00:00Z\",\n\t\t\t\"ordered_on\": \"2019-07-10T14:44:39Z\",\n\t\t\t\"ordered_by\": null,\n\t\t\t\"order_remarks\": null,\n\t\t\t\"delivery_remarks\": null,\n\t\t\t\"delivery_fee\": null,\n\t\t\t\"discount\": null,\n\t\t\t\"discount_remarks\": null,\n\t\t\t\"returnables_in\": null,\n\t\t\t\"returnables_out\": null,\n\t\t\t\"returnables_remarks\": null,\n\t\t\t\"manual_price_after_discount_returnables\": null,\n\t\t\t\"theoretical_price\": \"XX.XX\",\n\t\t\t\"delivery_closed\": true,\n\t\t\t\"picked_order_information\": {\n\t\t\t\t\"sent_on\": \"2019-07-11T00:00:00Z\",\n\t\t\t\t\"sent_by\": null,\n\t\t\t\t\"actual_price\": \"XX.XX\",\n\t\t\t\t\"has_updated_stock\": true\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"579000711000002\",\n\t\t\t\"control_number\": \"#20XXXXXX-XXXX-2\",\n\t\t\t\"po_number\": \"#20XXXXXX-XXXX-6\",\n\t\t\t\"status\": \"SENT\",\n\t\t\t\"supplier_outlet\": {\n\t\t\t\t\"id\": \"829100783010001\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/829100783010001/\"\n\t\t\t},\n\t\t\t\"ordering_outlet\": {\n\t\t\t\t\"id\": \"629100192060000\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/629100192060000/\"\n\t\t\t},\n\t\t\t\"received_on\": null,\n\t\t\t\"expected_delivery_date\": null,\n\t\t\t\"ordered_on\": \"2019-08-15T11:45:29Z\",\n\t\t\t\"ordered_by\": {\n\t\t\t\t\"id\": \"736400010670005\",\n\t\t\t\t\"username\": \"user1@example.com\",\n\t\t\t\t\"first_name\": \"FirstName1\",\n\t\t\t\t\"last_name\": \"LastName1\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/users/736400010670005/\"\n\t\t\t},\n\t\t\t\"order_remarks\": null,\n\t\t\t\"delivery_remarks\": null,\n\t\t\t\"discount\": null,\n\t\t\t\"discount_remarks\": null,\n\t\t\t\"returnables_in\": null,\n\t\t\t\"returnables_out\": null,\n\t\t\t\"returnables_remarks\": null,\n\t\t\t\"manual_price_after_discount_returnables\": null,\n\t\t\t\"theoretical_price\": null,\n\t\t\t\"delivery_closed\": true,\n\t\t\t\"picked_order_information\": {\n\t\t\t\t\"sent_on\": \"2019-08-16T14:17:36Z\",\n\t\t\t\t\"sent_by\": {\n\t\t\t\t\t\"id\": \"736400010670005\",\n\t\t\t\t\t\"username\": \"user1@example.com\",\n\t\t\t\t\t\"first_name\": \"FirstName1\",\n\t\t\t\t\t\"last_name\": \"LastName1\",\n\t\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/users/736400010670005/\"\n\t\t\t\t},\n\t\t\t\t\"actual_price\": \"X.XX\",\n\t\t\t\t\"has_updated_stock\": true\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"879000421080004\",\n\t\t\t\"control_number\": \"#20XXXXXX-XXXX-5\",\n\t\t\t\"po_number\": \"#20XXXXXX-XXXX-4\",\n\t\t\t\"status\": \"SENT\",\n\t\t\t\"supplier_outlet\": {\n\t\t\t\t\"id\": \"629100273050005\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/629100273050005/\"\n\t\t\t},\n\t\t\t\"ordering_outlet\": {\n\t\t\t\t\"id\": \"629100003030007\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/629100003030007/\"\n\t\t\t},\n\t\t\t\"received_on\": null,\n\t\t\t\"expected_delivery_date\": null,\n\t\t\t\"ordered_on\": \"2019-08-19T12:33:02Z\",\n\t\t\t\"ordered_by\": null,\n\t\t\t\"order_remarks\": null,\n\t\t\t\"delivery_remarks\": null,\n\t\t\t\"discount\": null,\n\t\t\t\"discount_remarks\": null,\n\t\t\t\"returnables_in\": null,\n\t\t\t\"returnables_out\": null,\n\t\t\t\"returnables_remarks\": null,\n\t\t\t\"manual_price_after_discount_returnables\": null,\n\t\t\t\"theoretical_price\": null,\n\t\t\t\"delivery_closed\": true,\n\t\t\t\"picked_order_information\": {\n\t\t\t\t\"sent_on\": \"2019-08-19T14:33:47Z\",\n\t\t\t\t\"sent_by\": null,\n\t\t\t\t\"actual_price\": \"X.XX\",\n\t\t\t\t\"has_updated_stock\": true\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"679000031050008\",\n\t\t\t\"control_number\": \"#20XXXXXX-XXXX-8\",\n\t\t\t\"po_number\": \"#20XXXXXX-XXXX-5\",\n\t\t\t\"status\": \"SENT\",\n\t\t\t\"supplier_outlet\": {\n\t\t\t\t\"id\": \"629100273050005\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/629100273050005/\"\n\t\t\t},\n\t\t\t\"ordering_outlet\": {\n\t\t\t\t\"id\": \"629100003030007\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/629100003030007/\"\n\t\t\t},\n\t\t\t\"received_on\": null,\n\t\t\t\"expected_delivery_date\": null,\n\t\t\t\"ordered_on\": \"2019-08-19T15:11:46Z\",\n\t\t\t\"ordered_by\": null,\n\t\t\t\"order_remarks\": null,\n\t\t\t\"delivery_remarks\": null,\n\t\t\t\"discount\": null,\n\t\t\t\"discount_remarks\": null,\n\t\t\t\"returnables_in\": null,\n\t\t\t\"returnables_out\": null,\n\t\t\t\"returnables_remarks\": null,\n\t\t\t\"manual_price_after_discount_returnables\": null,\n\t\t\t\"theoretical_price\": null,\n\t\t\t\"delivery_closed\": true,\n\t\t\t\"picked_order_information\": {\n\t\t\t\t\"sent_on\": \"2019-08-19T17:14:26Z\",\n\t\t\t\t\"sent_by\": null,\n\t\t\t\t\"actual_price\": \"X.XX\",\n\t\t\t\t\"has_updated_stock\": true\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"279000641060001\",\n\t\t\t\"control_number\": \"#20XXXXXX-XXXX-12\",\n\t\t\t\"po_number\": \"#20XXXXXX-XXXX-6\",\n\t\t\t\"status\": \"SENT\",\n\t\t\t\"supplier_outlet\": {\n\t\t\t\t\"id\": \"629100273050005\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/629100273050005/\"\n\t\t\t},\n\t\t\t\"ordering_outlet\": {\n\t\t\t\t\"id\": \"629100003030007\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/629100003030007/\"\n\t\t\t},\n\t\t\t\"received_on\": null,\n\t\t\t\"expected_delivery_date\": null,\n\t\t\t\"ordered_on\": \"2019-08-19T15:37:23Z\",\n\t\t\t\"ordered_by\": null,\n\t\t\t\"order_remarks\": null,\n\t\t\t\"delivery_remarks\": null,\n\t\t\t\"discount\": null,\n\t\t\t\"discount_remarks\": null,\n\t\t\t\"returnables_in\": null,\n\t\t\t\"returnables_out\": null,\n\t\t\t\"returnables_remarks\": null,\n\t\t\t\"manual_price_after_discount_returnables\": null,\n\t\t\t\"theoretical_price\": \"XX.XX\",\n\t\t\t\"delivery_closed\": true,\n\t\t\t\"picked_order_information\": {\n\t\t\t\t\"sent_on\": \"2019-08-19T17:38:15Z\",\n\t\t\t\t\"sent_by\": null,\n\t\t\t\t\"actual_price\": \"XX.XX\",\n\t\t\t\t\"has_updated_stock\": true\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"879000571070009\",\n\t\t\t\"control_number\": \"#20XXXXXX-XXXX-2\",\n\t\t\t\"po_number\": \"#20XXXXXX-XXXX-3\",\n\t\t\t\"status\": \"SENT\",\n\t\t\t\"supplier_outlet\": {\n\t\t\t\t\"id\": \"229100596030001\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/229100596030001/\"\n\t\t\t},\n\t\t\t\"ordering_outlet\": {\n\t\t\t\t\"id\": \"229100886000001\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/229100886000001/\"\n\t\t\t},\n\t\t\t\"received_on\": null,\n\t\t\t\"expected_delivery_date\": \"2019-08-22T10:00:00Z\",\n\t\t\t\"ordered_on\": \"2019-08-21T12:46:11Z\",\n\t\t\t\"ordered_by\": null,\n\t\t\t\"order_remarks\": null,\n\t\t\t\"delivery_remarks\": null,\n\t\t\t\"discount\": null,\n\t\t\t\"discount_remarks\": null,\n\t\t\t\"returnables_in\": null,\n\t\t\t\"returnables_out\": null,\n\t\t\t\"returnables_remarks\": null,\n\t\t\t\"manual_price_after_discount_returnables\": null,\n\t\t\t\"theoretical_price\": null,\n\t\t\t\"delivery_closed\": true,\n\t\t\t\"picked_order_information\": {\n\t\t\t\t\"sent_on\": \"2019-08-21T14:47:37Z\",\n\t\t\t\t\"sent_by\": null,\n\t\t\t\t\"actual_price\": \"X.XX\",\n\t\t\t\t\"has_updated_stock\": true\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"679000381010009\",\n\t\t\t\"control_number\": \"#20XXXXXX-XXXX-3\",\n\t\t\t\"po_number\": \"#20XXXXXX-XXXX-4\",\n\t\t\t\"status\": \"SENT\",\n\t\t\t\"supplier_outlet\": {\n\t\t\t\t\"id\": \"229100596030001\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/229100596030001/\"\n\t\t\t},\n\t\t\t\"ordering_outlet\": {\n\t\t\t\t\"id\": \"229100886000001\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/229100886000001/\"\n\t\t\t},\n\t\t\t\"received_on\": null,\n\t\t\t\"expected_delivery_date\": null,\n\t\t\t\"ordered_on\": \"2019-08-21T13:06:35Z\",\n\t\t\t\"ordered_by\": null,\n\t\t\t\"order_remarks\": null,\n\t\t\t\"delivery_remarks\": null,\n\t\t\t\"discount\": null,\n\t\t\t\"discount_remarks\": null,\n\t\t\t\"returnables_in\": null,\n\t\t\t\"returnables_out\": null,\n\t\t\t\"returnables_remarks\": null,\n\t\t\t\"manual_price_after_discount_returnables\": null,\n\t\t\t\"theoretical_price\": null,\n\t\t\t\"delivery_closed\": true,\n\t\t\t\"picked_order_information\": {\n\t\t\t\t\"sent_on\": \"2019-08-21T15:09:09Z\",\n\t\t\t\t\"sent_by\": null,\n\t\t\t\t\"actual_price\": \"X.XX\",\n\t\t\t\t\"has_updated_stock\": true\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"679000361090006\",\n\t\t\t\"control_number\": \"#20XXXXXX-XXXX-1\",\n\t\t\t\"po_number\": \"#20XXXXXX-XXXX-1\",\n\t\t\t\"status\": \"SENT\",\n\t\t\t\"supplier_outlet\": {\n\t\t\t\t\"id\": \"229100596030001\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/229100596030001/\"\n\t\t\t},\n\t\t\t\"ordering_outlet\": {\n\t\t\t\t\"id\": \"229100886000001\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/229100886000001/\"\n\t\t\t},\n\t\t\t\"received_on\": null,\n\t\t\t\"expected_delivery_date\": null,\n\t\t\t\"ordered_on\": \"2019-08-21T10:25:06Z\",\n\t\t\t\"ordered_by\": null,\n\t\t\t\"order_remarks\": null,\n\t\t\t\"delivery_remarks\": null,\n\t\t\t\"discount\": null,\n\t\t\t\"discount_remarks\": null,\n\t\t\t\"returnables_in\": null,\n\t\t\t\"returnables_out\": null,\n\t\t\t\"returnables_remarks\": null,\n\t\t\t\"manual_price_after_discount_returnables\": null,\n\t\t\t\"theoretical_price\": null,\n\t\t\t\"delivery_closed\": true,\n\t\t\t\"picked_order_information\": {\n\t\t\t\t\"sent_on\": \"2019-08-22T08:00:00Z\",\n\t\t\t\t\"sent_by\": null,\n\t\t\t\t\"actual_price\": \"X.XX\",\n\t\t\t\t\"has_updated_stock\": true\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"279000091070006\",\n\t\t\t\"control_number\": \"#20XXXXXX-XXX-2\",\n\t\t\t\"po_number\": \"#20XXXXXX-XX-15\",\n\t\t\t\"status\": \"SENT\",\n\t\t\t\"supplier_outlet\": {\n\t\t\t\t\"id\": \"729000261520003\",\n\t\t\t\t\"name\": \"outlet-XXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/729000261520003/\"\n\t\t\t},\n\t\t\t\"ordering_outlet\": {\n\t\t\t\t\"id\": \"329000165030003\",\n\t\t\t\t\"name\": \"outlet-XX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/329000165030003/\"\n\t\t\t},\n\t\t\t\"received_on\": null,\n\t\t\t\"expected_delivery_date\": \"2019-08-23T00:00:00Z\",\n\t\t\t\"ordered_on\": \"2019-08-22T12:31:43Z\",\n\t\t\t\"ordered_by\": {\n\t\t\t\t\"id\": \"336000711050009\",\n\t\t\t\t\"username\": \"user2@example.com\",\n\t\t\t\t\"first_name\": \"FirstName2\",\n\t\t\t\t\"last_name\": \"LastName2\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/users/336000711050009/\"\n\t\t\t},\n\t\t\t\"order_remarks\": null,\n\t\t\t\"delivery_remarks\": null,\n\t\t\t\"discount\": \"XX.XX\",\n\t\t\t\"discount_remarks\": null,\n\t\t\t\"returnables_in\": null,\n\t\t\t\"returnables_out\": null,\n\t\t\t\"returnables_remarks\": null,\n\t\t\t\"manual_price_after_discount_returnables\": null,\n\t\t\t\"theoretical_price\": \"XXXX.XX\",\n\t\t\t\"delivery_closed\": true,\n\t\t\t\"picked_order_information\": {\n\t\t\t\t\"sent_on\": \"2019-08-22T14:32:38Z\",\n\t\t\t\t\"sent_by\": {\n\t\t\t\t\t\"id\": \"336000711050009\",\n\t\t\t\t\t\"username\": \"user2@example.com\",\n\t\t\t\t\t\"first_name\": \"FirstName2\",\n\t\t\t\t\t\"last_name\": \"LastName2\",\n\t\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/users/336000711050009/\"\n\t\t\t\t},\n\t\t\t\t\"actual_price\": \"XXXX.XX\",\n\t\t\t\t\"has_updated_stock\": true\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"id\": \"579000502010008\",\n\t\t\t\"control_number\": \"#20XXXXXX-XXXX-13\",\n\t\t\t\"po_number\": \"#20XXXXXX-XXXX-7\",\n\t\t\t\"status\": \"SENT\",\n\t\t\t\"supplier_outlet\": {\n\t\t\t\t\"id\": \"629100273050005\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/629100273050005/\"\n\t\t\t},\n\t\t\t\"ordering_outlet\": {\n\t\t\t\t\"id\": \"629100003030007\",\n\t\t\t\t\"name\": \"outlet-XXXX\",\n\t\t\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/outlets/629100003030007/\"\n\t\t\t},\n\t\t\t\"received_on\": null,\n\t\t\t\"expected_delivery_date\": null,\n\t\t\t\"ordered_on\": \"2019-08-23T07:12:53Z\",\n\t\t\t\"ordered_by\": null,\n\t\t\t\"order_remarks\": null,\n\t\t\t\"delivery_remarks\": null,\n\t\t\t\"discount\": null,\n\t\t\t\"discount_remarks\": null,\n\t\t\t\"returnables_in\": null,\n\t\t\t\"returnables_out\": null,\n\t\t\t\"returnables_remarks\": null,\n\t\t\t\"manual_price_after_discount_returnables\": null,\n\t\t\t\"theoretical_price\": \"XX.XX\",\n\t\t\t\"delivery_closed\": true,\n\t\t\t\"picked_order_information\": {\n\t\t\t\t\"sent_on\": \"2019-08-23T09:15:17Z\",\n\t\t\t\t\"sent_by\": null,\n\t\t\t\t\"actual_price\": \"XX.XX\",\n\t\t\t\t\"has_updated_stock\": true\n\t\t\t}\n\t\t}\n\t]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":5683,"default":0},"next":{"type":"string","example":"http://app.apicbase.com/api/v2/procurement/incoming_orders/?ordering=sent_on&page=2"},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"379000460060007"},"control_number":{"type":"string","example":"#20XXXXXX-XXX-1"},"po_number":{"type":"string","example":"#20XXXXXX-XXXX-1"},"status":{"type":"string","example":"SENT"},"supplier_outlet":{"type":"object","properties":{"id":{"type":"string","example":"229000616500002"},"name":{"type":"string","example":"outlet-XXX"},"url":{"type":"string","example":"http://app.apicbase.com/api/v2/accounts/outlets/229000616500002/"}}},"ordering_outlet":{"type":"object","properties":{"id":{"type":"string","example":"929100431000000"},"name":{"type":"string","example":"outlet-XXXX"},"url":{"type":"string","example":"http://app.apicbase.com/api/v2/accounts/outlets/929100431000000/"}}},"added_by":{"type":"object","properties":{"id":{"type":"string","example":"325040858170005"},"email":{"type":"array","items":{"type":"string","example":"john.doe@email.com"}},"name":{"type":"string","example":"supplier-XXXX"},"url":{"type":"string","example":"http://app.apicbase.com/api/v2/accounts/suppliers/325040858170005/"},"integrated":{"type":"boolean","example":false,"default":true}}},"expected_delivery_date":{"type":"string","example":"2019-07-11T10:00:00Z"},"ordered_on":{"type":"string","example":"2019-07-10T14:44:39Z"},"ordered_by":{},"order_remarks":{},"delivery_remarks":{},"delivery_fee":{},"discount":{},"discount_remarks":{},"returnables_in":{},"returnables_out":{},"returnables_remarks":{},"manual_price_after_discount_returnables":{},"theoretical_price":{"type":"string","example":"XX.XX"},"delivery_closed":{"type":"boolean","example":true,"default":true},"picked_order_information":{"type":"object","properties":{"sent_on":{"type":"string","example":"2019-07-11T00:00:00"},"sent_by":{},"actual_price":{"type":"string","example":"XX.XX"},"has_updated_stock":{"type":"boolean","example":true,"default":true}}}}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/procurement/incoming_orders/{incoming_order_id}":{"get":{"summary":"Get Incoming Order","description":"Returns details about a specific incoming order.","operationId":"get-incoming-order","parameters":[{"name":"incoming_order_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"id\": \"000000000000001\",\n\t\"control_number\": \"#20230101-001-1\",\n\t\"po_number\": \"#20230101-002-1\",\n\t\"status\": \"SENT\",\n\t\"supplier_outlet\": {\n\t\t\"id\": \"000000000000002\",\n\t\t\"name\": \"supplier-outlet\",\n\t\t\"url\": \"https://app.apicbase.com/api/v2/accounts/outlets/000000000000002/\"\n\t},\n\t\"ordering_outlet\": {\n\t\t\"id\": \"000000000000003\",\n\t\t\"name\": \"ordering-outlet\",\n\t\t\"url\": \"http://example.com/api/v2/accounts/outlets/000000000000003/\"\n\t},\n\t\"added_by\": {\n\t\t\"id\": \"325040858170005\",\n\t\t\"email\": [\n\t\t\t\"john.doe@email.com\"\n\t\t],\n\t\t\"name\": \"supplier-XXXX\",\n\t\t\"url\": \"http://app.apicbase.com/api/v2/accounts/suppliers/325040858170005/\",\n\t\t\"integrated\": false\n\t},\n\t\"expected_delivery_date\": \"2023-01-02T10:00:00Z\",\n\t\"ordered_on\": \"2023-01-01T14:44:39Z\",\n\t\"ordered_by\": null,\n\t\"order_remarks\": null,\n\t\"delivery_remarks\": null,\n\t\"discount\": null,\n\t\"discount_remarks\": null,\n\t\"delivery_fee\": null,\n\t\"returnables_in\": null,\n\t\"returnables_out\": null,\n\t\"returnables_remarks\": null,\n\t\"manual_price_after_discount_returnables\": null,\n\t\"theoretical_price\": \"10.00\",\n\t\"delivery_closed\": true,\n\t\"picked_order_information\": {\n\t\t\"sent_on\": \"2023-01-02T00:00:00\",\n\t\t\"sent_by\": null,\n\t\t\"actual_price\": \"10.00\",\n\t\t\"has_updated_stock\": true,\n\t\t\"packages\": [\n\t\t\t{\n\t\t\t\t\"incoming_order_package_id\": \"000000000000004\",\n\t\t\t\t\"quantity_picked\": 1,\n\t\t\t\t\"remarks\": null,\n\t\t\t\t\"actual_price\": \"6.00\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"incoming_order_package_id\": \"000000000000005\",\n\t\t\t\t\"quantity_picked\": 1,\n\t\t\t\t\"remarks\": null,\n\t\t\t\t\"actual_price\": \"4.00\"\n\t\t\t}\n\t\t]\n\t},\n\t\"packages\": [\n\t\t{\n\t\t\t\"id\": \"000000000000005\",\n\t\t\t\"stock_item\": {\n\t\t\t\t\"id\": \"000000000000006\",\n\t\t\t\t\"name\": \"Example Product A (5 kg)\",\n\t\t\t\t\"url\": \"http://example.com/api/v2/products/stock_items/000000000000006/\"\n\t\t\t},\n\t\t\t\"supplier_package\": {\n\t\t\t\t\"id\": \"000000000000007\",\n\t\t\t\t\"supplier_article_number\": null,\n\t\t\t\t\"theoretical_price_per_package\": \"4.00\",\n\t\t\t\t\"url\": \"http://example.com/api/v2/products/supplier_packages/000000000000007/\"\n\t\t\t},\n\t\t\t\"quantity_ordered\": 1,\n\t\t\t\"total_theoretical_price\": \"4.00\"\n\t\t},\n\t\t{\n\t\t\t\"id\": \"000000000000004\",\n\t\t\t\"stock_item\": {\n\t\t\t\t\"id\": \"000000000000008\",\n\t\t\t\t\"name\": \"EXAMPLE PRODUCT B 1X1KG 1 x 1 kg\",\n\t\t\t\t\"url\": \"http://example.com/api/v2/products/stock_items/000000000000008/\"\n\t\t\t},\n\t\t\t\"supplier_package\": {\n\t\t\t\t\"id\": \"000000000000009\",\n\t\t\t\t\"supplier_article_number\": null,\n\t\t\t\t\"theoretical_price_per_package\": \"6.00\",\n\t\t\t\t\"url\": \"http://example.com/api/v2/products/supplier_packages/000000000000009/\"\n\t\t\t},\n\t\t\t\"quantity_ordered\": 1,\n\t\t\t\"total_theoretical_price\": \"6.00\"\n\t\t}\n\t]\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"000000000000001"},"control_number":{"type":"string","example":"#20230101-001-1"},"po_number":{"type":"string","example":"#20230101-002-1"},"status":{"type":"string","example":"SENT"},"supplier_outlet":{"type":"object","properties":{"id":{"type":"string","example":"000000000000002"},"name":{"type":"string","example":"supplier-outlet"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/000000000000002/"}}},"ordering_outlet":{"type":"object","properties":{"id":{"type":"string","example":"000000000000003"},"name":{"type":"string","example":"ordering-outlet"},"url":{"type":"string","example":"http://example.com/api/v2/accounts/outlets/000000000000003/"}}},"added_by":{"type":"object","properties":{"id":{"type":"string","example":"325040858170005"},"email":{"type":"array","items":{"type":"string","example":"john.doe@email.com"}},"name":{"type":"string","example":"supplier-XXXX"},"url":{"type":"string","example":"http://app.apicbase.com/api/v2/accounts/suppliers/325040858170005/"},"integrated":{"type":"boolean","example":false,"default":true}}},"expected_delivery_date":{"type":"string","example":"2023-01-02T10:00:00Z"},"ordered_on":{"type":"string","example":"2023-01-01T14:44:39Z"},"ordered_by":{},"order_remarks":{},"delivery_remarks":{},"discount":{},"discount_remarks":{},"delivery_fee":{},"returnables_in":{},"returnables_out":{},"returnables_remarks":{},"manual_price_after_discount_returnables":{},"theoretical_price":{"type":"string","example":"10.00"},"delivery_closed":{"type":"boolean","example":true,"default":true},"picked_order_information":{"type":"object","properties":{"sent_on":{"type":"string","example":"2023-01-02T00:00:00"},"sent_by":{},"actual_price":{"type":"string","example":"10.00"},"has_updated_stock":{"type":"boolean","example":true,"default":true},"packages":{"type":"array","items":{"type":"object","properties":{"incoming_order_package_id":{"type":"string","example":"000000000000004"},"quantity_picked":{"type":"integer","example":1,"default":0},"remarks":{},"actual_price":{"type":"string","example":"6.00"}}}}}},"packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000005"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"000000000000006"},"name":{"type":"string","example":"Example Product A (5 kg)"},"url":{"type":"string","example":"http://example.com/api/v2/products/stock_items/000000000000006/"}}},"supplier_package":{"type":"object","properties":{"id":{"type":"string","example":"000000000000007"},"supplier_article_number":{},"theoretical_price_per_package":{"type":"string","example":"4.00"},"url":{"type":"string","example":"http://example.com/api/v2/products/supplier_packages/000000000000007/"}}},"quantity_ordered":{"type":"integer","example":1,"default":0},"total_theoretical_price":{"type":"string","example":"4.00"}}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/procurement/incoming_orders/{incoming_order_id}/pick/":{"post":{"summary":"Pick Incoming Order","description":"Records the picked quantities for an incoming order and moves it to `PICKED` status. The same endpoint can be used to edit an already-picked order, in which case the previously recorded quantities and remarks are replaced.","operationId":"pick-incoming-order","parameters":[{"name":"incoming_order_id","in":"path","description":"The incoming order's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","description":"One entry per package to pick. Must contain at least one item. Each entry identifies the package with either `incoming_order_package` (an existing package on the order) or `supplier_package` (to add a new supplier package to the order at pick time) — exactly one of the two is required.","minItems":1,"items":{"type":"object","required":["quantity_picked"],"oneOf":[{"required":["incoming_order_package"]},{"required":["supplier_package"]}],"properties":{"incoming_order_package":{"type":"string","description":"The ID of an existing incoming order package being picked. Provide this or `supplier_package`, not both.","example":"000000000000004"},"supplier_package":{"type":"string","description":"The ID of a supplier package to add to the order at pick time. Use this when picking a package that was not part of the original order. Provide this or `incoming_order_package`, not both.","example":"000000000000020"},"quantity_picked":{"type":"string","pattern":"^[0-9]+\\.?[0-9]*$","description":"The quantity received for this package. Must be zero or positive.","example":"1.00"},"remarks":{"type":"string","nullable":true,"description":"Optional remarks for this package.","example":"Slightly damaged box, contents intact."},"actual_price":{"type":"string","nullable":true,"pattern":"^[0-9]+\\.?[0-9]*$","description":"Optional override of the price actually paid for this package. Must be zero or positive. When omitted on a re-pick, the previously recorded price is preserved.","example":"4.20"}}}},"discount":{"type":"string","nullable":true,"description":"Optional discount applied to the whole order.","example":"5.00"},"discount_remarks":{"type":"string","nullable":true,"description":"Optional remarks describing the discount.","example":"Promotional rate for May."},"delivery_remarks":{"type":"string","nullable":true,"description":"Optional remarks about the delivery itself.","example":"Delivered through back entrance."},"update_stock":{"type":"boolean","description":"Whether to apply the picked quantities to the receiving outlet's stock. Defaults to `true`.","default":true,"example":true}}},"examples":{"Request Example":{"value":{"items":[{"incoming_order_package":"000000000000004","quantity_picked":"1.00","remarks":null,"actual_price":"6.00"},{"incoming_order_package":"000000000000005","quantity_picked":"1.00","remarks":null,"actual_price":"4.00"},{"supplier_package":"000000000000020","quantity_picked":"2.00","remarks":"Added on delivery","actual_price":"3.50"}],"delivery_remarks":"Delivered through back entrance.","update_stock":true}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"000000000000001"},"control_number":{"type":"string","example":"#20260102-001-1"},"po_number":{"type":"string","example":"#20260101-002-1"},"status":{"type":"string","example":"PICKED","enum":["RECEIVED","PICKED","SENT"]},"supplier_outlet":{"type":"object","properties":{"id":{"type":"string","example":"000000000000002"},"name":{"type":"string","example":"Central Kitchen"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/000000000000002/"}}},"ordering_outlet":{"type":"object","properties":{"id":{"type":"string","example":"000000000000003"},"name":{"type":"string","example":"Brussels"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/000000000000003/"}}},"added_by":{"type":"object","properties":{"id":{"type":"string","example":"325040858170005"},"email":{"type":"array","items":{"type":"string","example":"ordering@centralkitchen.com"}},"name":{"type":"string","example":"Central Kitchen"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/suppliers/325040858170005/"},"integrated":{"type":"boolean","example":false}}},"expected_delivery_date":{"type":"string","example":"2026-05-02T10:00:00Z"},"ordered_on":{"type":"string","example":"2026-05-01T14:44:39Z"},"ordered_by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"order_remarks":{"type":"string","nullable":true,"example":null},"delivery_remarks":{"type":"string","nullable":true,"example":"Delivered through back entrance."},"discount":{"type":"string","nullable":true,"example":null},"discount_remarks":{"type":"string","nullable":true,"example":null},"delivery_fee":{"type":"string","nullable":true,"example":null},"returnables_in":{"type":"string","nullable":true,"example":null},"returnables_out":{"type":"string","nullable":true,"example":null},"returnables_remarks":{"type":"string","nullable":true,"example":null},"manual_price_after_discount_returnables":{"type":"string","nullable":true,"example":null},"theoretical_price":{"type":"string","example":"10.00"},"delivery_closed":{"type":"boolean","example":true},"picked_order_information":{"type":"object","nullable":true,"properties":{"sent_on":{"type":"string","nullable":true,"example":null},"sent_by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"actual_price":{"type":"string","example":"10.00"},"has_updated_stock":{"type":"boolean","example":true},"packages":{"type":"array","items":{"type":"object","properties":{"incoming_order_package_id":{"type":"string","example":"000000000000004"},"quantity_picked":{"type":"number","example":1,"description":"Integer for non-weighted packages, decimal for weighted packages."},"remarks":{"type":"string","nullable":true,"example":null},"actual_price":{"type":"string","example":"6.00"}}}}}},"packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000005"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"000000000000006"},"name":{"type":"string","example":"Example Product A (5 kg)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/000000000000006/"}}},"supplier_package":{"type":"object","properties":{"id":{"type":"string","example":"000000000000007"},"supplier_article_number":{"type":"string","nullable":true,"example":null},"supplier_product_name":{"type":"string","nullable":true,"example":null},"theoretical_price_per_package":{"type":"string","nullable":true,"example":"4.00"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/supplier_packages/000000000000007/"}}},"quantity_ordered":{"type":"number","example":1,"description":"Integer for non-weighted packages, decimal for weighted packages."},"total_theoretical_price":{"type":"string","example":"4.00"}}}}}}}}},"400":{"description":"The request items are invalid (for example, both or neither of `incoming_order_package` and `supplier_package` were provided, `actual_price` is negative, or the items target packages that do not belong to the order), or the order has already been shipped."},"403":{"description":"The user does not have permission to pick this incoming order, or a supplier package referenced in `items.supplier_package` is not accessible to the user."},"404":{"description":"Incoming order or supplier package not found."},"409":{"description":"The order is currently being processed by another request. Try again shortly."}},"deprecated":false}},"/procurement/incoming_orders/{incoming_order_id}/ship/":{"post":{"summary":"Ship Incoming Order","description":"Marks a picked incoming order as shipped, moving it to `SENT` status. The order must already be in `PICKED` status.","operationId":"ship-incoming-order","parameters":[{"name":"incoming_order_id","in":"path","description":"The incoming order's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sent_date"],"properties":{"sent_date":{"type":"string","format":"date-time","description":"Date and time the order was shipped. Must not be in the future and must not be more than 180 days in the past.","example":"2026-05-02T10:00:00Z"}}},"examples":{"Request Example":{"value":{"sent_date":"2026-05-02T10:00:00Z"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"000000000000001"},"control_number":{"type":"string","example":"#20260102-001-1"},"po_number":{"type":"string","example":"#20260101-002-1"},"status":{"type":"string","example":"SENT","enum":["RECEIVED","PICKED","SENT"]},"supplier_outlet":{"type":"object","properties":{"id":{"type":"string","example":"000000000000002"},"name":{"type":"string","example":"Central Kitchen"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/000000000000002/"}}},"ordering_outlet":{"type":"object","properties":{"id":{"type":"string","example":"000000000000003"},"name":{"type":"string","example":"Brussels"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/000000000000003/"}}},"added_by":{"type":"object","properties":{"id":{"type":"string","example":"325040858170005"},"email":{"type":"array","items":{"type":"string","example":"ordering@centralkitchen.com"}},"name":{"type":"string","example":"Central Kitchen"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/suppliers/325040858170005/"},"integrated":{"type":"boolean","example":false}}},"expected_delivery_date":{"type":"string","example":"2026-05-02T10:00:00Z"},"ordered_on":{"type":"string","example":"2026-05-01T14:44:39Z"},"ordered_by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"order_remarks":{"type":"string","nullable":true,"example":null},"delivery_remarks":{"type":"string","nullable":true,"example":null},"discount":{"type":"string","nullable":true,"example":null},"discount_remarks":{"type":"string","nullable":true,"example":null},"delivery_fee":{"type":"string","nullable":true,"example":null},"returnables_in":{"type":"string","nullable":true,"example":null},"returnables_out":{"type":"string","nullable":true,"example":null},"returnables_remarks":{"type":"string","nullable":true,"example":null},"manual_price_after_discount_returnables":{"type":"string","nullable":true,"example":null},"theoretical_price":{"type":"string","example":"10.00"},"delivery_closed":{"type":"boolean","example":true},"picked_order_information":{"type":"object","nullable":true,"properties":{"sent_on":{"type":"string","example":"2026-05-02T10:00:00"},"sent_by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"actual_price":{"type":"string","example":"10.00"},"has_updated_stock":{"type":"boolean","example":true},"packages":{"type":"array","items":{"type":"object","properties":{"incoming_order_package_id":{"type":"string","example":"000000000000004"},"quantity_picked":{"type":"number","example":1,"description":"Integer for non-weighted packages, decimal for weighted packages."},"remarks":{"type":"string","nullable":true,"example":null},"actual_price":{"type":"string","example":"6.00"}}}}}},"packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000005"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"000000000000006"},"name":{"type":"string","example":"Example Product A (5 kg)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/000000000000006/"}}},"supplier_package":{"type":"object","properties":{"id":{"type":"string","example":"000000000000007"},"supplier_article_number":{"type":"string","nullable":true,"example":null},"supplier_product_name":{"type":"string","nullable":true,"example":null},"theoretical_price_per_package":{"type":"string","nullable":true,"example":"4.00"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/supplier_packages/000000000000007/"}}},"quantity_ordered":{"type":"number","example":1,"description":"Integer for non-weighted packages, decimal for weighted packages."},"total_theoretical_price":{"type":"string","example":"4.00"}}}}}}}}},"400":{"description":"The order has not been picked yet, has already been shipped, or `sent_date` is missing, in the future, or more than 180 days in the past."},"403":{"description":"The user does not have permission to ship this incoming order."},"404":{"description":"Incoming order not found."},"409":{"description":"The order is currently being processed by another request. Try again shortly."}},"deprecated":false}},"/procurement/incoming_orders/bulk_pick/":{"post":{"summary":"Bulk Pick Incoming Orders","description":"Picks multiple incoming orders in a single call. Each entry in `orders` is treated as an independent pick. The call accepts up to 100 orders. Each order may be identified by its `id` or `control_number` — at least one is required per entry. Orders already in `PICKED` status can be re-picked, which replaces the previously recorded quantities and remarks.","operationId":"bulk-pick-incoming-orders","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["orders"],"properties":{"orders":{"type":"array","description":"Up to 100 incoming orders to pick. Must contain at least one entry.","minItems":1,"maxItems":100,"items":{"type":"object","required":["items"],"oneOf":[{"required":["id"]},{"required":["control_number"]}],"properties":{"id":{"type":"string","description":"The incoming order's ID. Provide this or `control_number`.","example":"000000000000001"},"control_number":{"type":"string","maxLength":100,"description":"The control number of the incoming order. Provide this or `id`.","example":"#20260102-001-1"},"items":{"type":"array","description":"One entry per package to pick for this order. Each entry identifies the package with either `incoming_order_package` (an existing package on the order) or `supplier_package` (to add a new supplier package to the order at pick time) — exactly one of the two is required.","minItems":1,"items":{"type":"object","required":["quantity_picked"],"oneOf":[{"required":["incoming_order_package"]},{"required":["supplier_package"]}],"properties":{"incoming_order_package":{"type":"string","description":"The ID of an existing incoming order package being picked. Provide this or `supplier_package`, not both.","example":"000000000000004"},"supplier_package":{"type":"string","description":"The ID of a supplier package to add to the order at pick time. Provide this or `incoming_order_package`, not both.","example":"000000000000020"},"quantity_picked":{"type":"string","pattern":"^[0-9]+\\.?[0-9]*$","description":"The quantity received for this package. Must be zero or positive.","example":"1.00"},"remarks":{"type":"string","nullable":true,"example":null},"actual_price":{"type":"string","nullable":true,"pattern":"^[0-9]+\\.?[0-9]*$","description":"Optional override of the price actually paid for this package. Must be zero or positive. When omitted on a re-pick, the previously recorded price is preserved.","example":"4.20"}}}},"discount":{"type":"string","nullable":true,"example":null},"discount_remarks":{"type":"string","nullable":true,"example":null},"delivery_remarks":{"type":"string","nullable":true,"example":null},"update_stock":{"type":"boolean","default":true,"example":true}}}}}},"examples":{"Request Example":{"value":{"orders":[{"id":"000000000000001","items":[{"incoming_order_package":"000000000000004","quantity_picked":"1.00"}],"update_stock":true},{"control_number":"#20260102-002-1","items":[{"incoming_order_package":"000000000000010","quantity_picked":"2.00","actual_price":"8.50"},{"supplier_package":"000000000000020","quantity_picked":"1.00","remarks":"Added on delivery"}]}]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","description":"The picked orders, each with the full incoming-order detail shape.","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000001"},"control_number":{"type":"string","example":"#20260102-001-1"},"po_number":{"type":"string","example":"#20260101-002-1"},"status":{"type":"string","example":"PICKED","enum":["RECEIVED","PICKED","SENT"]},"supplier_outlet":{"type":"object","properties":{"id":{"type":"string","example":"000000000000002"},"name":{"type":"string","example":"Central Kitchen"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/000000000000002/"}}},"ordering_outlet":{"type":"object","properties":{"id":{"type":"string","example":"000000000000003"},"name":{"type":"string","example":"Brussels"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/000000000000003/"}}},"added_by":{"type":"object","properties":{"id":{"type":"string","example":"325040858170005"},"email":{"type":"array","items":{"type":"string","example":"ordering@centralkitchen.com"}},"name":{"type":"string","example":"Central Kitchen"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/suppliers/325040858170005/"},"integrated":{"type":"boolean","example":false}}},"expected_delivery_date":{"type":"string","example":"2026-05-02T10:00:00Z"},"ordered_on":{"type":"string","example":"2026-05-01T14:44:39Z"},"ordered_by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"order_remarks":{"type":"string","nullable":true,"example":null},"delivery_remarks":{"type":"string","nullable":true,"example":null},"discount":{"type":"string","nullable":true,"example":null},"discount_remarks":{"type":"string","nullable":true,"example":null},"delivery_fee":{"type":"string","nullable":true,"example":null},"returnables_in":{"type":"string","nullable":true,"example":null},"returnables_out":{"type":"string","nullable":true,"example":null},"returnables_remarks":{"type":"string","nullable":true,"example":null},"manual_price_after_discount_returnables":{"type":"string","nullable":true,"example":null},"theoretical_price":{"type":"string","example":"10.00"},"delivery_closed":{"type":"boolean","example":true},"picked_order_information":{"type":"object","nullable":true,"properties":{"sent_on":{"type":"string","nullable":true,"example":null},"sent_by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"actual_price":{"type":"string","example":"10.00"},"has_updated_stock":{"type":"boolean","example":true},"packages":{"type":"array","items":{"type":"object","properties":{"incoming_order_package_id":{"type":"string","example":"000000000000004"},"quantity_picked":{"type":"number","example":1,"description":"Integer for non-weighted packages, decimal for weighted packages."},"remarks":{"type":"string","nullable":true,"example":null},"actual_price":{"type":"string","example":"6.00"}}}}}},"packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000005"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"000000000000006"},"name":{"type":"string","example":"Example Product A (5 kg)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/000000000000006/"}}},"supplier_package":{"type":"object","properties":{"id":{"type":"string","example":"000000000000007"},"supplier_article_number":{"type":"string","nullable":true,"example":null},"supplier_product_name":{"type":"string","nullable":true,"example":null},"theoretical_price_per_package":{"type":"string","nullable":true,"example":"4.00"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/supplier_packages/000000000000007/"}}},"quantity_ordered":{"type":"number","example":1,"description":"Integer for non-weighted packages, decimal for weighted packages."},"total_theoretical_price":{"type":"string","example":"4.00"}}}}}}}}}},"400":{"description":"One or more orders are invalid (for example, duplicate identifiers, unknown order, an order already in `SENT`, items with both or neither of `incoming_order_package` and `supplier_package`, or negative `actual_price`). Failures are returned under `orders` and no orders are picked."},"403":{"description":"The user does not have permission to pick incoming orders, or a supplier package referenced in `items.supplier_package` is not accessible to the user."},"404":{"description":"An incoming order or supplier package referenced in the request was not found."},"409":{"description":"One or more orders are currently being processed by another request. Try again shortly."}},"deprecated":false}},"/procurement/incoming_orders/bulk_ship/":{"post":{"summary":"Bulk Ship Incoming Orders","description":"Marks multiple picked incoming orders as shipped, moving each to `SENT` status. The call accepts up to 100 orders. Each order may be identified by its `id` or `control_number` — at least one is required per entry. Every order must already be in `PICKED` status.","operationId":"bulk-ship-incoming-orders","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["orders"],"properties":{"orders":{"type":"array","description":"Up to 100 incoming orders to ship. Must contain at least one entry.","minItems":1,"maxItems":100,"items":{"type":"object","required":["sent_date"],"oneOf":[{"required":["id"]},{"required":["control_number"]}],"properties":{"id":{"type":"string","description":"The incoming order's ID. Provide this or `control_number`.","example":"000000000000001"},"control_number":{"type":"string","maxLength":100,"description":"The control number of the incoming order. Provide this or `id`.","example":"#20260102-001-1"},"sent_date":{"type":"string","format":"date-time","description":"Date and time the order was shipped. Must not be in the future and must not be more than 180 days in the past.","example":"2026-05-02T10:00:00Z"}}}}}},"examples":{"Request Example":{"value":{"orders":[{"id":"000000000000001","sent_date":"2026-05-02T10:00:00Z"},{"control_number":"#20260102-002-1","sent_date":"2026-05-02T10:00:00Z"}]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","description":"The shipped orders, each with the full incoming-order detail shape.","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000001"},"control_number":{"type":"string","example":"#20260102-001-1"},"po_number":{"type":"string","example":"#20260101-002-1"},"status":{"type":"string","example":"SENT","enum":["RECEIVED","PICKED","SENT"]},"supplier_outlet":{"type":"object","properties":{"id":{"type":"string","example":"000000000000002"},"name":{"type":"string","example":"Central Kitchen"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/000000000000002/"}}},"ordering_outlet":{"type":"object","properties":{"id":{"type":"string","example":"000000000000003"},"name":{"type":"string","example":"Brussels"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/outlets/000000000000003/"}}},"added_by":{"type":"object","properties":{"id":{"type":"string","example":"325040858170005"},"email":{"type":"array","items":{"type":"string","example":"ordering@centralkitchen.com"}},"name":{"type":"string","example":"Central Kitchen"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/suppliers/325040858170005/"},"integrated":{"type":"boolean","example":false}}},"expected_delivery_date":{"type":"string","example":"2026-05-02T10:00:00Z"},"ordered_on":{"type":"string","example":"2026-05-01T14:44:39Z"},"ordered_by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"order_remarks":{"type":"string","nullable":true,"example":null},"delivery_remarks":{"type":"string","nullable":true,"example":null},"discount":{"type":"string","nullable":true,"example":null},"discount_remarks":{"type":"string","nullable":true,"example":null},"delivery_fee":{"type":"string","nullable":true,"example":null},"returnables_in":{"type":"string","nullable":true,"example":null},"returnables_out":{"type":"string","nullable":true,"example":null},"returnables_remarks":{"type":"string","nullable":true,"example":null},"manual_price_after_discount_returnables":{"type":"string","nullable":true,"example":null},"theoretical_price":{"type":"string","example":"10.00"},"delivery_closed":{"type":"boolean","example":true},"picked_order_information":{"type":"object","nullable":true,"properties":{"sent_on":{"type":"string","example":"2026-05-02T10:00:00"},"sent_by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"236300957450001"},"username":{"type":"string","example":"john.doe@apicbase.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/accounts/users/236300957450001/"}}},"actual_price":{"type":"string","example":"10.00"},"has_updated_stock":{"type":"boolean","example":true},"packages":{"type":"array","items":{"type":"object","properties":{"incoming_order_package_id":{"type":"string","example":"000000000000004"},"quantity_picked":{"type":"number","example":1,"description":"Integer for non-weighted packages, decimal for weighted packages."},"remarks":{"type":"string","nullable":true,"example":null},"actual_price":{"type":"string","example":"6.00"}}}}}},"packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"000000000000005"},"stock_item":{"type":"object","properties":{"id":{"type":"string","example":"000000000000006"},"name":{"type":"string","example":"Example Product A (5 kg)"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/stock_items/000000000000006/"}}},"supplier_package":{"type":"object","properties":{"id":{"type":"string","example":"000000000000007"},"supplier_article_number":{"type":"string","nullable":true,"example":null},"supplier_product_name":{"type":"string","nullable":true,"example":null},"theoretical_price_per_package":{"type":"string","nullable":true,"example":"4.00"},"url":{"type":"string","example":"https://app.apicbase.com/api/v2/products/supplier_packages/000000000000007/"}}},"quantity_ordered":{"type":"number","example":1,"description":"Integer for non-weighted packages, decimal for weighted packages."},"total_theoretical_price":{"type":"string","example":"4.00"}}}}}}}}}},"400":{"description":"One or more orders are invalid (for example, duplicate identifiers, unknown order, an order not yet picked, an order already in `SENT`, or a `sent_date` that is missing, in the future, or more than 180 days in the past). Failures are returned under `orders` and no orders are shipped."},"403":{"description":"The user does not have permission to ship incoming orders."},"404":{"description":"An incoming order referenced in the request was not found."},"409":{"description":"One or more orders are currently being processed by another request. Try again shortly."}},"deprecated":false}},"/analytics/generic_pos/group_items/":{"post":{"summary":"Create Items and Groups","description":"Creates the product and category catalogue at a location.","operationId":"create-items-and-groups","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"location_id":{"type":"string","description":"A location ID."},"groups":{"type":"array","description":"A list of groups in the catalogue.","items":{"properties":{"pos_id":{"type":"string","description":"The group's ID in the POS."},"name":{"type":"string","description":"The group's name"},"items":{"type":"array","description":"A list of items in the group","items":{"properties":{"pos_id":{"type":"string","description":"The item's ID in the POS."},"plu":{"type":"string","description":"The item PLU identifier. This value must be unique."},"name":{"type":"string","description":"The item name."},"sell_price":{"type":"number","description":"The sell price for one unit of the item.","format":"float"},"tax_percentage":{"type":"number","description":"The tax rate.","format":"float"},"is_active":{"type":"boolean","description":"If false, the product will be marked as inactive.","default":true},"is_modifier":{"type":"boolean","description":"Whether the product is a modifier."}},"required":["plu","name","sell_price","tax_percentage"],"type":"object"}},"subgroups":{"type":"array","description":"A list of subgroups in the group.","items":{"properties":{"pos_id":{"type":"string","description":"The group's ID in the POS."},"name":{"type":"string","description":"The group's name"},"items":{"type":"array","description":"A list of items in the group","items":{"properties":{"pos_id":{"type":"string","description":"The item's ID in the POS."},"plu":{"type":"string","description":"The item PLU identifier. This value must be unique."},"name":{"type":"string","description":"The item name."},"sell_price":{"type":"number","description":"The sell price for one unit of the item.","format":"float"},"tax_percentage":{"type":"number","description":"The tax rate.","format":"float"},"is_active":{"type":"boolean","description":"If false, the product will be marked as inactive.","default":true},"is_modifier":{"type":"boolean","description":"Whether the product is a modifier."}},"required":["plu","name","sell_price","tax_percentage"],"type":"object"}},"subgroups":{"type":"array","description":"A list of subgroups in the group.","default":[]}},"required":["name"],"type":"object"}}},"required":["name"],"type":"object"}}}},"examples":{"Request Example":{"value":{"location_id":"POS_ANTWERPEN","groups":[{"pos_id":"BEV","name":"Beverages","items":[{"pos_id":"A0000000001","name":"Hot Chocolate","plu":"UNC-BEV1","sell_price":3.5,"tax_percentage":12,"is_modifier":false,"is_active":true},{"pos_id":"A0000000002","name":"Orange Juice","plu":"UNC-BEV2","sell_price":2,"tax_percentage":21,"is_modifier":false,"is_active":true}],"subgroups":[{"pos_id":"ALC","name":"Alcoholic","items":[]}]},{"pos_id":"MOD","name":"Modifiers","items":[{"pos_id":"MOD00001","name":"Extra Chocolatey","plu":"MOD1","sell_price":1,"tax_percentage":12,"is_modifier":true,"is_active":true}]}]}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/analytics/generic_pos/product/":{"put":{"summary":"Create or Update Item","description":"Creates or updates a single POS item","operationId":"create-or-update-item","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["location_id","plu","name","group_id","sell_price","tax_percentage"],"properties":{"location_id":{"type":"string","description":"A location ID."},"pos_id":{"type":"string","description":"The item's ID in the POS."},"plu":{"type":"string","description":"The item PLU identifier. This value must be unique."},"name":{"type":"string","description":"The item name."},"group_id":{"type":"string","description":"The POS ID of the group that the product belongs to."},"sell_price":{"type":"number","description":"The sell price for one unit of the item.","format":"float"},"tax_percentage":{"type":"number","description":"The tax rate.","format":"float"},"is_active":{"type":"boolean","description":"If false, the product will be marked as inactive.","default":true},"is_modifier":{"type":"boolean","description":"Whether the product is a modifier.","default":false}}},"examples":{"Request Example":{"value":{"location_id":"POS_ANTWERPEN","pos_id":"A0000000003","name":"Beer","plu":"ALCBEV1","group_id":"ALC","sell_price":3,"tax_percentage":21,"is_modifier":false,"is_active":true}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false},"patch":{"summary":"Update Item","description":"Updates a single item.","operationId":"update-item","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["location_id","plu","name","group_id","sell_price","tax_percentage"],"properties":{"location_id":{"type":"string","description":"A location ID."},"pos_id":{"type":"string","description":"The item's ID in the POS."},"plu":{"type":"string","description":"The item PLU identifier. This value must be unique."},"name":{"type":"string","description":"The item name."},"group_id":{"type":"string","description":"The POS ID of the group that the product belongs to."},"sell_price":{"type":"number","description":"The sell price for one unit of the item.","format":"float"},"tax_percentage":{"type":"number","description":"The tax rate.","format":"float"},"is_active":{"type":"boolean","description":"If false, the product will be marked as inactive.","default":true},"is_modifier":{"type":"boolean","description":"Whether the product is a modifier.","default":false}}},"examples":{"Request Example":{"value":{"location_id":"POS_ANTWERPEN","plu":"ALCBEV1","name":"Special Beer","pos_id":"A0000000003","group_id":"ALC","sell_price":5,"tax_percentage":21,"is_modifier":false,"is_active":true}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/analytics/generic_pos/sales/":{"post":{"summary":"Upload Sales Data","description":"Uploads a list of sales tickets into Apicbase.","operationId":"upload-sales-data","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tickets":{"type":"array","description":"A list of tickets.","items":{"properties":{"location_id":{"type":"string","description":"A location ID."},"pos_id":{"type":"string","description":"The ticket's ID in the POS."},"created_on":{"type":"string","description":"The ticket's creation datetime.","format":"date"},"closed_on":{"type":"string","description":"The ticket's date and time of payment.","format":"date"},"items":{"type":"array","items":{"properties":{"product_plu":{"type":"string","description":"An item's PLU code."},"quantity":{"type":"integer","description":"The item's sold quantity.","format":"int32"},"product_name":{"type":"string","description":"The product's name. If the product is missing in the catalogue, a product will be created with this name. Does nothing if the product is present."},"total_price":{"type":"number","description":"Total price for all products in this line.","format":"float"},"unit_price":{"type":"number","description":"The sell price of one unit of the product.","format":"float"},"tax_percentage":{"type":"number","description":"A tax rate. Defaults to the product's tax rate.","format":"float"},"total_discount":{"type":"number","description":"Total discount applied to this line.","format":"float"},"unit_price_without_tax":{"type":"number","description":"The sell price of one unit of the product, excluding taxes. Calculated if not given.","format":"float"},"modifiers":{"type":"array","items":{"properties":{"product_plu":{"type":"string","description":"An item's PLU code."},"quantity":{"type":"integer","description":"The total quantity of this modifier added to the parent line.","format":"int32"},"total_price":{"type":"number","description":"The total price for all added modifiers.","format":"float"}},"required":["product_plu"],"type":"object"}}},"required":["product_plu","quantity"],"type":"object"}}},"required":["location_id","closed_on"],"type":"object"}}}},"examples":{"Request Example":{"value":{"tickets":[{"location_id":"POS_ANTWERPEN","pos_id":"TKT00001","created_on":"2020-06-01T12:30:00","closed_on":"2020-06-01T13:00:00","items":[{"product_plu":"UNC-BEV1","product_name":"Hot Chocolate","quantity":2,"unit_price":3.5,"tax_percentage":12,"modifiers":[{"product_plu":"MOD1","product_name":"Extra Chocolatey","quantity":1,"total_price":1}]},{"product_plu":"UNC-BEV2","product_name":"Orange Juice","quantity":5,"total_price":10,"tax_percentage":12,"total_discount":2}]}]}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false}},"/analytics/generic_pos/pos_settings/{outlet_id}/":{"get":{"summary":"Get Connection Settings","description":"Returns connection settings for an outlet enabled to use the Generic POS API.","operationId":"get-connection-settings","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"location_id\": \"POS_ANTWERPEN\"\n}"}},"schema":{"type":"object","properties":{"location_id":{"type":"string","example":"POS_ANTWERPEN"}}}}}}},"deprecated":false},"post":{"summary":"Set Connection Settings","description":"Defines connection settings for an outlet.","operationId":"set-connection-settings","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["location_id"],"properties":{"location_id":{"type":"string","description":"A location ID for the outlet."}}},"examples":{"Request Example":{"value":{"location_id":"POS_ANTWERPEN"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"location_id\": \"POS_ANTWERPEN\"\n}"}},"schema":{"type":"object","properties":{"location_id":{"type":"string","example":"POS_ANTWERPEN"}}}}}}},"deprecated":false}},"/analytics/outlets/{outlet_id}/sales/":{"get":{"summary":"Get Item Sales Data","description":"Returns product sales data at a specific outlet.","operationId":"get-item-sales-data","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"updated_at__gt","in":"query","description":"Filter on the data entry's modification date (greater than).","schema":{"type":"string","format":"date"}},{"name":"updated_at__lt","in":"query","description":"Filter on the data entry's modification date (lower than).","schema":{"type":"string","format":"date"}},{"name":"sale_date","in":"query","description":"Filter on a sale date (exact).","schema":{"type":"string","format":"date"}},{"name":"sale_date__gt","in":"query","description":"Filter on a sale date (greater than).","schema":{"type":"string","format":"date"}},{"name":"sale_date__lt","in":"query","description":"Filter on a sale date (lower than).","schema":{"type":"string","format":"date"}},{"name":"revenue__gt","in":"query","description":"Filter on a revenue value (greater than).","schema":{"type":"number","format":"float"}},{"name":"revenue__lt","in":"query","description":"Filter on a revenue value (lower than).","schema":{"type":"number","format":"float"}},{"name":"pos_item__category_name","in":"query","description":"Filter on the name of the category of the sold item.","schema":{"type":"string"}},{"name":"pos_item__plu","in":"query","description":"Filter on the PLU code of the sold item.","schema":{"type":"string"}},{"name":"pos_item__pos_id","in":"query","description":"Filter on the POS ID of the sold item.","schema":{"type":"string"}},{"name":"recipe__accounting_category","in":"query","description":"Filter on the accounting category of the recipe linked to the sold item.","schema":{"type":"string"}},{"name":"recipe__category","in":"query","description":"Filter on the category of the recipe linked to the sold item.","schema":{"type":"string"}},{"name":"recipe__id","in":"query","description":"Filter on the ID of the recipe linked to the sold item.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n    \"count\": 6759,\n    \"next\": \"http://app.apicbase.com/api/v2/analytics/outlets/4444/sales/?page=2\",\n    \"previous\": null,\n    \"results\": [\n        {\n            \"id\": \"asd78s-d723-3286-9273-38e2064368df\",\n            \"sale_date\": \"2022-01-14\",\n            \"updated_at\": \"2022-02-30T14:34:07Z\",\n            \"quantity_sold\": 5,\n            \"average_price\": \"6.49\",\n            \"average_price_without_vat\": \"5.85\",\n            \"revenue\": \"32.43\",\n            \"revenue_without_vat\": \"29.27\",\n            \"discount\": \"2.0700\",\n            \"food_cost\": \"7.98\",\n            \"prime_cost\": \"7.98\",\n            \"profit\": \"21.29\",\n            \"profit_margin\": \"72.7300\",\n            \"total_tax\": \"3.16\",\n            \"recipe\": {\n                \"id\": null,\n                \"name\": \"CHICKEN FINGERS\",\n                \"accounting_category\": \"\",\n                \"category\": \"\",\n                \"subcategory\": \"\"\n            },\n            \"pos_item\": {\n                \"pos_id\": \"PoSBrand-PPR-BI903\",\n                \"name\": \"CHICKEN FINGERS\",\n                \"plu\": \"PPR-BI903\",\n                \"category_name\": \"SNACK\",\n                \"pos_type\": \"brand-type\"\n            }\n        },\n        {\n            \"id\": \"298ds9q-b2a1-3a63-9b47-9d52be925dce\",\n            \"sale_date\": \"2022-02-14\",\n            \"updated_at\": \"2022-02-30T11:34:07Z\",\n            \"quantity_sold\": 6,\n            \"average_price\": \"3.50\",\n            \"average_price_without_vat\": \"3.30\",\n            \"revenue\": \"21.00\",\n            \"revenue_without_vat\": \"19.80\",\n            \"discount\": \"0.0000\",\n            \"food_cost\": \"3.86\",\n            \"prime_cost\": \"3.86\",\n            \"profit\": \"15.94\",\n            \"profit_margin\": \"80.4900\",\n            \"total_tax\": \"1.20\",\n            \"recipe\": {\n                \"id\": null,\n                \"name\": \"APPLE SAUCE\",\n                \"accounting_category\": \"\",\n                \"category\": \"\",\n                \"subcategory\": \"\"\n            },\n            \"pos_item\": {\n                \"pos_id\": \"brand-PPR-DEL2512\",\n                \"name\": \"APPLE SAUCE\",\n                \"plu\": \"PPR-DEL2512\",\n                \"category_name\": \"FOOD\",\n                \"pos_type\": \"brand\"\n            }\n        }\n    ]\n}  "}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":6759,"default":0},"next":{"type":"string","example":"http://app.apicbase.com/api/v2/analytics/outlets/4444/sales/?page=2"},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"asd78s-d723-3286-9273-38e2064368df"},"sale_date":{"type":"string","example":"2022-01-14"},"updated_at":{"type":"string","example":"2022-02-30T14:34:07Z"},"quantity_sold":{"type":"integer","example":5,"default":0},"average_price":{"type":"string","example":"6.49"},"average_price_without_vat":{"type":"string","example":"5.85"},"revenue":{"type":"string","example":"32.43"},"revenue_without_vat":{"type":"string","example":"29.27"},"discount":{"type":"string","example":"2.0700"},"food_cost":{"type":"string","example":"7.98"},"prime_cost":{"type":"string","example":"7.98"},"profit":{"type":"string","example":"21.29"},"profit_margin":{"type":"string","example":"72.7300"},"total_tax":{"type":"string","example":"3.16"},"recipe":{"type":"object","properties":{"id":{},"name":{"type":"string","example":"CHICKEN FINGERS"},"accounting_category":{"type":"string","example":""},"category":{"type":"string","example":""},"subcategory":{"type":"string","example":""}}},"pos_item":{"type":"object","properties":{"pos_id":{"type":"string","example":"PoSBrand-PPR-BI903"},"name":{"type":"string","example":"CHICKEN FINGERS"},"plu":{"type":"string","example":"PPR-BI903"},"category_name":{"type":"string","example":"SNACK"},"pos_type":{"type":"string","example":"brand-type"}}}}}}}}}}}},"deprecated":false}},"/analytics/outlets/{outlet_id}/margin":{"get":{"summary":"Get Aggregated Sales Data","description":"Returns high-level sales data at an outlet for a specific day.","operationId":"get-aggregated-sales-data","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"date","in":"query","description":"The date being queried.","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"outlet\": \"229100415400002\",\n  \"date\": \"2020-06-01\",\n  \"products_sold\": 9,\n  \"revenue_including_tax\": \"47.00\",\n  \"revenue_excluding_tax\": \"41.96\",\n  \"prime_cost\": \"0.00\",\n  \"food_cost\": \"0.00\",\n  \"profit\": \"41.96\",\n  \"profit_food_cost\": \"41.96\",\n  \"profit_margin\": \"1.0000\",\n  \"profit_margin_food_cost\": \"1.0000\"\n}"}},"schema":{"type":"object","properties":{"outlet":{"type":"string","example":"229100415400002"},"date":{"type":"string","example":"2020-06-01"},"products_sold":{"type":"integer","example":9,"default":0},"revenue_including_tax":{"type":"string","example":"47.00"},"revenue_excluding_tax":{"type":"string","example":"41.96"},"prime_cost":{"type":"string","example":"0.00"},"food_cost":{"type":"string","example":"0.00"},"profit":{"type":"string","example":"41.96"},"profit_food_cost":{"type":"string","example":"41.96"},"profit_margin":{"type":"string","example":"1.0000"},"profit_margin_food_cost":{"type":"string","example":"1.0000"}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":{"message":"This outlet has no POS connected.","code":"no_active_pos"}}}}}}},"deprecated":false}},"/analytics/outlets/{outlet_id}/pos_items/":{"get":{"summary":"Get POS Items in Outlet","description":"Returns a list of active POS items in an outlet.","operationId":"get-pos-items-in-outlet","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"count\": 3,\n  \"next\": null,\n  \"previous\": null,\n  \"results\": [\n    {\n      \"outlet\": \"229100415400002\",\n      \"pos_id\": \"MOD00001\",\n      \"name\": \"Extra Chocolatey\",\n      \"plu\": \"MOD1\",\n      \"sell_price\": \"1.00\",\n      \"tax_percentage\": \"12.00\",\n      \"is_modifier\": true,\n      \"is_active\": true,\n      \"linked_recipe\": null\n    },\n    {\n      \"outlet\": \"229100415400002\",\n      \"pos_id\": \"A0000000001\",\n      \"name\": \"Hot Chocolate\",\n      \"plu\": \"UNC-BEV1\",\n      \"sell_price\": \"3.50\",\n      \"tax_percentage\": \"12.00\",\n      \"is_modifier\": false,\n      \"is_active\": true,\n      \"linked_recipe\": \"449980552170001\"\n    },\n    {\n      \"outlet\": \"229100415400002\",\n      \"pos_id\": \"A0000000002\",\n      \"name\": \"Orange Juice\",\n      \"plu\": \"UNC-BEV2\",\n      \"sell_price\": \"2.00\",\n      \"tax_percentage\": \"21.00\",\n      \"is_modifier\": false,\n      \"is_active\": true,\n      \"linked_recipe\": \"749980262120005\"\n    }\n  ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":3,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"outlet":{"type":"string","example":"229100415400002"},"pos_id":{"type":"string","example":"MOD00001"},"name":{"type":"string","example":"Extra Chocolatey"},"plu":{"type":"string","example":"MOD1"},"sell_price":{"type":"string","example":"1.00"},"tax_percentage":{"type":"string","example":"12.00"},"is_modifier":{"type":"boolean","example":true,"default":true},"is_active":{"type":"boolean","example":true,"default":true},"linked_recipe":{}}}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"No active POS":{"value":{"message":"This outlet has no POS connected.","code":"no_active_pos"}},"Unsupported POS type":{"value":{"message":"This outlet's POS integration is not correctly configured.","code":"unsupported_pos_type"}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":{"message":"Outlet not found."}}}}}}},"deprecated":false}},"/sales/{outlet_id}/revenue/":{"get":{"summary":"Get Revenue","description":"Returns the total revenue from an outlet on a date or range of dates.","operationId":"get-revenue","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"dates","in":"query","description":"A list of dates to get revenue for. If given, date_from and date_to should be omitted.","schema":{"type":"array","items":{"type":"string","format":"date"}}},{"name":"date_from","in":"query","description":"A start date for the period being queried.","schema":{"type":"string","format":"date"}},{"name":"date_to","in":"query","description":"An end date for the period being queried.","schema":{"type":"string","format":"date"}},{"name":"recipes_to_include","in":"query","description":"A list of recipe IDs to include in revenue calculation. If given, only revenue from sales of these recipes will be considered.","schema":{"type":"array","items":{"type":"string"}}},{"name":"recipes_to_exclude","in":"query","description":"A list of recipe IDs to exclude from revenue calculation. If given, revenue from sales of these recipes will NOT be considered.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"revenue\": \"353.77\"\n}"}},"schema":{"type":"object","properties":{"revenue":{"type":"string","example":"353.77"}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"message\": \"Resource not found\"\n}"}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false,"x-readme":{"samples-languages":["curl"]}}},"/sales/{outlet_id}/revenue/recipes/":{"get":{"summary":"Get Recipes Revenue","description":"Returns the total revenue from an outlet on a date or range of dates, discriminated by recipe.","operationId":"get-recipes-revenue","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true},{"name":"dates","in":"query","description":"A list of dates to get revenue for. If given, date_from and date_to should be omitted.","schema":{"type":"array","items":{"type":"string","format":"date"}}},{"name":"date_from","in":"query","description":"A start date for the period being queried.","schema":{"type":"string","format":"date"}},{"name":"date_to","in":"query","description":"An end date for the period being queried.","schema":{"type":"string","format":"date"}},{"name":"recipes_to_include","in":"query","description":"A list of recipe IDs to include in revenue calculation. If given, only revenue from sales of these recipes will be considered.","schema":{"type":"array","items":{"type":"string"}}},{"name":"recipes_to_exclude","in":"query","description":"A list of recipe IDs to exclude from revenue calculation. If given, revenue from sales of these recipes will NOT be considered.","schema":{"type":"array","items":{"type":"string"}}},{"name":"dimensions","in":"query","description":"Optional field to add more granularity to the result. Options: date (if set, the result will have the `date` field, not only the `recipe_id` and the `revenue`).","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"[\n\t{\n\t\t\"recipe_id\": \"949390932510004\",\n\t\t\"revenue\": \"141.51\"\n\t},\n\t{\n\t\t\"recipe_id\": \"549390842500003\",\n\t\t\"revenue\": \"113.21\"\n\t},\n\t{\n\t\t\"recipe_id\": \"749390172500000\",\n\t\t\"revenue\": \"99.06\"\n\t}\n]"}},"schema":{"type":"array","items":{"type":"object","properties":{"recipe_id":{"type":"string","example":"949390932510004"},"revenue":{"type":"string","example":"141.51"}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"message\": \"Resource not found\"\n}"}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false,"x-readme":{"samples-languages":["curl"]}}},"/sales/{outlet_id}/pos-products/link/":{"post":{"summary":"Bulk Link POS Products","description":"Links up to 100 POS products to Apicbase recipes or ingredients in a single request.\n\nEach item must provide either `recipe_id` or `ingredient_id`, not both. Individual items may fail without failing the entire request. If a product is already linked, the existing link is replaced.","operationId":"bulk-link-pos-products","parameters":[{"name":"outlet_id","in":"path","description":"The ID of the outlet.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["links"],"properties":{"links":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","required":["plu"],"properties":{"plu":{"type":"string","maxLength":100,"description":"The PLU of the POS product to link. Matches the `plu` field from the list POS items endpoint."},"recipe_id":{"type":"string","description":"The ID of the recipe to link to. Mutually exclusive with `ingredient_id`."},"ingredient_id":{"type":"string","description":"The ID of the ingredient to link to. Mutually exclusive with `recipe_id`. A wrapper recipe is auto-created."}}}}}},"examples":{"Request Example":{"value":{"links":[{"plu":"COLA-001","recipe_id":"149788799360003"},{"plu":"FANTA-002","ingredient_id":"529200335190001"}]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"plu":{"type":"string","description":"The PLU of the POS product."},"status":{"type":"string","enum":["linked","error"],"description":"Outcome for this item."},"link_level":{"type":"string","nullable":true,"enum":["library","outlet"],"description":"Where the link was created."},"linked_recipe_id":{"type":"string","nullable":true,"description":"The ID of the recipe the product is now linked to."},"error":{"type":"string","nullable":true,"description":"Error message when status is `error`."}}}},"examples":{"Result":{"value":[{"plu":"COLA-001","status":"linked","link_level":"outlet","linked_recipe_id":"149788799360003"},{"plu":"FANTA-002","status":"linked","link_level":"outlet","linked_recipe_id":"850300112040007"}]}}}}},"400":{"description":"Validation error (empty list, both recipe_id and ingredient_id provided, etc.)."},"403":{"description":"Insufficient permissions."},"404":{"description":"Outlet not found."}},"deprecated":false}},"/sales/{outlet_id}/pos-products/unlink/":{"post":{"summary":"Bulk Unlink POS Products","description":"Unlinks up to 100 POS products from their linked recipes in a single request.\n\nAlready-unlinked products return `skipped` (idempotent).","operationId":"bulk-unlink-pos-products","parameters":[{"name":"outlet_id","in":"path","description":"The ID of the outlet.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["plus"],"properties":{"plus":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","maxLength":100},"description":"List of POS product PLU codes to unlink."}}},"examples":{"Request Example":{"value":{"plus":["COLA-001","FANTA-002"]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"plu":{"type":"string","description":"The PLU of the POS product."},"status":{"type":"string","enum":["unlinked","skipped","error"],"description":"Outcome for this item."},"link_level":{"type":"string","nullable":true,"enum":["library","outlet"],"description":"Where the link was removed from."},"error":{"type":"string","nullable":true,"description":"Error message when status is `error`."}}}},"examples":{"Result":{"value":[{"plu":"COLA-001","status":"unlinked","link_level":"outlet"},{"plu":"FANTA-002","status":"skipped","link_level":null}]}}}}},"400":{"description":"Validation error (empty list, exceeds 100 items)."},"403":{"description":"Insufficient permissions."},"404":{"description":"Outlet not found."}},"deprecated":false}},"/demand_forecasting/{outlet_id}/":{"post":{"summary":"Generate Demand Forecast","description":"Generate a demand forecast for an outlet.","operationId":"generate-demand-forecasting","parameters":[{"name":"outlet_id","in":"path","description":"An outlet's ID.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["forecast_from","forecast_to","sales_period"],"properties":{"forecast_from":{"type":"string","description":"The date from which the forecast should be generated. It should be in the format YYYY-MM-DD. It can be any date but you may want to use future dates. It should be lower than the forecast_to date.","format":"date"},"forecast_to":{"type":"string","description":"The date to which the forecast should be generated. It should be in the format YYYY-MM-DD. It can be any date but you may want to use future dates. It should be higher than the forecast_from date.","format":"date"},"sales_period":{"type":"string","description":"The sales period that should be considered for the forecast. If LAST_WEEK is selected, the forecast will be generated based on the sales of the last week. If LAST_4_WEEKS is selected, the forecast will be generated based on the sales of the last 4 weeks. If YEAR_AGO is selected, the forecast will be generated based on the sales of the same period last year.So if the forecast_from date is 2025-01-01 and the forecast_to date is 2025-01-31, the sales of 2024-01-01 to 2024-01-31 will be considered.","enum":["LAST_WEEK","LAST_4_WEEKS","YEAR_AGO"]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"[\n\t{\n\t\t\"recipe_id\": \"549390842500003\",\n\t\t\"pos_product_name\": null,\n\t\t\"total_quantity\": \"8\",\n\t\t\"total_revenue_without_tax\": \"113.21\"\n\t},\n\t{\n\t\t\"recipe_id\": \"949390932510004\",\n\t\t\"pos_product_name\": null,\n\t\t\"total_quantity\": \"10\",\n\t\t\"total_revenue_without_tax\": \"141.51\"\n\t},\n\t{\n\t\t\"recipe_id\": \"749390172500000\",\n\t\t\"pos_product_name\": null,\n\t\t\"total_quantity\": \"7\",\n\t\t\"total_revenue_without_tax\": \"99.06\"\n\t}\n]"}},"schema":{"type":"array","items":{"type":"object","properties":{"recipe_id":{"type":"string","example":"549390842500003"},"pos_product_name":{},"total_quantity":{"type":"string","example":"8"},"total_revenue_without_tax":{"type":"string","example":"113.21"}}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"message\": \"Resource not found\"\n}"}},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Resource not found"}}}}}}},"deprecated":false,"x-readme":{"samples-languages":["curl"]}}},"/media/images/":{"get":{"summary":"Get Images","description":"Returns a list of images in the library.","operationId":"get-images","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer","format":"int32"}},{"name":"ordering","in":"query","description":"A field to order results by.","schema":{"type":"string"}},{"name":"search","in":"query","description":"Filter on the contents of the description field.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n    \"count\": 2,\n    \"next\": null,\n    \"previous\": null,\n    \"results\": [\n        {\n            \"url\": \"https://app.apicbase.com/api/v2/media/images/781117716150002/\",\n            \"id\": \"781117716150002\",\n            \"studio_login\": \"john.doe@gmail.com\",\n            \"full_image_url\": \"https://example.com/image.jpg\",\n            \"web_image_url\": \"https://example.com/web-image.jpg\",\n            \"thumb_image_url\": \"https://example.com/thumb-image.jpg\",\n            \"restaurant\": null,\n            \"description\": \"SOME TITLE HERE\",\n            \"category\": null,\n            \"uploaded_at\": \"2020-10-28T13:54:48Z\",\n            \"picture_taken_date\": \"2020-10-28T13:54:48Z\",\n            \"shared_on\": null,\n            \"modified_date\": \"2023-05-09T12:14:47Z\",\n            \"uploaded_by\": \"john.doe@gmail.com\",\n            \"tags\": [],\n            \"external\": true\n        },\n        {\n            \"url\": \"https://app.apicbase.com/api/v2/media/images/181566068410002/\",\n            \"id\": \"181566068410002\",\n            \"studio_login\": \"thiago@apicbase.com\",\n            \"full_image_url\": \"https://example.com/image.jpg\",\n            \"web_image_url\": \"https://example.com/web-image.jpg\",\n            \"thumb_image_url\": \"https://example.com/thumb-image.jpg\",\n            \"restaurant\": null,\n            \"description\": \"Spaghetti Bolognese\",\n            \"category\": \"recipe\",\n            \"uploaded_at\": \"2020-06-17T16:08:28Z\",\n            \"picture_taken_date\": \"2020-06-17T16:08:28Z\",\n            \"shared_on\": null,\n            \"modified_date\": \"2020-06-17T16:09:49Z\",\n            \"uploaded_by\": \"john.doe@gmail.com\",\n            \"tags\": [\n                {\n                    \"id\": \"id-54-78\",\n                    \"top\": 78,\n                    \"left\": 54,\n                    \"text\": \"tag 1\"\n                },\n                {\n                    \"id\": \"id-65-43\",\n                    \"top\": 43,\n                    \"left\": 65,\n                    \"text\": \"tag 2\"\n                }\n            ],\n            \"external\": true\n        }\n    ]\n}"}},"schema":{"type":"object","properties":{"count":{"type":"integer","example":2,"default":0},"next":{},"previous":{},"results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v2/media/images/781117716150002/"},"id":{"type":"string","example":"781117716150002"},"studio_login":{"type":"string","example":"john.doe@gmail.com"},"full_image_url":{"type":"string","example":"https://example.com/image.jpg"},"web_image_url":{"type":"string","example":"https://example.com/web-image.jpg"},"thumb_image_url":{"type":"string","example":"https://example.com/thumb-image.jpg"},"restaurant":{},"description":{"type":"string","example":"SOME TITLE HERE"},"category":{},"uploaded_at":{"type":"string","example":"2020-10-28T13:54:48Z"},"picture_taken_date":{"type":"string","example":"2020-10-28T13:54:48Z"},"shared_on":{},"modified_date":{"type":"string","example":"2023-05-09T12:14:47Z"},"uploaded_by":{"type":"string","example":"john.doe@gmail.com"},"tags":{"type":"array"},"external":{"type":"boolean","example":true,"default":true}}}}}}}}}},"deprecated":false}},"/media/images/{image_id}/":{"get":{"summary":"Get Image","description":"Returns a single image.","operationId":"get-image","parameters":[{"name":"image_id","in":"path","description":"The image's ID.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n    \"url\": \"https://app.apicbase.com/api/v2/media/images/781117716150002/\",\n    \"id\": \"781117716150002\",\n    \"studio_login\": \"john.doe@gmail.com\",\n    \"full_image_url\": \"https://s3.example.com/rooms/.../IMG_4626.jpg\",\n    \"web_image_url\": \"https://s3.example.com/rooms/.../IMG_4626-webImage_large.jpg\",\n    \"thumb_image_url\": \"https://s3.example.com/rooms/.../IMG_4626-thumbImage.jpg\",\n    \"restaurant\": null,\n    \"description\": \"SOME TITLE HERE\",\n    \"category\": null,\n    \"uploaded_at\": \"2020-10-28T13:54:48Z\",\n    \"picture_taken_date\": \"2020-10-28T13:54:48Z\",\n    \"shared_on\": null,\n    \"modified_date\": \"2023-05-09T12:14:47Z\",\n    \"uploaded_by\": \"john.doe@gmail.com\",\n    \"tags\": [],\n    \"external\": true\n}"}},"schema":{"type":"object","properties":{"url":{"type":"string","example":"https://app.apicbase.com/api/v2/media/images/781117716150002/"},"id":{"type":"string","example":"781117716150002"},"studio_login":{"type":"string","example":"john.doe@gmail.com"},"full_image_url":{"type":"string","example":"https://s3.example.com/rooms/.../IMG_4626.jpg"},"web_image_url":{"type":"string","example":"https://s3.example.com/rooms/.../IMG_4626-webImage_large.jpg"},"thumb_image_url":{"type":"string","example":"https://s3.example.com/rooms/.../IMG_4626-thumbImage.jpg"},"restaurant":{},"description":{"type":"string","example":"SOME TITLE HERE"},"category":{},"uploaded_at":{"type":"string","example":"2020-10-28T13:54:48Z"},"picture_taken_date":{"type":"string","example":"2020-10-28T13:54:48Z"},"shared_on":{},"modified_date":{"type":"string","example":"2023-05-09T12:14:47Z"},"uploaded_by":{"type":"string","example":"john.doe@gmail.com"},"tags":{"type":"array"},"external":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false}},"/bom/recipes/{recipe_id}/":{"post":{"summary":"Calculate BOM for Single Recipe","description":"Calculate the Bill of Materials for a single recipe. Returns the ingredients needed, stock levels, outstanding orders, and supplier package options.","operationId":"calculate-bom-single-recipe","parameters":[{"name":"recipe_id","in":"path","description":"The ID of the recipe.","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["outlet_id","servings","consider_stock","consider_outstanding_orders"],"properties":{"outlet_id":{"type":"integer","description":"The ID of the outlet."},"servings":{"type":"number","description":"Number of servings to calculate for."},"consider_stock":{"type":"boolean","description":"Whether to subtract current stock from the needed quantity."},"consider_outstanding_orders":{"type":"boolean","description":"Whether to subtract outstanding purchase orders from the needed quantity."}}},"examples":{"Request Example":{"value":{"outlet_id":58001,"servings":50,"consider_stock":true,"consider_outstanding_orders":true}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":{"ingredients":[{"id":"30001","name":"Cherry Tomato","category":"Vegetables","needed_quantity":{"value":"12.50000","unit":"kg"},"in_stock_quantity":{"value":"4.00000","unit":"kg"},"outstanding_order_quantity":{"value":"2.00000","unit":"kg"},"to_order_quantity":{"value":"6.50000","unit":"kg"},"is_orderable":true,"cheapest_package_id":"55010","last_ordered_package_id":"55011","supplier_packages":[{"id":"55010","name":"Cherry Tomato 5kg box","supplier":{"id":"22001","name":"Fresh Farms BV"},"is_weighted":false,"is_orderable":true,"price_per_package":14.5,"order_quantity":"2.00000","order_description":"2 x Cherry Tomato 5kg box","order_total_price":29}]}],"stockable_recipes":[{"recipe":{"id":"40050","name":"Tomato Sauce"},"ingredient":{"id":"30099","name":"Tomato Sauce","category":"Sauces"},"needed_quantity":{"value":"10.00000","unit":"portion"},"in_stock_quantity":{"value":"3.00000","unit":"portion"},"to_prepare_quantity":{"value":"7.00000","unit":"portion"}}]}}},"schema":{"type":"object","properties":{"ingredients":{"type":"array","description":"List of ingredients needed for the BOM.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ingredient ID."},"name":{"type":"string","description":"The ingredient name."},"category":{"type":"string","description":"The ingredient category."},"needed_quantity":{"type":"object","nullable":true,"description":"Total quantity needed.","properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"in_stock_quantity":{"type":"object","nullable":true,"description":"Quantity currently in stock. Null if consider_stock is false.","properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"outstanding_order_quantity":{"type":"object","nullable":true,"description":"Quantity in outstanding purchase orders. Null if consider_outstanding_orders is false.","properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"to_order_quantity":{"type":"object","nullable":true,"description":"Quantity still to order after subtracting stock and outstanding orders.","properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"is_orderable":{"type":"boolean","description":"Whether this ingredient can be ordered."},"cheapest_package_id":{"type":"string","nullable":true,"description":"The ID of the cheapest supplier package."},"last_ordered_package_id":{"type":"string","nullable":true,"description":"The ID of the last ordered supplier package."},"supplier_packages":{"type":"array","description":"Available supplier packages, sorted by cheapest and last-ordered first.","items":{"type":"object","properties":{"id":{"type":"string","description":"The supplier package ID."},"name":{"type":"string","description":"The supplier package name."},"supplier":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"is_weighted":{"type":"boolean"},"is_orderable":{"type":"boolean"},"price_per_package":{"type":"number","nullable":true,"description":"Price per package, rounded to 2 decimals."},"order_quantity":{"type":"string","description":"Quantity to order."},"order_description":{"type":"string","description":"Human-readable order description."},"order_total_price":{"type":"number","nullable":true,"description":"Total price for this order line, rounded to 2 decimals."}}}}}}},"stockable_recipes":{"type":"array","description":"Recipes that are stocked as ingredients (sub-recipes). These need to be prepared, not ordered.","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"ingredient":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}}},"needed_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"in_stock_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"to_prepare_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}}}}}}}}}},"400":{"description":"Invalid request body."},"403":{"description":"User lacks permission."},"404":{"description":"Recipe or outlet not found, or belongs to a different library."}},"deprecated":false}},"/bom/recipes/":{"post":{"summary":"Calculate BOM for Multiple Recipes","description":"Calculate the Bill of Materials for multiple recipes at once. Shared ingredients are aggregated across all recipes.","operationId":"calculate-bom-multiple-recipes","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["outlet_id","recipes","consider_stock","consider_outstanding_orders"],"properties":{"outlet_id":{"type":"integer","description":"The ID of the outlet."},"recipes":{"type":"array","description":"List of recipes with their servings.","minItems":1,"items":{"type":"object","required":["id","servings"],"properties":{"id":{"type":"integer","description":"The recipe ID."},"servings":{"type":"number","description":"Number of servings for this recipe."}}}},"consider_stock":{"type":"boolean","description":"Whether to subtract current stock from the needed quantity."},"consider_outstanding_orders":{"type":"boolean","description":"Whether to subtract outstanding purchase orders from the needed quantity."}}},"examples":{"Request Example":{"value":{"outlet_id":58001,"recipes":[{"id":40012,"servings":50},{"id":40013,"servings":25}],"consider_stock":true,"consider_outstanding_orders":true}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"ingredients":{"type":"array","description":"List of ingredients needed for the BOM. Shared ingredients across recipes are aggregated.","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"needed_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"in_stock_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"outstanding_order_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"to_order_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"is_orderable":{"type":"boolean"},"cheapest_package_id":{"type":"string","nullable":true},"last_ordered_package_id":{"type":"string","nullable":true},"supplier_packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"supplier":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"is_weighted":{"type":"boolean"},"is_orderable":{"type":"boolean"},"price_per_package":{"type":"number","nullable":true},"order_quantity":{"type":"string"},"order_description":{"type":"string"},"order_total_price":{"type":"number","nullable":true}}}}}}},"stockable_recipes":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"ingredient":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}}},"needed_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"in_stock_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"to_prepare_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}}}}}}}}}},"400":{"description":"Invalid request body or recipes not found."},"403":{"description":"User lacks permission."},"404":{"description":"Outlet not found or belongs to a different library."}},"deprecated":false}},"/bom/menus/{menu_id}/":{"post":{"summary":"Calculate BOM for Menu","description":"Calculate the Bill of Materials for all recipes in a menu. The same number of servings is applied to each recipe in the menu.","operationId":"calculate-bom-menu","parameters":[{"name":"menu_id","in":"path","description":"The ID of the menu.","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["outlet_id","servings","consider_stock","consider_outstanding_orders"],"properties":{"outlet_id":{"type":"integer","description":"The ID of the outlet."},"servings":{"type":"number","description":"Number of servings to apply to each recipe in the menu."},"consider_stock":{"type":"boolean","description":"Whether to subtract current stock from the needed quantity."},"consider_outstanding_orders":{"type":"boolean","description":"Whether to subtract outstanding purchase orders from the needed quantity."}}},"examples":{"Request Example":{"value":{"outlet_id":58001,"servings":100,"consider_stock":true,"consider_outstanding_orders":true}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"ingredients":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"needed_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"in_stock_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"outstanding_order_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"to_order_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"is_orderable":{"type":"boolean"},"cheapest_package_id":{"type":"string","nullable":true},"last_ordered_package_id":{"type":"string","nullable":true},"supplier_packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"supplier":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"is_weighted":{"type":"boolean"},"is_orderable":{"type":"boolean"},"price_per_package":{"type":"number","nullable":true},"order_quantity":{"type":"string"},"order_description":{"type":"string"},"order_total_price":{"type":"number","nullable":true}}}}}}},"stockable_recipes":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"ingredient":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}}},"needed_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"in_stock_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}},"to_prepare_quantity":{"type":"object","nullable":true,"properties":{"value":{"type":"string"},"unit":{"type":"string"}}}}}}}}}}},"400":{"description":"Invalid request body."},"403":{"description":"User lacks permission."},"404":{"description":"Menu or outlet not found, or belongs to a different library."}},"deprecated":false}},"/accounts/users/roles/":{"get":{"description":"","operationId":"get_usersroles","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":"string"},"previous":{"type":"string"},"results":{"type":"array","items":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"type":"object"}}}},"examples":{"New Example":{"summary":"New Example","value":{"count":3,"next":null,"previous":null,"results":[{"id":"730000584380008","name":"Default","type":"O"},{"id":"930100855440008","name":"Restricted","type":"O"},{"id":"430100277700008","name":"Admin","type":"L"}]}}}}}}},"parameters":[{"in":"query","name":"page","schema":{"type":"integer"},"description":"A page number within the paginated result set."},{"in":"query","name":"type","schema":{"type":"string","enum":["O","L"]},"description":"A role type to query on. O = Outlet role, L = Library role"},{"in":"query","name":"name","schema":{"type":"string"},"description":"A role name to query on."}]}},"/outlets/{outlet_id}/delivery_notes/":{"post":{"summary":"Create a new delivery note","operationId":"create-apic-delivery-note","parameters":[{"in":"path","name":"outlet_id","required":true,"schema":{"type":"string"},"description":"The ID of the outlet"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"Used for creating a delivery note","type":"object","required":["delivery_note_number","document_date_time","delivery_date_time"],"properties":{"purchase_order":{"type":"object","nullable":true,"description":"The purchase order reference. Optional — if omitted, the delivery note is created without a linked purchase order.","oneOf":[{"type":"object","properties":{"id":{"type":"string","description":"The ID of the purchase order (numeric string)","example":"250604002416001"}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"order_number":{"type":"string","description":"The order number of the purchase order","example":"PO-2024-0001"}},"required":["order_number"],"additionalProperties":false}]},"supplier":{"type":"string","nullable":true,"description":"The ID of the supplier. Optional — if omitted and a purchase order is provided, the supplier is derived from the purchase order.","example":"123456789012345"},"delivery_note_number":{"type":"string","description":"Delivery Note Number","example":"DN-2024-0001"},"document_date_time":{"type":"string","format":"date-time","description":"Document Date/time","example":"2024-06-01T10:00:00Z"},"delivery_date_time":{"type":"string","format":"date-time","description":"Delivery Date/time","example":"2024-06-02T08:00:00Z"},"customer_number":{"type":"string","description":"Customer number","example":"CUST-001"},"delivery_fee":{"type":"number","format":"float","description":"Delivery fee","example":5},"returnables":{"type":"array","description":"List of returnable items (e.g. crates, pallets) associated with the delivery note. If omitted, no returnables are created.","items":{"type":"object","required":["direction","article_name","quantity","price"],"properties":{"direction":{"type":"string","enum":["income","outgoing"],"description":"Whether the returnable is being received (`income`) or returned to the supplier (`outgoing`)."},"article_name":{"type":"string","description":"Name of the returnable article.","example":"Euro Pallet"},"quantity":{"type":"number","format":"float","description":"Quantity of the returnable item.","example":5},"price":{"type":"number","format":"float","description":"Total line price of the returnable item.","example":10},"supplier_article_number":{"type":"string","description":"Supplier's article number for the returnable.","example":"RET-001","nullable":true},"vat_code":{"type":"string","description":"VAT code for the returnable item.","example":"BE21","nullable":true},"returnable_type":{"type":"string","description":"Type classification of the returnable (e.g. `Pallet`, `Crate`).","example":"Pallet","nullable":true}}}},"order_lines":{"type":"array","description":"List of delivery note order lines. May be omitted or empty if at least one `returnables` item is provided. If provided, `line_number` values must start at 1, be sequential, and have no gaps or duplicates.","items":{"type":"object","required":["line_number","supplier_article_number","article_name","delivery_note_quantity"],"properties":{"line_number":{"type":"integer","description":"Line number of the item in the document","example":1},"supplier_article_number":{"type":"string","description":"Supplier Article number","example":"ART-12345"},"article_name":{"type":"string","description":"Article name","example":"Fresh Tomatoes 1kg"},"delivery_note_quantity":{"type":"number","format":"float","description":"Delivered quantity","example":12.5},"package_type":{"type":"string","example":"Box"},"package_quantity":{"type":"number","format":"float","example":2},"base_quantity":{"type":"number","format":"float","example":12.5},"base_unit":{"type":"string","example":"kg"},"gtin_ean_sales_unit":{"type":"string","example":"5412345678901"},"gtin_ean_consumer_unit":{"type":"string","example":"5412345678902"},"portioning":{"type":"boolean","default":false,"example":false},"portioning_weight":{"type":"number","format":"float","example":0.25},"portioning_unit":{"type":"string","example":"kg"},"portioning_description":{"type":"string","example":"Pre-cut portions"},"price":{"type":"number","format":"float","description":"Total line price (as stated on Delivery Note - if any)","example":15.99},"vat_code":{"type":"string","description":"VAT-code (can be used for (external) VAT mapping later on)","example":"BE21"}}}}}},"examples":{"Request Example":{"value":{"purchase_order":{"id":"250604002416001"},"delivery_note_number":"DN-2024-0001","document_date_time":"2024-06-01T10:00:00Z","delivery_date_time":"2024-06-02T08:00:00Z","customer_number":"CUST-001","delivery_fee":5,"order_lines":[{"line_number":1,"supplier_article_number":"ART-12345","article_name":"Fresh Tomatoes 1kg","delivery_note_quantity":12.5,"package_type":"Box","package_quantity":2,"base_quantity":12.5,"base_unit":"kg","gtin_ean_sales_unit":"5412345678901","gtin_ean_consumer_unit":"5412345678902","portioning":false,"portioning_weight":0.25,"portioning_unit":"kg","portioning_description":"Pre-cut portions","price":15.99,"vat_code":"BE21"}],"returnables":[{"direction":"outgoing","article_name":"Euro Pallet","quantity":5,"price":10,"supplier_article_number":"RET-001","vat_code":"BE21","returnable_type":"Pallet"}]}},"Without Purchase Order":{"value":{"supplier":"123456789012345","delivery_note_number":"DN-2024-0002","document_date_time":"2024-06-01T10:00:00Z","delivery_date_time":"2024-06-02T08:00:00Z","order_lines":[{"line_number":1,"supplier_article_number":"ART-12345","article_name":"Fresh Tomatoes 1kg","delivery_note_quantity":12.5}]}},"Returnables only (no order lines)":{"value":{"delivery_note_number":"DN-2024-0002","document_date_time":"2024-06-01T10:00:00Z","delivery_date_time":"2024-06-02T08:00:00Z","supplier":"123456789012345","returnables":[{"direction":"outgoing","article_name":"Euro Pallet","quantity":10,"price":20,"returnable_type":"Pallet"}]}}}}}},"responses":{"201":{"description":"Delivery note created successfully","content":{"application/json":{"schema":{"description":"Represents a delivery note with the basic fields.","type":"object","properties":{"id":{"type":"string","example":"123456789012345"},"supplier":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"delivery_note_number":{"type":"string","example":"DN-2024-0001"},"purchase_order":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"order_number":{"type":"string"},"details_url":{"type":"string","format":"uri","description":"URL to view the purchase order details in the Apicbase app."}}},"outlet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"document_date_time":{"type":"string","format":"date-time","example":"2024-06-01T10:00:00Z"},"delivery_date_time":{"type":"string","format":"date-time","example":"2024-06-02T08:00:00Z"},"customer_number":{"type":"string","example":"CUST-001"},"delivery_fee":{"type":"number","format":"float","example":"5.00000"},"created_by":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"created":{"type":"string","format":"date-time","example":"2024-06-01T12:00:00Z"},"items_count":{"type":"integer","description":"Number of order lines in the delivery note.","example":3},"details_url":{"type":"string","format":"uri","description":"URL to view the delivery note details in the Apicbase app."}}}}}},"400":{"description":"Bad request - validation error"},"404":{"description":"Purchase order not found"}}},"get":{"summary":"List delivery notes","operationId":"list-apic-delivery-notes","parameters":[{"in":"path","name":"outlet_id","required":true,"schema":{"type":"string"},"description":"The ID of the outlet"},{"in":"query","name":"ordering","description":"Order by specified fields (use minus prefix for descending order)","schema":{"type":"string","enum":["delivery_date_time","document_date_time","created","-delivery_date_time","-document_date_time","-created"]}},{"in":"query","name":"supplier_ids","schema":{"type":"string"},"description":"Filter by supplier IDs (comma-separated list of numeric strings)"},{"in":"query","name":"purchase_order_ids","schema":{"type":"string"},"description":"Filter by purchase order IDs (comma-separated list of numeric strings)"},{"in":"query","name":"created_by","schema":{"type":"string"},"description":"Filter by created by IDs (comma-separated list of numeric strings)"},{"in":"query","name":"search","schema":{"type":"string"},"description":"Search by supplier name, delivery note number, customer number, or purchase order number"},{"in":"query","name":"has_purchase_order","schema":{"type":"boolean"},"description":"Filter by whether the delivery note has a linked purchase order. `true` returns only delivery notes with an active purchase order; `false` returns delivery notes with no purchase order or a deleted one. Omitting this parameter returns all delivery notes."},{"in":"query","name":"page","schema":{"type":"integer"},"description":"Page number"},{"in":"query","name":"page_size","schema":{"type":"integer"},"description":"Page size"}],"responses":{"200":{"description":"List of delivery notes","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":"string","format":"uri"},"previous":{"type":"string","format":"uri"},"results":{"type":"array","items":{"description":"Represents a delivery note with only the basic fields. Used for listing delivery notes.","type":"object","properties":{"id":{"type":"string","example":"123456789012345"},"supplier":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"delivery_note_number":{"type":"string","example":"DN-2024-0001"},"purchase_order":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"order_number":{"type":"string"},"details_url":{"type":"string","format":"uri","description":"URL to view the purchase order details in the Apicbase app."}}},"outlet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"document_date_time":{"type":"string","format":"date-time","example":"2024-06-01T10:00:00Z"},"delivery_date_time":{"type":"string","format":"date-time","example":"2024-06-02T08:00:00Z"},"customer_number":{"type":"string","example":"CUST-001"},"delivery_fee":{"type":"number","format":"float","example":"5.00000"},"created_by":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"created":{"type":"string","format":"date-time","example":"2024-06-01T12:00:00Z"},"items_count":{"type":"integer","description":"Number of order lines in the delivery note.","example":3},"details_url":{"type":"string","format":"uri","description":"URL to view the delivery note details in the Apicbase app."}}}}}}}}}}}},"/outlets/{outlet_id}/delivery_notes/{delivery_note_id}/":{"get":{"summary":"Get delivery note details","operationId":"get-apic-delivery-note","parameters":[{"in":"path","name":"outlet_id","required":true,"schema":{"type":"string"},"description":"The ID of the outlet"},{"in":"path","name":"delivery_note_id","required":true,"schema":{"type":"string"},"description":"The ID of the delivery note"}],"responses":{"200":{"description":"Delivery note details retrieved successfully","content":{"application/json":{"schema":{"description":"Represents the details of a delivery note with all the fields","allOf":[{"description":"Represents a delivery note with only the basic fields. Used for listing delivery notes.","type":"object","properties":{"id":{"type":"string","example":"123456789012345"},"supplier":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"delivery_note_number":{"type":"string","example":"DN-2024-0001"},"purchase_order":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"order_number":{"type":"string"},"details_url":{"type":"string","format":"uri","description":"URL to view the purchase order details in the Apicbase app."}}},"outlet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"document_date_time":{"type":"string","format":"date-time","example":"2024-06-01T10:00:00Z"},"delivery_date_time":{"type":"string","format":"date-time","example":"2024-06-02T08:00:00Z"},"customer_number":{"type":"string","example":"CUST-001"},"delivery_fee":{"type":"number","format":"float","example":"5.00000"},"created_by":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"created":{"type":"string","format":"date-time","example":"2024-06-01T12:00:00Z"},"items_count":{"type":"integer","description":"Number of order lines in the delivery note.","example":3},"details_url":{"type":"string","format":"uri","description":"URL to view the delivery note details in the Apicbase app."}}},{"type":"object","properties":{"order_lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"line_number":{"type":"integer"},"supplier_article_number":{"type":"string"},"supplier_package":{"type":"object","properties":{"id":{"type":"string"},"supplier_product_name":{"type":"string"},"stock_item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"purchase_order_package":{"type":"object","properties":{"id":{"type":"string"},"supplier_package":{"type":"object","properties":{"id":{"type":"string"},"supplier_product_name":{"type":"string"},"stock_item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}},"article_name":{"type":"string"},"delivery_note_quantity":{"type":"number","format":"float"},"package_type":{"type":"string"},"package_quantity":{"type":"number","format":"float"},"base_quantity":{"type":"number","format":"float"},"base_unit":{"type":"string"},"gtin_ean_sales_unit":{"type":"string"},"gtin_ean_consumer_unit":{"type":"string"},"portioning":{"type":"boolean","default":false},"portioning_weight":{"type":"number","format":"float"},"portioning_unit":{"type":"string"},"portioning_description":{"type":"string"},"price":{"type":"number","format":"float","description":"Total line price (as stated on Delivery Note - if any)"},"vat_code":{"type":"string"},"article_classification":{"type":"string","enum":["ORDERED_KNOWN","UNORDERED_KNOWN","UNORDERED_UNKNOWN"],"description":"Classification of articles in delivery notes:\n- ORDERED_KNOWN: Direct match with PO packages (CASE I)\n- UNORDERED_KNOWN: Known in system but not in PO (CASE II)\n- UNORDERED_UNKNOWN: Not yet in system (CASE III)\n"}}},"example":[{"line_number":1,"supplier_article_number":"ART-12345","article_name":"Fresh Tomatoes 1kg","delivery_note_quantity":"12.50000","supplier_package":{"id":"521634730770002","supplier_product_name":"supplier-package-436703","stock_item":{"id":"921915970560007","name":"ingredient-nl-62313 Zak (1 kg)"}},"purchase_order_package":null,"package_type":"Zak","package_quantity":"10.00000","base_quantity":"5.00000","base_unit":"kg","gtin_ean_sales_unit":null,"gtin_ean_consumer_unit":null,"portioning":false,"portioning_weight":null,"portioning_unit":null,"portioning_description":null,"price":"2.50000","vat_code":"VAT-20","article_classification":"ORDERED_KNOWN"}]},"returnables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"123456789012345"},"direction":{"type":"string","enum":["income","outgoing"],"description":"Whether the returnable is being received (`income`) or returned to the supplier (`outgoing`)."},"supplier_article_number":{"type":"string","nullable":true},"article_name":{"type":"string"},"quantity":{"type":"number","format":"float"},"vat_code":{"type":"string","nullable":true},"returnable_type":{"type":"string","nullable":true},"price":{"type":"number","format":"float","description":"Total line price of the returnable item."}}},"example":[{"id":"987654321012345","direction":"outgoing","article_name":"Euro Pallet","quantity":"5.00000","price":"10.00000","supplier_article_number":"RET-001","vat_code":"BE21","returnable_type":"Pallet"}]}}}]}}}},"404":{"description":"Delivery note not found"}}},"patch":{"summary":"Update a delivery note","operationId":"update-apic-delivery-note","description":"Update an existing delivery note. All fields are optional - only provided fields will be updated.\nIf `order_lines` are provided, they will replace all existing order lines in the delivery note.\nIf `returnables` are provided, they will replace all existing returnables. If `returnables` is omitted, existing returnables are preserved.\nNote: The created_by field cannot be updated as it represents the original creator.\n","parameters":[{"in":"path","name":"outlet_id","required":true,"schema":{"type":"string"},"description":"The ID of the outlet"},{"in":"path","name":"delivery_note_id","required":true,"schema":{"type":"string"},"description":"The ID of the delivery note to update"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"Used for updating a delivery note. All fields are optional - only provided fields will be updated.","type":"object","properties":{"supplier":{"type":"string","nullable":true,"description":"The ID of the supplier. If a purchase order is also provided, both must reference the same supplier.","example":"123456789012345"},"purchase_order":{"type":"object","nullable":true,"description":"The purchase order reference. If changed, the supplier will be updated accordingly. Send null to explicitly remove the linked purchase order. Omitting this field leaves the existing purchase order unchanged.","oneOf":[{"type":"object","properties":{"id":{"type":"string","description":"The ID of the purchase order (numeric string)","example":"250604002416002"}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"order_number":{"type":"string","description":"The order number of the purchase order","example":"PO-2024-0002"}},"required":["order_number"],"additionalProperties":false}]},"delivery_note_number":{"type":"string","description":"Delivery Note Number","example":"DN-2024-0002"},"document_date_time":{"type":"string","format":"date-time","description":"Document Date/time","example":"2024-06-03T10:00:00Z"},"delivery_date_time":{"type":"string","format":"date-time","description":"Delivery Date/time","example":"2024-06-04T08:00:00Z"},"customer_number":{"type":"string","description":"Customer number","example":"CUST-002"},"delivery_fee":{"type":"number","format":"float","description":"Delivery fee","example":7.5},"order_lines":{"type":"array","items":{"type":"object","required":["line_number","supplier_article_number","article_name","delivery_note_quantity"],"properties":{"line_number":{"type":"integer","description":"Line number of the item in the document","example":1},"supplier_article_number":{"type":"string","description":"Supplier Article number","example":"ART-12345"},"article_name":{"type":"string","description":"Article name","example":"Fresh Tomatoes 1kg"},"delivery_note_quantity":{"type":"number","format":"float","description":"Delivered quantity","example":12.5},"package_type":{"type":"string","example":"Box"},"package_quantity":{"type":"number","format":"float","example":2},"base_quantity":{"type":"number","format":"float","example":12.5},"base_unit":{"type":"string","example":"kg"},"gtin_ean_sales_unit":{"type":"string","example":"5412345678901"},"gtin_ean_consumer_unit":{"type":"string","example":"5412345678902"},"portioning":{"type":"boolean","default":false,"example":false},"portioning_weight":{"type":"number","format":"float","example":0.25},"portioning_unit":{"type":"string","example":"kg"},"portioning_description":{"type":"string","example":"Pre-cut portions"},"price":{"type":"number","format":"float","description":"Total line price (as stated on Delivery Note - if any)","example":15.99},"vat_code":{"type":"string","description":"VAT-code (can be used for (external) VAT mapping later on)","example":"BE21"}}},"minItems":1,"description":"List of delivery note order lines. If provided, will replace all existing order lines.","example":[{"line_number":1,"supplier_article_number":"ART-54321","article_name":"Mozzarella Cheese 500g","delivery_note_quantity":5}]},"returnables":{"type":"array","description":"List of returnable items. If provided, replaces all existing returnables. If omitted, existing returnables are preserved.","items":{"type":"object","required":["direction","article_name","quantity","price"],"properties":{"direction":{"type":"string","enum":["income","outgoing"],"description":"Whether the returnable is being received (`income`) or returned to the supplier (`outgoing`)."},"article_name":{"type":"string","description":"Name of the returnable article.","example":"Euro Pallet"},"quantity":{"type":"number","format":"float","description":"Quantity of the returnable item.","example":5},"price":{"type":"number","format":"float","description":"Total line price of the returnable item.","example":10},"supplier_article_number":{"type":"string","description":"Supplier's article number for the returnable.","example":"RET-001","nullable":true},"vat_code":{"type":"string","description":"VAT code for the returnable item.","example":"BE21","nullable":true},"returnable_type":{"type":"string","description":"Type classification of the returnable (e.g. `Pallet`, `Crate`).","example":"Pallet","nullable":true}}}}}}}}},"responses":{"204":{"description":"Delivery note updated successfully"},"400":{"description":"Bad request - validation error"},"404":{"description":"Delivery note not found"}}},"delete":{"summary":"Delete a delivery note","operationId":"delete-apic-delivery-note","description":"Permanently delete a delivery note and all its associated order lines","parameters":[{"in":"path","name":"outlet_id","required":true,"schema":{"type":"string"},"description":"The ID of the outlet"},{"in":"path","name":"delivery_note_id","required":true,"schema":{"type":"string"},"description":"The ID of the delivery note to delete"}],"responses":{"204":{"description":"Delivery note deleted successfully"},"404":{"description":"Delivery note not found"}}}},"/inventory/outlets/{outlet_id}/stock-periods/":{"get":{"summary":"Get Stock Periods","description":"Returns a list of stock periods in an outlet, most recent first.","operationId":"get-stock-periods","parameters":[{"name":"outlet_id","in":"path","required":true,"description":"The ID of the outlet.","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number.","schema":{"type":"integer"}},{"name":"page_size","in":"query","required":false,"description":"Results per page. Maximum 200.","schema":{"type":"integer"}},{"name":"status","in":"query","required":false,"description":"Only return periods in this state.","schema":{"type":"string","enum":["OPEN","CLOSED","REOPENED"]}},{"name":"search","in":"query","required":false,"description":"Case-insensitive match on the period's name.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of results.","example":2},"next":{"type":"string","nullable":true,"description":"URL of the next page.","example":null},"previous":{"type":"string","nullable":true,"description":"URL of the previous page.","example":null},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the stock period.","example":"794100593140001"},"outlet_id":{"type":"string","description":"The ID of the outlet the period belongs to.","example":"229300089750009"},"name":{"type":"string","description":"The period's name.","example":"June 2026"},"status":{"type":"string","description":"The period's state.","example":"OPEN","enum":["OPEN","CLOSED","REOPENED"]},"opening_count":{"type":"object","nullable":true,"description":"The full count that opens the period. Null when none is assigned.","properties":{"id":{"type":"string","description":"The ID of the count event.","example":"922162621490001"},"name":{"type":"string","nullable":true,"description":"The count's name.","example":"End of June count"},"finished":{"type":"string","format":"date-time","description":"When the count was finalised.","example":"2026-06-30T18:30:00Z","nullable":true}}},"closing_count":{"type":"object","nullable":true,"description":"The full count that closes the period. Null when none is assigned.","properties":{"id":{"type":"string","description":"The ID of the count event.","example":"922162621490001"},"name":{"type":"string","nullable":true,"description":"The count's name.","example":"End of June count"},"finished":{"type":"string","format":"date-time","description":"When the count was finalised.","example":"2026-06-30T18:30:00Z","nullable":true}}},"start_date":{"type":"string","format":"date-time","description":"Start of the period, taken from the opening count.","example":"2026-06-01T08:00:00Z"},"end_date":{"type":"string","format":"date-time","description":"End of the period, set when it closes.","example":"2026-06-30T18:30:00Z","nullable":true},"expected_close_date":{"type":"string","format":"date-time","description":"When the period is scheduled to close.","example":"2026-06-30T23:59:59Z","nullable":true},"opening_stock_value":{"type":"string","nullable":true,"description":"Stock value at the start of the period.","example":"12500.00"},"closing_stock_value":{"type":"string","nullable":true,"description":"Stock value at the end of the period. Null until it closes.","example":"11980.45"},"closed_at":{"type":"string","format":"date-time","description":"When the period was closed.","example":"2026-07-01T09:15:00Z","nullable":true},"closed_by":{"type":"object","nullable":true,"description":"The user who performed the action.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"136000910080000"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"reclosed_at":{"type":"string","format":"date-time","description":"When the period was last closed again after a reopen.","example":"2026-07-03T11:00:00Z","nullable":true},"reclosed_by":{"type":"object","nullable":true,"description":"The user who performed the action.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"136000910080000"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"created":{"type":"string","format":"date-time","description":"When the period was created.","example":"2026-06-01T08:00:05Z"},"modified":{"type":"string","format":"date-time","description":"When the period was last modified.","example":"2026-07-01T09:15:00Z"}}}}}},"examples":{"Result":{"value":{"count":1,"next":null,"previous":null,"results":[{"id":"794100593140001","outlet_id":"229300089750009","name":"June 2026","status":"CLOSED","opening_count":{"id":"922162621490001","name":"Start of June count","finished":"2026-06-01T08:00:00Z"},"closing_count":{"id":"922162621490002","name":"End of June count","finished":"2026-06-30T18:30:00Z"},"start_date":"2026-06-01T08:00:00Z","end_date":"2026-06-30T18:30:00Z","expected_close_date":"2026-06-30T23:59:59Z","opening_stock_value":"12500.00","closing_stock_value":"11980.45","closed_at":"2026-07-01T09:15:00Z","closed_by":{"id":"136000910080000","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"},"reclosed_at":null,"reclosed_by":null,"created":"2026-06-01T08:00:05Z","modified":"2026-07-01T09:15:00Z"}]}}}}}},"400":{"description":"Unknown `status` value."},"403":{"description":"The library does not have the stock periods module enabled, or the user lacks the required permission."},"404":{"description":"Outlet not found."}},"deprecated":false},"post":{"summary":"Create Stock Period","description":"Creates a new stock period in an outlet. Supplying only `opening_count_id` opens a period that runs from that count onwards. Supplying `closing_count_id` as well records a period that has already run its course, created closed between the two counts.","operationId":"create-stock-period","parameters":[{"name":"outlet_id","in":"path","required":true,"description":"The ID of the outlet.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["opening_count_id"],"properties":{"opening_count_id":{"type":"string","description":"ID of the finalised full count that opens the period."},"closing_count_id":{"type":"string","description":"ID of the finalised full count that closes it. Creates the period already closed."},"name":{"type":"string","description":"The period's name. Generated from the outlet's schedule when omitted.","maxLength":200}}},"examples":{"Request Example":{"value":{"opening_count_id":"922162621490001","name":"July 2026"}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the stock period.","example":"794100593140001"},"outlet_id":{"type":"string","description":"The ID of the outlet the period belongs to.","example":"229300089750009"},"name":{"type":"string","description":"The period's name.","example":"June 2026"},"status":{"type":"string","description":"The period's state.","example":"OPEN","enum":["OPEN","CLOSED","REOPENED"]},"opening_count":{"type":"object","nullable":true,"description":"The full count that opens the period. Null when none is assigned.","properties":{"id":{"type":"string","description":"The ID of the count event.","example":"922162621490001"},"name":{"type":"string","nullable":true,"description":"The count's name.","example":"End of June count"},"finished":{"type":"string","format":"date-time","description":"When the count was finalised.","example":"2026-06-30T18:30:00Z","nullable":true}}},"closing_count":{"type":"object","nullable":true,"description":"The full count that closes the period. Null when none is assigned.","properties":{"id":{"type":"string","description":"The ID of the count event.","example":"922162621490001"},"name":{"type":"string","nullable":true,"description":"The count's name.","example":"End of June count"},"finished":{"type":"string","format":"date-time","description":"When the count was finalised.","example":"2026-06-30T18:30:00Z","nullable":true}}},"start_date":{"type":"string","format":"date-time","description":"Start of the period, taken from the opening count.","example":"2026-06-01T08:00:00Z"},"end_date":{"type":"string","format":"date-time","description":"End of the period, set when it closes.","example":"2026-06-30T18:30:00Z","nullable":true},"expected_close_date":{"type":"string","format":"date-time","description":"When the period is scheduled to close.","example":"2026-06-30T23:59:59Z","nullable":true},"opening_stock_value":{"type":"string","nullable":true,"description":"Stock value at the start of the period.","example":"12500.00"},"closing_stock_value":{"type":"string","nullable":true,"description":"Stock value at the end of the period. Null until it closes.","example":"11980.45"},"closed_at":{"type":"string","format":"date-time","description":"When the period was closed.","example":"2026-07-01T09:15:00Z","nullable":true},"closed_by":{"type":"object","nullable":true,"description":"The user who performed the action.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"136000910080000"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"reclosed_at":{"type":"string","format":"date-time","description":"When the period was last closed again after a reopen.","example":"2026-07-03T11:00:00Z","nullable":true},"reclosed_by":{"type":"object","nullable":true,"description":"The user who performed the action.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"136000910080000"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"created":{"type":"string","format":"date-time","description":"When the period was created.","example":"2026-06-01T08:00:05Z"},"modified":{"type":"string","format":"date-time","description":"When the period was last modified.","example":"2026-07-01T09:15:00Z"}}},"examples":{"Result":{"value":{"id":"794100593140001","outlet_id":"229300089750009","name":"June 2026","status":"CLOSED","opening_count":{"id":"922162621490001","name":"Start of June count","finished":"2026-06-01T08:00:00Z"},"closing_count":{"id":"922162621490002","name":"End of June count","finished":"2026-06-30T18:30:00Z"},"start_date":"2026-06-01T08:00:00Z","end_date":"2026-06-30T18:30:00Z","expected_close_date":"2026-06-30T23:59:59Z","opening_stock_value":"12500.00","closing_stock_value":"11980.45","closed_at":"2026-07-01T09:15:00Z","closed_by":{"id":"136000910080000","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"},"reclosed_at":null,"reclosed_by":null,"created":"2026-06-01T08:00:05Z","modified":"2026-07-01T09:15:00Z"}}}}}},"400":{"description":"The count does not belong to the outlet, is not a finalised full count, falls outside the 180-day editable window, or the period would overlap a closed one."},"403":{"description":"The library does not have the stock periods module enabled, or the user lacks the required permission."},"404":{"description":"Outlet not found."}},"deprecated":false}},"/inventory/outlets/{outlet_id}/stock-periods/{period_id}/":{"get":{"summary":"Get Stock Period","description":"Returns information about a specific stock period.","operationId":"get-stock-period","parameters":[{"name":"outlet_id","in":"path","required":true,"description":"The ID of the outlet.","schema":{"type":"string"}},{"name":"period_id","in":"path","required":true,"description":"The ID of the stock period.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the stock period.","example":"794100593140001"},"outlet_id":{"type":"string","description":"The ID of the outlet the period belongs to.","example":"229300089750009"},"name":{"type":"string","description":"The period's name.","example":"June 2026"},"status":{"type":"string","description":"The period's state.","example":"OPEN","enum":["OPEN","CLOSED","REOPENED"]},"opening_count":{"type":"object","nullable":true,"description":"The full count that opens the period. Null when none is assigned.","properties":{"id":{"type":"string","description":"The ID of the count event.","example":"922162621490001"},"name":{"type":"string","nullable":true,"description":"The count's name.","example":"End of June count"},"finished":{"type":"string","format":"date-time","description":"When the count was finalised.","example":"2026-06-30T18:30:00Z","nullable":true}}},"closing_count":{"type":"object","nullable":true,"description":"The full count that closes the period. Null when none is assigned.","properties":{"id":{"type":"string","description":"The ID of the count event.","example":"922162621490001"},"name":{"type":"string","nullable":true,"description":"The count's name.","example":"End of June count"},"finished":{"type":"string","format":"date-time","description":"When the count was finalised.","example":"2026-06-30T18:30:00Z","nullable":true}}},"start_date":{"type":"string","format":"date-time","description":"Start of the period, taken from the opening count.","example":"2026-06-01T08:00:00Z"},"end_date":{"type":"string","format":"date-time","description":"End of the period, set when it closes.","example":"2026-06-30T18:30:00Z","nullable":true},"expected_close_date":{"type":"string","format":"date-time","description":"When the period is scheduled to close.","example":"2026-06-30T23:59:59Z","nullable":true},"opening_stock_value":{"type":"string","nullable":true,"description":"Stock value at the start of the period.","example":"12500.00"},"closing_stock_value":{"type":"string","nullable":true,"description":"Stock value at the end of the period. Null until it closes.","example":"11980.45"},"closed_at":{"type":"string","format":"date-time","description":"When the period was closed.","example":"2026-07-01T09:15:00Z","nullable":true},"closed_by":{"type":"object","nullable":true,"description":"The user who performed the action.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"136000910080000"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"reclosed_at":{"type":"string","format":"date-time","description":"When the period was last closed again after a reopen.","example":"2026-07-03T11:00:00Z","nullable":true},"reclosed_by":{"type":"object","nullable":true,"description":"The user who performed the action.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"136000910080000"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"created":{"type":"string","format":"date-time","description":"When the period was created.","example":"2026-06-01T08:00:05Z"},"modified":{"type":"string","format":"date-time","description":"When the period was last modified.","example":"2026-07-01T09:15:00Z"}}},"examples":{"Result":{"value":{"id":"794100593140001","outlet_id":"229300089750009","name":"June 2026","status":"CLOSED","opening_count":{"id":"922162621490001","name":"Start of June count","finished":"2026-06-01T08:00:00Z"},"closing_count":{"id":"922162621490002","name":"End of June count","finished":"2026-06-30T18:30:00Z"},"start_date":"2026-06-01T08:00:00Z","end_date":"2026-06-30T18:30:00Z","expected_close_date":"2026-06-30T23:59:59Z","opening_stock_value":"12500.00","closing_stock_value":"11980.45","closed_at":"2026-07-01T09:15:00Z","closed_by":{"id":"136000910080000","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"},"reclosed_at":null,"reclosed_by":null,"created":"2026-06-01T08:00:05Z","modified":"2026-07-01T09:15:00Z"}}}}}},"403":{"description":"The library does not have the stock periods module enabled, or the user lacks the required permission."},"404":{"description":"Outlet or stock period not found."}},"deprecated":false},"patch":{"summary":"Edit Stock Period","description":"Renames a stock period and/or changes the full count that closes it. Sending `closing_count_id` as null detaches the count; leaving the field out leaves it unchanged. Only open or reopened periods can be edited.","operationId":"edit-stock-period","parameters":[{"name":"outlet_id","in":"path","required":true,"description":"The ID of the outlet.","schema":{"type":"string"}},{"name":"period_id","in":"path","required":true,"description":"The ID of the stock period.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The period's new name.","maxLength":200},"closing_count_id":{"type":"string","nullable":true,"description":"ID of the full count that closes the period, or null to detach it."}}},"examples":{"Request Example":{"value":{"closing_count_id":"922162621490002"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the stock period.","example":"794100593140001"},"outlet_id":{"type":"string","description":"The ID of the outlet the period belongs to.","example":"229300089750009"},"name":{"type":"string","description":"The period's name.","example":"June 2026"},"status":{"type":"string","description":"The period's state.","example":"OPEN","enum":["OPEN","CLOSED","REOPENED"]},"opening_count":{"type":"object","nullable":true,"description":"The full count that opens the period. Null when none is assigned.","properties":{"id":{"type":"string","description":"The ID of the count event.","example":"922162621490001"},"name":{"type":"string","nullable":true,"description":"The count's name.","example":"End of June count"},"finished":{"type":"string","format":"date-time","description":"When the count was finalised.","example":"2026-06-30T18:30:00Z","nullable":true}}},"closing_count":{"type":"object","nullable":true,"description":"The full count that closes the period. Null when none is assigned.","properties":{"id":{"type":"string","description":"The ID of the count event.","example":"922162621490001"},"name":{"type":"string","nullable":true,"description":"The count's name.","example":"End of June count"},"finished":{"type":"string","format":"date-time","description":"When the count was finalised.","example":"2026-06-30T18:30:00Z","nullable":true}}},"start_date":{"type":"string","format":"date-time","description":"Start of the period, taken from the opening count.","example":"2026-06-01T08:00:00Z"},"end_date":{"type":"string","format":"date-time","description":"End of the period, set when it closes.","example":"2026-06-30T18:30:00Z","nullable":true},"expected_close_date":{"type":"string","format":"date-time","description":"When the period is scheduled to close.","example":"2026-06-30T23:59:59Z","nullable":true},"opening_stock_value":{"type":"string","nullable":true,"description":"Stock value at the start of the period.","example":"12500.00"},"closing_stock_value":{"type":"string","nullable":true,"description":"Stock value at the end of the period. Null until it closes.","example":"11980.45"},"closed_at":{"type":"string","format":"date-time","description":"When the period was closed.","example":"2026-07-01T09:15:00Z","nullable":true},"closed_by":{"type":"object","nullable":true,"description":"The user who performed the action.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"136000910080000"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"reclosed_at":{"type":"string","format":"date-time","description":"When the period was last closed again after a reopen.","example":"2026-07-03T11:00:00Z","nullable":true},"reclosed_by":{"type":"object","nullable":true,"description":"The user who performed the action.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"136000910080000"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"created":{"type":"string","format":"date-time","description":"When the period was created.","example":"2026-06-01T08:00:05Z"},"modified":{"type":"string","format":"date-time","description":"When the period was last modified.","example":"2026-07-01T09:15:00Z"}}},"examples":{"Result":{"value":{"id":"794100593140001","outlet_id":"229300089750009","name":"June 2026","status":"CLOSED","opening_count":{"id":"922162621490001","name":"Start of June count","finished":"2026-06-01T08:00:00Z"},"closing_count":{"id":"922162621490002","name":"End of June count","finished":"2026-06-30T18:30:00Z"},"start_date":"2026-06-01T08:00:00Z","end_date":"2026-06-30T18:30:00Z","expected_close_date":"2026-06-30T23:59:59Z","opening_stock_value":"12500.00","closing_stock_value":"11980.45","closed_at":"2026-07-01T09:15:00Z","closed_by":{"id":"136000910080000","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"},"reclosed_at":null,"reclosed_by":null,"created":"2026-06-01T08:00:05Z","modified":"2026-07-01T09:15:00Z"}}}}}},"400":{"description":"No fields supplied, the period is closed, or the count is not a valid closing count for this period."},"403":{"description":"The library does not have the stock periods module enabled, or the user lacks the required permission."},"404":{"description":"Outlet or stock period not found."}},"deprecated":false},"delete":{"summary":"Delete Stock Period","description":"Deletes a stock period. A closed period must be reopened first.","operationId":"delete-stock-period","parameters":[{"name":"outlet_id","in":"path","required":true,"description":"The ID of the outlet.","schema":{"type":"string"}},{"name":"period_id","in":"path","required":true,"description":"The ID of the stock period.","schema":{"type":"string"}}],"responses":{"204":{"description":"Stock period deleted."},"400":{"description":"The period is closed, or a later closed period exists and deleting this one would orphan its events."},"403":{"description":"The library does not have the stock periods module enabled, or the user lacks the required permission."},"404":{"description":"Outlet or stock period not found."}},"deprecated":false}},"/inventory/outlets/{outlet_id}/stock-periods/{period_id}/close/":{"post":{"summary":"Close Stock Period","description":"Closes an open or reopened stock period, freezing its figures. The closing count must already be attached, or be supplied here as `closing_count_id` — in which case it is attached and the period closed in a single transaction.","operationId":"close-stock-period","parameters":[{"name":"outlet_id","in":"path","required":true,"description":"The ID of the outlet.","schema":{"type":"string"}},{"name":"period_id","in":"path","required":true,"description":"The ID of the stock period.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"closing_count_id":{"type":"string","description":"ID of the finalised full count to close the period with."}}},"examples":{"Request Example":{"value":{"closing_count_id":"922162621490002"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the stock period.","example":"794100593140001"},"outlet_id":{"type":"string","description":"The ID of the outlet the period belongs to.","example":"229300089750009"},"name":{"type":"string","description":"The period's name.","example":"June 2026"},"status":{"type":"string","description":"The period's state.","example":"OPEN","enum":["OPEN","CLOSED","REOPENED"]},"opening_count":{"type":"object","nullable":true,"description":"The full count that opens the period. Null when none is assigned.","properties":{"id":{"type":"string","description":"The ID of the count event.","example":"922162621490001"},"name":{"type":"string","nullable":true,"description":"The count's name.","example":"End of June count"},"finished":{"type":"string","format":"date-time","description":"When the count was finalised.","example":"2026-06-30T18:30:00Z","nullable":true}}},"closing_count":{"type":"object","nullable":true,"description":"The full count that closes the period. Null when none is assigned.","properties":{"id":{"type":"string","description":"The ID of the count event.","example":"922162621490001"},"name":{"type":"string","nullable":true,"description":"The count's name.","example":"End of June count"},"finished":{"type":"string","format":"date-time","description":"When the count was finalised.","example":"2026-06-30T18:30:00Z","nullable":true}}},"start_date":{"type":"string","format":"date-time","description":"Start of the period, taken from the opening count.","example":"2026-06-01T08:00:00Z"},"end_date":{"type":"string","format":"date-time","description":"End of the period, set when it closes.","example":"2026-06-30T18:30:00Z","nullable":true},"expected_close_date":{"type":"string","format":"date-time","description":"When the period is scheduled to close.","example":"2026-06-30T23:59:59Z","nullable":true},"opening_stock_value":{"type":"string","nullable":true,"description":"Stock value at the start of the period.","example":"12500.00"},"closing_stock_value":{"type":"string","nullable":true,"description":"Stock value at the end of the period. Null until it closes.","example":"11980.45"},"closed_at":{"type":"string","format":"date-time","description":"When the period was closed.","example":"2026-07-01T09:15:00Z","nullable":true},"closed_by":{"type":"object","nullable":true,"description":"The user who performed the action.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"136000910080000"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"reclosed_at":{"type":"string","format":"date-time","description":"When the period was last closed again after a reopen.","example":"2026-07-03T11:00:00Z","nullable":true},"reclosed_by":{"type":"object","nullable":true,"description":"The user who performed the action.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"136000910080000"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"created":{"type":"string","format":"date-time","description":"When the period was created.","example":"2026-06-01T08:00:05Z"},"modified":{"type":"string","format":"date-time","description":"When the period was last modified.","example":"2026-07-01T09:15:00Z"}}},"examples":{"Result":{"value":{"id":"794100593140001","outlet_id":"229300089750009","name":"June 2026","status":"CLOSED","opening_count":{"id":"922162621490001","name":"Start of June count","finished":"2026-06-01T08:00:00Z"},"closing_count":{"id":"922162621490002","name":"End of June count","finished":"2026-06-30T18:30:00Z"},"start_date":"2026-06-01T08:00:00Z","end_date":"2026-06-30T18:30:00Z","expected_close_date":"2026-06-30T23:59:59Z","opening_stock_value":"12500.00","closing_stock_value":"11980.45","closed_at":"2026-07-01T09:15:00Z","closed_by":{"id":"136000910080000","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"},"reclosed_at":null,"reclosed_by":null,"created":"2026-06-01T08:00:05Z","modified":"2026-07-01T09:15:00Z"}}}}}},"400":{"description":"The period is already closed, has no closing count, the count is not valid for this period, or an earlier period is still open."},"403":{"description":"The library does not have the stock periods module enabled, or the user lacks the required permission."},"404":{"description":"Outlet or stock period not found."}},"deprecated":false}},"/inventory/outlets/{outlet_id}/stock-periods/{period_id}/reopen/":{"post":{"summary":"Reopen Stock Period","description":"Reopens a closed stock period so a correction can be made. Closing it again refreezes it. Only periods that ended within the last 180 days can be reopened.","operationId":"reopen-stock-period","parameters":[{"name":"outlet_id","in":"path","required":true,"description":"The ID of the outlet.","schema":{"type":"string"}},{"name":"period_id","in":"path","required":true,"description":"The ID of the stock period.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the stock period.","example":"794100593140001"},"outlet_id":{"type":"string","description":"The ID of the outlet the period belongs to.","example":"229300089750009"},"name":{"type":"string","description":"The period's name.","example":"June 2026"},"status":{"type":"string","description":"The period's state.","example":"OPEN","enum":["OPEN","CLOSED","REOPENED"]},"opening_count":{"type":"object","nullable":true,"description":"The full count that opens the period. Null when none is assigned.","properties":{"id":{"type":"string","description":"The ID of the count event.","example":"922162621490001"},"name":{"type":"string","nullable":true,"description":"The count's name.","example":"End of June count"},"finished":{"type":"string","format":"date-time","description":"When the count was finalised.","example":"2026-06-30T18:30:00Z","nullable":true}}},"closing_count":{"type":"object","nullable":true,"description":"The full count that closes the period. Null when none is assigned.","properties":{"id":{"type":"string","description":"The ID of the count event.","example":"922162621490001"},"name":{"type":"string","nullable":true,"description":"The count's name.","example":"End of June count"},"finished":{"type":"string","format":"date-time","description":"When the count was finalised.","example":"2026-06-30T18:30:00Z","nullable":true}}},"start_date":{"type":"string","format":"date-time","description":"Start of the period, taken from the opening count.","example":"2026-06-01T08:00:00Z"},"end_date":{"type":"string","format":"date-time","description":"End of the period, set when it closes.","example":"2026-06-30T18:30:00Z","nullable":true},"expected_close_date":{"type":"string","format":"date-time","description":"When the period is scheduled to close.","example":"2026-06-30T23:59:59Z","nullable":true},"opening_stock_value":{"type":"string","nullable":true,"description":"Stock value at the start of the period.","example":"12500.00"},"closing_stock_value":{"type":"string","nullable":true,"description":"Stock value at the end of the period. Null until it closes.","example":"11980.45"},"closed_at":{"type":"string","format":"date-time","description":"When the period was closed.","example":"2026-07-01T09:15:00Z","nullable":true},"closed_by":{"type":"object","nullable":true,"description":"The user who performed the action.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"136000910080000"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"reclosed_at":{"type":"string","format":"date-time","description":"When the period was last closed again after a reopen.","example":"2026-07-03T11:00:00Z","nullable":true},"reclosed_by":{"type":"object","nullable":true,"description":"The user who performed the action.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"136000910080000"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"created":{"type":"string","format":"date-time","description":"When the period was created.","example":"2026-06-01T08:00:05Z"},"modified":{"type":"string","format":"date-time","description":"When the period was last modified.","example":"2026-07-01T09:15:00Z"}}},"examples":{"Result":{"value":{"id":"794100593140001","outlet_id":"229300089750009","name":"June 2026","status":"REOPENED","opening_count":{"id":"922162621490001","name":"Start of June count","finished":"2026-06-01T08:00:00Z"},"closing_count":{"id":"922162621490002","name":"End of June count","finished":"2026-06-30T18:30:00Z"},"start_date":"2026-06-01T08:00:00Z","end_date":"2026-06-30T18:30:00Z","expected_close_date":"2026-06-30T23:59:59Z","opening_stock_value":"12500.00","closing_stock_value":"11980.45","closed_at":"2026-07-01T09:15:00Z","closed_by":{"id":"136000910080000","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"},"reclosed_at":null,"reclosed_by":null,"created":"2026-06-01T08:00:05Z","modified":"2026-07-01T09:15:00Z"}}}}}},"400":{"description":"The period is not closed, or it ended more than 180 days ago."},"403":{"description":"The library does not have the stock periods module enabled, or the user lacks the required permission."},"404":{"description":"Outlet or stock period not found."}},"deprecated":false}},"/inventory/outlets/{outlet_id}/stock-periods/{period_id}/summary/":{"get":{"summary":"Get Stock Period Summary","description":"Returns the movement totals per category for a stock period, plus theoretical stock and variance. Every category key is always present; a category that is empty or does not apply to the outlet is null.","operationId":"get-stock-period-summary","parameters":[{"name":"outlet_id","in":"path","required":true,"description":"The ID of the outlet.","schema":{"type":"string"}},{"name":"period_id","in":"path","required":true,"description":"The ID of the stock period.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"opening_stock":{"type":"object","nullable":true,"description":"Stock on hand at the start of the period.","properties":{"value":{"type":"string","nullable":true,"description":"Total stock value counted.","example":"12500.00"},"items_count":{"type":"integer","nullable":true,"description":"Number of items counted.","example":148},"count_id":{"type":"string","nullable":true,"description":"ID of the boundary count.","example":"922162621490001"},"count_name":{"type":"string","nullable":true,"description":"Name of the boundary count.","example":"Start of June count"}}},"goods_received":{"type":"object","nullable":true,"description":"Goods received from suppliers.","properties":{"value":{"type":"string","nullable":true,"description":"Stock value the deliveries landed, the same meaning `value` carries on every other category, and the figure `theoretical_value` consumes.","example":"3400.00"},"price_billed":{"type":"string","nullable":true,"description":"What the supplier charged for those deliveries. Equal to `value` unless a delivery landed into stock that was already negative: the deficit is then valued at average cost and only the remainder at the billed rate.","example":"3400.00"},"events_count":{"type":"integer","nullable":true,"description":"Number of events.","example":12},"outstanding_count":{"type":"integer","nullable":true,"description":"Orders still outstanding.","example":2}}},"outstanding_incoming_orders":{"type":"object","nullable":true,"description":"Incoming orders not yet shipped. Central kitchens only.","properties":{"value":{"type":"string","nullable":true,"description":"Stock value that left on these picks, negative, and the figure `theoretical_value` consumes.","example":"-320.15"},"price_billed":{"type":"string","nullable":true,"description":"What the kitchen charged for those picks. Positive, and unrelated to the stock that left it.","example":"410.00"},"events_count":{"type":"integer","nullable":true,"description":"Number of events.","example":12},"outstanding_count":{"type":"integer","nullable":true,"description":"Orders still outstanding.","example":1}}},"produced":{"type":"object","nullable":true,"description":"Stock created by production.","properties":{"in_value":{"type":"string","nullable":true,"description":"Value produced.","example":"840.00"},"out_value":{"type":"string","nullable":true,"description":"Value consumed.","example":"-610.00"},"events_count":{"type":"integer","nullable":true,"example":5},"open_count":{"type":"integer","nullable":true,"description":"Events still open.","example":1}}},"transfer":{"type":"object","nullable":true,"description":"Stock transferred in and out.","properties":{"in_value":{"type":"string","nullable":true,"description":"Value transferred in.","example":"210.00"},"out_value":{"type":"string","nullable":true,"description":"Value transferred out.","example":"-95.00"},"events_count":{"type":"integer","nullable":true,"example":4},"pending_count":{"type":"integer","nullable":true,"description":"Transfers not yet received.","example":0}}},"sold":{"type":"object","nullable":true,"description":"Stock consumed by sales. Null for outlets that do not sell.","properties":{"value":{"type":"string","nullable":true,"description":"Total stock value moved in this category.","example":"-320.15"},"events_count":{"type":"integer","nullable":true,"description":"Number of events.","example":12},"revenue":{"type":"string","nullable":true,"description":"Revenue excluding VAT.","example":"8400.00"}}},"shipped_out":{"type":"object","nullable":true,"description":"Stock shipped to other outlets. Central kitchens only.","properties":{"value":{"type":"string","nullable":true,"description":"Total stock value moved in this category.","example":"-320.15"},"events_count":{"type":"integer","nullable":true,"description":"Number of events.","example":12}}},"waste":{"type":"object","nullable":true,"description":"Stock written off as waste.","properties":{"value":{"type":"string","nullable":true,"description":"Total stock value moved in this category.","example":"-320.15"},"events_count":{"type":"integer","nullable":true,"description":"Number of events.","example":12},"open_count":{"type":"integer","nullable":true,"example":0}}},"spot_counts":{"type":"object","nullable":true,"description":"Counts taken inside the period, between the two boundaries.","properties":{"net_variance":{"type":"string","nullable":true,"description":"Net stock value the counts corrected.","example":"-45.20"},"counted_value":{"type":"string","nullable":true,"description":"Total value counted.","example":"980.00"},"events_count":{"type":"integer","nullable":true,"example":3},"open_count":{"type":"integer","nullable":true,"example":0}}},"closing_stock":{"type":"object","nullable":true,"description":"Stock on hand at the end of the period.","properties":{"value":{"type":"string","nullable":true,"description":"Total stock value counted.","example":"12500.00"},"items_count":{"type":"integer","nullable":true,"description":"Number of items counted.","example":148},"count_id":{"type":"string","nullable":true,"description":"ID of the boundary count.","example":"922162621490001"},"count_name":{"type":"string","nullable":true,"description":"Name of the boundary count.","example":"Start of June count"},"missing_items_count":{"type":"integer","nullable":true,"description":"Items in stock that the closing count did not cover.","example":2}}},"theoretical_value":{"type":"string","nullable":true,"description":"Theoretical stock at period end: opening stock plus every movement in the window.","example":"12105.65"},"variance":{"type":"string","nullable":true,"description":"Counted closing stock minus theoretical. Negative means less counted than projected. Null until a closing count is assigned.","example":"-125.20"},"positive_variance_value":{"type":"string","nullable":true,"description":"The money the period's counts found, as a magnitude. Null until a closing count is assigned.","example":"40.00"},"negative_variance_value":{"type":"string","nullable":true,"description":"The money the period's counts lost, as a magnitude. Subtract it from `positive_variance_value` to get the same quantity `variance` measures. Null until a closing count is assigned.","example":"165.20"},"variance_reconciliation":{"type":"object","nullable":true,"description":"Why the counts' corrections do not account for the whole variance. Null whenever they do, which is the normal case for an outlet that counts the same stock at both ends of a period. The two sides can only differ over items one count reached and the other did not; an item in both counts cancels out.","properties":{"not_reconciled_value":{"type":"string","description":"`variance` minus (`positive_variance_value` - `negative_variance_value`).","example":"-113.74"},"causes":{"type":"array","description":"The item groups behind the gap. Only groups that moved the figure are listed, and their values add up to `not_reconciled_value`.","items":{"type":"object","properties":{"key":{"type":"string","enum":["in_opening_count_only","in_closing_count_only","in_neither_count"],"description":"Which group: items the opening count reached and the closing one missed, items the closing count reached and the opening one missed, or items neither count reached that moved anyway.","example":"in_opening_count_only"},"value":{"type":"string","description":"What this group contributes to the gap.","example":"-113.74"},"items_count":{"type":"integer","description":"How many items in this group actually moved the figure. Items worth nothing are not counted.","example":1}}}}}}}},"examples":{"Result":{"value":{"opening_stock":{"value":"12500.00","items_count":148,"count_id":"922162621490001","count_name":"Start of June count"},"goods_received":{"value":"3400.00","price_billed":"3400.00","events_count":12,"outstanding_count":2},"outstanding_incoming_orders":null,"produced":{"in_value":"840.00","out_value":"-610.00","events_count":5,"open_count":1},"transfer":{"in_value":"210.00","out_value":"-95.00","events_count":4,"pending_count":0},"sold":{"value":"-4095.15","events_count":210,"revenue":"8400.00"},"shipped_out":null,"waste":{"value":"-320.15","events_count":9,"open_count":0},"spot_counts":{"net_variance":"-45.20","counted_value":"980.00","events_count":3,"open_count":0},"closing_stock":{"value":"11980.45","items_count":146,"missing_items_count":2,"count_id":"922162621490002","count_name":"End of June count"},"theoretical_value":"12105.65","variance":"-125.20","positive_variance_value":"40.00","negative_variance_value":"165.20","variance_reconciliation":null}}}}}},"403":{"description":"The library does not have the stock periods module enabled, or the user lacks the required permission."},"404":{"description":"Outlet or stock period not found."}},"deprecated":false}},"/inventory/outlets/{outlet_id}/stock-periods/{period_id}/warnings/":{"get":{"summary":"Get Stock Period Warnings","description":"Returns the operational conditions that need attention before a stock period can close: negative stock, orders still outstanding, and events still open. Row lists are capped at 50; the count fields always reflect the true totals. Each row list is ordered oldest-first so which rows fall inside the cap stays stable across calls as long as the same rows remain open.","operationId":"get-stock-period-warnings","parameters":[{"name":"outlet_id","in":"path","required":true,"description":"The ID of the outlet.","schema":{"type":"string"}},{"name":"period_id","in":"path","required":true,"description":"The ID of the stock period.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"negative_stock_count":{"type":"integer","description":"Number of stock items with negative on-hand quantity at the outlet. Not scoped to this period -- it reflects the outlet's current stock regardless of which period is open.","example":2},"outstanding_orders_count":{"type":"integer","description":"Number of purchase orders attributed to this period that are still ordered but not yet delivered.","example":1},"open_events_count":{"type":"integer","description":"Number of non-order inventory events attributed to this period that are still open. Order-generated events are excluded, since those are already covered by outstanding_orders_count.","example":1},"is_overdue":{"type":"boolean","description":"True when the period is still open and past its expected close date.","example":false},"negative_stock":{"type":"array","description":"Up to 50 stock items currently at negative quantity, ordered by ID.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the stock item.","example":"922162621490050"},"name":{"type":"string","description":"The stock item's name.","example":"Chicken breast"},"quantity":{"type":"number","nullable":true,"description":"Current on-hand quantity.","example":-4.5},"stock_value":{"type":"string","nullable":true,"description":"Current stock value.","example":"-32.10"}}}},"outstanding_orders":{"type":"array","description":"Up to 50 orders attributed to this period that are still outstanding, ordered oldest-first by the date the order was placed.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the purchase order.","example":"922162621490051"},"order_number":{"type":"string","nullable":true,"description":"The order's reference number.","example":"PO-2044"},"supplier_name":{"type":"string","nullable":true,"description":"The supplier's name.","example":"Metro Wholesale"},"ordered_on":{"type":"string","format":"date-time","nullable":true,"description":"When the order was placed.","example":"2026-06-05T09:30:00Z"},"created_by":{"type":"object","nullable":true,"description":"The user who created the order.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"136000910080000"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}}}}},"open_events":{"type":"array","description":"Up to 50 non-order events attributed to this period that are still open, ordered oldest-first by creation date.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the event.","example":"922162621490052"},"name":{"type":"string","nullable":true,"description":"The event's name.","example":"Kitchen waste"},"event_type":{"type":"string","description":"The event's internal type code. Order-generated events are excluded here, since those are already covered by outstanding_orders.","example":"WASTE","enum":["WASTE","COUNT","MOVE","MOVED_FROM","MOVED_IN","MANUAL_EDIT_FROM_INGREDIENT","POS","CONVERTED_FROM_PREVIOUS_PACKAGE","MANUAL_SALES","CREATION","APICBASE_FIX","EXTERNAL_CUSTOMER_ORDER"]},"status":{"type":"string","description":"The event's state. Always OPENED or REOPENED here -- a closed event would not need attention, so this endpoint never returns one.","example":"OPENED","enum":["OPENED","REOPENED"]},"created":{"type":"string","format":"date-time","description":"When the event was created.","example":"2026-06-10T14:00:00Z"},"finished":{"type":"string","format":"date-time","nullable":true,"description":"When the event was finished. Null while still open.","example":null},"created_by":{"type":"object","nullable":true,"description":"The user who created the event.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"136000910080000"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}},"owned_by":{"type":"object","nullable":true,"description":"The user currently responsible for the event.","properties":{"id":{"type":"string","description":"The ID of the user.","example":"136000910080000"},"username":{"type":"string","description":"The user's email address.","example":"john.doe@apicbase.com"},"first_name":{"type":"string","description":"The user's first name.","example":"John"},"last_name":{"type":"string","description":"The user's last name.","example":"Doe"},"url":{"type":"string","description":"The API URL of the user.","example":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}}}}}}},"examples":{"Result":{"value":{"negative_stock_count":1,"outstanding_orders_count":1,"open_events_count":1,"is_overdue":false,"negative_stock":[{"id":"922162621490050","name":"Chicken breast","quantity":-4.5,"stock_value":"-32.10"}],"outstanding_orders":[{"id":"922162621490051","order_number":"PO-2044","supplier_name":"Metro Wholesale","ordered_on":"2026-06-05T09:30:00Z","created_by":{"id":"136000910080000","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}],"open_events":[{"id":"922162621490052","name":"Kitchen waste","event_type":"WASTE","status":"OPENED","created":"2026-06-10T14:00:00Z","finished":null,"created_by":{"id":"136000910080000","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"},"owned_by":{"id":"136000910080000","username":"john.doe@apicbase.com","first_name":"John","last_name":"Doe","url":"https://app.apicbase.com/api/v2/accounts/users/136000910080000/"}}]}}}}}},"403":{"description":"The library does not have the stock periods module enabled, or the user lacks the required permission."},"404":{"description":"Outlet or stock period not found."}},"deprecated":false}}},"components":{"securitySchemes":{"sec0":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://app.apicbase.com/oauth/authorize/","tokenUrl":"https://api.apicbase.com/oauth/token/","refreshUrl":"https://api.apicbase.com/oauth/token/","scopes":{"accounts":"Access to user, library, and outlet endpoints.","library":"Access to library content (recipes, ingredients, menus, packages).","inventory":"Access to inventory events and stock data.","procurement":"Access to purchase orders, deliveries, and supplier ordering.","sales":"Access to POS, sales, and sales analytics endpoints.","media":"Access to media (images, files)."}}}}}},"x-readme":{"headers":[],"explorer-enabled":true,"proxy-enabled":true},"x-readme-fauxas":true}