{"components":{"parameters":{"address_id":{"description":"Unique identifier of the address","in":"path","name":"address_id","required":true,"schema":{"type":"integer"}},"bee_care_status":{"description":"client bee care status","in":"query","name":"bee_care_status","required":false,"schema":{"example":"bee cocunes have parasites","type":"string"}},"beecare_id":{"description":"Unique identifier of the beecare status","in":"path","name":"beecare_id","required":true,"schema":{"type":"integer"}},"client_id_filter":{"description":"Client id","in":"query","name":"client_id","required":false,"schema":{"type":"integer"}},"code":{"in":"query","name":"code","schema":{"example":"X24CH100A","type":"string"}},"contact_id":{"description":"Unique identifier of the contact","in":"path","name":"contact_id","required":true,"schema":{"type":"integer"}},"country_code":{"description":"ISO 3166-1 alpha-2 country code","in":"path","name":"country_code","required":true,"schema":{"example":"CH","type":"string"}},"country_code_filter":{"description":"ISO 3166-1 alpha-2 country code","in":"query","name":"country_code","required":true,"schema":{"example":"CH","type":"string"}},"date":{"description":"date","in":"path","name":"date","required":true,"schema":{"example":"2021-04-30","format":"date","type":"string"}},"delivery_date_from":{"description":"Delivery date from","example":"2019-01-01","in":"query","name":"delivery_date_from","required":false,"schema":{"type":"string"}},"delivery_date_to":{"description":"Delivery date to","example":"2020-01-01","in":"query","name":"delivery_date_to","required":false,"schema":{"type":"string"}},"has_bexio_id":{"description":"Has a bexio Id","in":"query","name":"has_bexio_id","required":false,"schema":{"type":"boolean"}},"house_code":{"description":"Unique","in":"path","name":"house_code","required":true,"schema":{"example":"X24CH100A","type":"string"}},"house_id":{"description":"Unique identifier of the house","in":"path","name":"house_id","required":true,"schema":{"type":"integer"}},"house_id_filter":{"description":"Unique identifier of the house","in":"query","name":"house_id","schema":{"type":"integer"}},"id":{"description":"Generic unique identifier","in":"path","name":"id","required":true,"schema":{"type":"integer"}},"is_active_filter":{"example":true,"in":"query","name":"is_active","schema":{"type":"boolean"}},"is_invoice":{"description":"Has the psp set to INVOICE","in":"query","name":"is_invoice","required":false,"schema":{"type":"boolean"}},"is_paid":{"description":"Is paid","in":"query","name":"is_paid","required":false,"schema":{"type":"boolean"}},"is_printed":{"description":"Is printed","in":"query","name":"is_printed","required":false,"schema":{"type":"boolean"}},"is_standard":{"description":"Is standard","in":"query","name":"is_standard","required":false,"schema":{"type":"boolean"}},"locale":{"description":"the locale with which to look up the shopify store","in":"query","name":"locale","required":false,"schema":{"type":"string"},"x-extensible-enum":["de_DE","fr_CH","de_CH","fr","de"]},"name":{"description":"house name given to specific bee hive","in":"query","name":"name","required":false,"schema":{"example":"backyard bees","type":"string"}},"order_date_from":{"description":"Order date from","example":"2019-01-01","in":"query","name":"order_date_from","required":false,"schema":{"type":"string"}},"order_date_to":{"description":"Order date to","example":"2020-01-01","in":"query","name":"order_date_to","required":false,"schema":{"type":"string"}},"order_id":{"description":"Unique identifier of the order","in":"path","name":"order_id","required":true,"schema":{"type":"integer"}},"order_id_filter":{"description":"Order id","in":"query","name":"order_id","required":false,"schema":{"type":"integer"}},"organisation_id":{"description":"Unique identifier of the organisation","in":"path","name":"organisation_id","required":true,"schema":{"type":"integer"}},"organisation_id_filter":{"description":"Organisation id","in":"query","name":"organisation_id","required":false,"schema":{"type":"integer"}},"page":{"description":"The page of items to return.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},"per_page":{"description":"The numbers of items to return on each page.","in":"query","name":"per_page","required":false,"schema":{"default":20,"minimum":1,"type":"integer"}},"postal_code":{"description":"Postal code","in":"path","name":"postal_code","required":true,"schema":{"example":8001,"type":"string"}},"postal_code_filter":{"in":"query","name":"postal_code","required":true,"schema":{"example":8000,"type":"string"}},"q":{"description":"Query","in":"query","name":"q","required":false,"schema":{"type":"string"}},"season_filter":{"description":"The season to query","in":"query","name":"season","required":false,"schema":{"type":"integer"}},"shopify_id":{"description":"Unique identifier of the order from shopify","in":"path","name":"shopify_id","required":true,"schema":{"type":"integer"}},"snapshot_id":{"description":"Unique identifier of the snapshot entry","in":"path","name":"snapshot_id","required":true,"schema":{"type":"integer"}},"sort":{"description":"Comma-separated list of fields to define the sort order.","example":"-id","explode":false,"in":"query","name":"sort","required":false,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"},"step_number":{"description":"step for bee care","in":"path","name":"step_number","required":true,"schema":{"example":3,"type":"integer"}},"type_filter":{"example":"STARTPOP","in":"query","name":"type","schema":{"enum":["STARTPOP","BEECARE"],"type":"string"}},"voucher_id":{"description":"Unique identifier of the voucher","in":"path","name":"voucher_id","required":true,"schema":{"type":"integer"}}},"schemas":{"Address":{"properties":{"address_1":{"example":"Citizen Space","nullable":true,"type":"string"},"address_2":{"example":"Heinrichstrasse 267A","nullable":true,"type":"string"},"company_name":{"example":"Wildbiene + Partner AG","nullable":true,"type":"string"},"country_code":{"description":"ISO 3166-1 alpha-2 country code","example":"CH","type":"string"},"first_name":{"example":null,"nullable":true,"type":"string"},"google_maps_admin_area_1":{"description":"First-order civil entity below the country level","example":"Z\u00fcrich","readOnly":true,"type":"string"},"google_maps_admin_area_1_short":{"description":"First-order civil entity below the country level, short name","example":"ZH","readOnly":true,"type":"string"},"google_maps_admin_area_2":{"description":"Second-order civil entity below the country level","example":"Z\u00fcrich","readOnly":true,"type":"string"},"google_maps_admin_area_3":{"description":"Third-order civil entity below the country level","readOnly":true,"type":"string"},"google_maps_sublocality_1":{"description":"First-order civil entity below a locality","example":"Industriequartier","readOnly":true,"type":"string"},"google_place_id":{"description":"Google placeId. If this is passed, then it will be used to geocode the address rather than street, postal code, town, etc.\n","example":"EisxMyBNYXJrZXQgU3RyZWV0LCBXaWxtaW5ndG9uLCBOQyAyODQwMSwgVVNB","type":"string","writeOnly":true},"id":{"description":"Unique identifier","readOnly":true,"type":"integer"},"last_name":{"example":null,"nullable":true,"type":"string"},"latitude":{"example":47.3950976,"format":"float","readOnly":true,"type":"number"},"longitude":{"example":8.5457608,"format":"float","readOnly":true,"type":"number"},"postal_code":{"example":"8005","nullable":true,"type":"string"},"tags":{"example":["BILLING"],"items":{"description":"Tags describing the address","type":"string","x-extensible-enum":["BILLING"]},"type":"array"},"town":{"example":"Z\u00fcrich","nullable":true,"type":"string"}},"required":["country_code"],"type":"object"},"AdminBeeCareSetting":{"properties":{"currency":{"description":"ISO 4217 currency code","example":"CHF","type":"string"},"end_date":{"description":"Last day of ordering season","format":"date","type":"string"},"mixed_ratio":{"description":"ratio for bee homes with a mix of single and multi year tubes","type":"number"},"multi_year_ratio":{"description":"ratio for bee homes with a multiple years of tubes","type":"number"},"price":{"example":15.0,"minimum":0,"type":"number"},"season":{"example":"2020","type":"string"},"shipping_price":{"example":9.0,"minimum":0,"type":"number"},"single_year_ratio":{"description":"ratio for bee homes with a single year of tubes","type":"number"},"start_date":{"description":"First day of ordering season","format":"date","type":"string"}},"type":"object"},"AdminHouse":{"allOf":[{"$ref":"#/components/schemas/House"},{"properties":{"client_id":{"description":"Id of the client","nullable":true,"type":"integer"},"created_at":{"format":"date-time","readOnly":true,"type":"string"},"created_by":{"example":"ab73a3cf-f26a-4ce3-a3b9-7d888f248786","readOnly":true,"type":"string"},"product_id":{"description":"Id of the product","type":"integer"},"updated_at":{"format":"date-time","readOnly":true,"type":"string"},"updated_by":{"readOnly":true,"type":"string"}},"type":"object"}]},"AdminOrder":{"properties":{"address_1":{"example":"Wonderbolts rainbow","nullable":true,"type":"string"},"address_2":{"example":"cloud 5","nullable":true,"type":"string"},"address_id":{"description":"Return address for BeeCare, delivery address for Startpop","nullable":false,"type":"integer"},"bexio_id":{"description":"Bexio invoice identifier","example":726,"type":"integer"},"bexio_nr":{"description":"Bexio document number","example":"RE-00726","type":"string"},"client_id":{"description":"Client identifier","example":1,"type":"integer"},"comment":{"nullable":true,"type":"string"},"company_name":{"example":"Weather factory","nullable":true,"type":"string"},"contact_id":{"nullable":false,"type":"integer"},"created_at":{"format":"date-time","readOnly":true,"type":"string"},"created_by":{"example":"ab73a3cf-f26a-4ce3-a3b9-7d888f248786","readOnly":true,"type":"string"},"currency":{"example":"CHF","nullable":true,"type":"string"},"delivery_date":{"description":"Not applicable to BeeCare","example":"2020-01-02","nullable":true,"type":"string"},"email":{"example":"no-reply@beehome.net","format":"email","nullable":true,"type":"string"},"first_name":{"example":"Derpy","nullable":true,"type":"string"},"houses":{"description":"Ids of the houses linked to this order\n","example":[1009,1010,1011],"items":{"type":"integer"},"type":"array","writeOnly":true},"id":{"description":"Unique identifier","example":76016,"readOnly":true,"type":"integer"},"is_paid":{"example":false,"nullable":true,"type":"boolean"},"is_printed":{"description":"Not applicable for BeeCare","example":false,"nullable":true,"type":"boolean"},"is_standard":{"description":"Not applicable for BeeCare","example":true,"nullable":true,"type":"boolean"},"language":{"description":"ISO 639-1 language code","example":"de","nullable":true,"type":"string"},"last_name":{"example":"Hoves","nullable":true,"type":"string"},"order_amount":{"example":5,"minimum":1,"nullable":true,"type":"number"},"order_date":{"example":"2020-01-01","nullable":true,"type":"string"},"organisation_id":{"description":"Client identifier","example":1,"type":"integer"},"paylink_url":{"example":"https://demo.payrexx.com/?payment=db8c618c87dc91f100292f6ffd9c5044","nullable":true,"type":"string"},"payment_id":{"example":"2c6efde2","nullable":true,"type":"string"},"psp":{"enum":["PAYREXX","TWINT","PAYPAL","DATATRANS","POSTFINANCE","INVOICE"],"example":"PAYREXX","nullable":true,"type":"string"},"shipping_price":{"example":20,"nullable":true,"type":"number"},"total_price":{"example":100,"nullable":true,"type":"number"},"tracking_number":{"example":98743652034856,"type":"string"},"tracking_url":{"example":"https://www.post.ch/swisspost-tracking?formattedParcelCodes=98743652034856","readOnly":true,"type":"string"},"type":{"enum":["BEECARE","STARTPOP"],"example":"BEECARE","type":"string"},"unit_price":{"example":20,"nullable":true,"type":"number"},"updated_at":{"format":"date-time","readOnly":true,"type":"string"},"updated_by":{"readOnly":true,"type":"string"},"vouchers":{"description":"Ids of the vouchers redeemed in this order\n","example":[1009,1010,1011],"items":{"type":"integer"},"type":"array","writeOnly":true}},"type":"object"},"AdminSetting":{"allOf":[{"$ref":"#/components/schemas/Setting"},{"properties":{"beecare":{"$ref":"#/components/schemas/BeeCareSetting"},"excluded_dates":{"description":"List of dates on which delivery is not possible\n","items":{"format":"date","type":"string"},"readOnly":true,"type":"array"},"startpop":{"$ref":"#/components/schemas/AdminStartpopSetting"}},"type":"object"}]},"AdminStartpopSetting":{"allOf":[{"$ref":"#/components/schemas/StartpopSetting"},{"properties":{"delivery_weekdays":{"example":[3,4,5],"items":{"description":"Weekdays on which delivery is possible, 1 (Monday) through 7 (Sunday)\n","maximum":7,"minimum":1,"type":"integer"},"type":"array"},"lead_time":{"description":"Lead time in days","type":"integer"},"max_units_per_day":{"minimum":0,"type":"integer"},"max_units_per_package":{"minimum":0,"type":"integer"}},"type":"object"}]},"AdminVoucher":{"allOf":[{"$ref":"#/components/schemas/Voucher"},{"properties":{"client_id":{"type":"integer"},"created_at":{"format":"date-time","readOnly":true,"type":"string"},"created_by":{"example":"ab73a3cf-f26a-4ce3-a3b9-7d888f248786","readOnly":true,"type":"string"},"organisation_id":{"type":"integer"},"updated_at":{"format":"date-time","readOnly":true,"type":"string"},"updated_by":{"readOnly":true,"type":"string"}},"required":["organisation_id"],"type":"object"}]},"BeeCare":{"properties":{"comments":{"type":"string"},"date":{"example":"2021-07-20","format":"date","type":"string"},"house_id":{"type":"integer"},"id":{"readOnly":true,"type":"integer"},"order_id":{"type":"integer"},"season":{"type":"integer"},"snapshots":{"items":{"$ref":"#/components/schemas/Snapshot"},"type":"array"},"step1":{"type":"boolean"},"step1_completed_at":{"format":"date-time","readOnly":true,"type":"string"},"step1_completed_by":{"example":"4cc41b7c-ce9e-4972-8af5-061f89432dc9","readOnly":true,"type":"string"},"step2":{"type":"boolean"},"step2_completed_at":{"format":"date-time","readOnly":true,"type":"string"},"step2_completed_by":{"example":"4cc41b7c-ce9e-4972-8af5-061f89432dc9","readOnly":true,"type":"string"},"step3":{"type":"boolean"},"step3_completed_at":{"format":"date-time","readOnly":true,"type":"string"},"step3_completed_by":{"example":"4cc41b7c-ce9e-4972-8af5-061f89432dc9","readOnly":true,"type":"string"},"step4":{"type":"boolean"},"step4_completed_at":{"format":"date-time","readOnly":true,"type":"string"},"step4_completed_by":{"example":"4cc41b7c-ce9e-4972-8af5-061f89432dc9","readOnly":true,"type":"string"},"tracking_number":{"example":98743652034856,"type":"string"},"tracking_url":{"example":"https://www.post.ch/swisspost-tracking?formattedParcelCodes=98743652034856","readOnly":true,"type":"string"}},"type":"object"},"BeeCareOrder":{"allOf":[{"$ref":"#/components/schemas/Order"},{"properties":{"houses":{"description":"Ids of the houses linked to this order\n","example":[10009,10010,10011],"items":{"type":"integer"},"type":"array"},"psp":{"enum":["INVOICE"],"nullable":true,"type":"string"},"shipping_label":{"description":"Check if label can be downloaded from tracking code. How long is the label valid?","example":"https://bucket.org/100987623456.pdf","readOnly":true,"type":"string"},"tracking_number":{"example":98743652034856,"readOnly":true,"type":"string"},"tracking_url":{"example":"https://www.post.ch/swisspost-tracking?formattedParcelCodes=98743652034856","readOnly":true,"type":"string"}},"required":["houses"],"type":"object"}]},"BeeCareSetting":{"properties":{"currency":{"description":"ISO 4217 currency code","example":"CHF","type":"string"},"end_date":{"description":"Last day of ordering season","format":"date","type":"string"},"price":{"example":15.0,"minimum":0,"type":"number"},"season":{"example":"2020","type":"string"},"shipping_price":{"example":9.0,"minimum":0,"type":"number"},"start_date":{"description":"First day of ordering season","format":"date","type":"string"}},"type":"object"},"Client":{"description":"A client account can represent a single contact with a single address, a legal entity like a company or school or an informal entity like a family with multiple contacts and addresses.\n","properties":{"addresses":{"items":{"$ref":"#/components/schemas/Address"},"type":"array"},"certification":{"example":"IP_SUISSE","nullable":true,"type":"string","x-extensible-enum":["IP_SUISSE","CONVENTIONAL","SUISSE_GARANTIE","BIO_SUISSE"]},"contacts":{"items":{"$ref":"#/components/schemas/Contact"},"type":"array"},"first_beehome_delivery_on":{"description":"Date on which the first BeeHome was delivered to the client","example":"2015-03-01","format":"date","nullable":true,"type":"string"},"id":{"description":"Unique identifier","readOnly":true,"type":"integer"},"is_blocked":{"description":"True if the account is blocked","example":false,"type":"boolean"},"last_beehome_delivery_on":{"description":"Date on which the most recent BeeHome was delivered to the client","example":"2020-03-01","format":"date","nullable":true,"type":"string"},"last_harvest_started_on":{"description":"Date on which the most recent harvest process started","example":"2020-09-01","format":"date","nullable":true,"type":"string"},"last_startpop_delivery_on":{"description":"Date on which the most recent startpop was delivered to the client","example":"2020-04-01","format":"date","nullable":true,"type":"string"},"name":{"description":"Name of the client account. This can be the name of a legal entity or an informal group or family name. When left blank this will default to the first name and last name of the main contact.\n","example":"Wildbiene + Partner AG","nullable":true,"type":"string"},"nr_univoco":{"example":"0000000","nullable":true,"type":"string"},"organisation":{"allOf":[{"$ref":"#/components/schemas/Organisation"}],"readOnly":true},"organisation_id":{"description":"Id of the organisation that owns the client relationship","type":"integer","writeOnly":true},"pec_mail":{"example":"wildbieneundpartner@legalmail.it","format":"email","nullable":true,"type":"string"},"tags":{"description":"Tags describing the client relationship","example":["BEEHOME","OSMIPRO","BEESNACK","BEESUMMER"],"items":{"type":"string","x-extensible-enum":["BEEHOME","OSMIPRO","BEESNACK","BEESUMMER"]},"type":"array"},"tax_nr_1":{"example":null,"nullable":true,"type":"string"},"tax_nr_2":{"example":null,"nullable":true,"type":"string"},"type":{"description":"Type of client entity","example":"COMPANY","type":"string","x-extensible-enum":["PRIVATE","COMPANY"]}},"type":"object"},"Contact":{"properties":{"bexio_id":{"example":58973,"nullable":true,"type":"integer"},"bexio_nr":{"example":"016987","nullable":true,"type":"string"},"birthday":{"example":"1990-01-01","format":"date","nullable":true,"type":"string"},"client_id":{"description":"Id of the client","type":"integer"},"email":{"example":"client@pollinature.net","nullable":true,"type":"string"},"firebase_id":{"example":"cYwWR67MFuQB3zBUB7TJclkP0rj2","nullable":true,"type":"string"},"first_name":{"nullable":true,"type":"string"},"freshdesk_id":{"example":47021381893,"nullable":true,"readOnly":true,"type":"integer"},"id":{"description":"Unique identifier","readOnly":true,"type":"integer"},"language":{"description":"ISO 639-1 language code","example":"de","nullable":true,"type":"string"},"last_name":{"nullable":true,"type":"string"},"mailing_preference":{"default":"EMAIL","example":"EMAIL","type":"string","x-extensible-enum":["EMAIL","PAPER"]},"phone_business":{"example":"+41445335926","format":"phone","nullable":true,"type":"string"},"phone_mobile":{"example":"+41445335926","format":"phone","nullable":true,"type":"string"},"phone_private":{"example":"+41445335926","format":"phone","nullable":true,"type":"string"},"tags":{"description":"Tags describing the relationship","example":["BILLING"],"items":{"type":"string","x-extensible-enum":["BILLING"]},"type":"array"}},"type":"object"},"Date":{"properties":{"date":{"format":"date","type":"string"}},"type":"object"},"House":{"properties":{"code":{"example":"X24CH100A","type":"string"},"id":{"description":"Unique identifier","readOnly":true,"type":"integer"},"name":{"description":"Name given to specific BeeHome","example":"backyard bees","nullable":true,"type":"string"},"type":{"description":"Type of house","example":"OBSERVER","nullable":true,"type":"string","x-extensible-enum":["CLASSIC","OBSERVER","ONE","DIVERSITY","PRO"]}},"type":"object"},"Order":{"discriminator":{"propertyName":"type"},"properties":{"address_id":{"type":"integer"},"amount":{"minimum":1,"type":"integer"},"created_by":{"example":"ab73a3cf-f26a-4ce3-a3b9-7d888f248786","readOnly":true,"type":"string"},"fail_url":{"description":"Where to send the users when payment failed","example":"https://mybeehome.ch/payment-fail","type":"string","writeOnly":true},"id":{"description":"Unique identifier","readOnly":true,"type":"integer"},"order_date":{"example":"2020-01-01","readOnly":true,"type":"string"},"paylink_url":{"description":"Where to send the user for checkout/payment","example":"https://demo.payrexx.com/?payment=382c85eab7a86278e3c3b06a23af2358","readOnly":true,"type":"string"},"success_url":{"description":"Where to send the users when payment succeeded","example":"https://mybeehome.ch/payment-success","type":"string","writeOnly":true},"type":{"enum":["STARTPOP","BEECARE"],"example":"STARTPOP","type":"string"},"vouchers":{"description":"Ids of the vouchers to be redeemed for this order\n","example":[1009,1010,1011],"items":{"type":"integer"},"type":"array"}},"required":["type","address_id"],"type":"object"},"Organisation":{"properties":{"id":{"description":"Unique identifier","example":1,"readOnly":true,"type":"integer"},"name":{"example":"WBP","type":"string"}},"type":"object"},"PostalCode":{"properties":{"country_code":{"description":"ISO 3166-1 alpha-2 country code","example":"FR","type":"string"},"description":{"example":"Corse","type":"string"},"postal_code":{"example":"20*","readOnly":true,"type":"string"}},"type":"object"},"Setting":{"properties":{"allowed_countries":{"items":{"description":"ISO 3166-1 alpha-2 country code","example":"CH","type":"string"},"type":"array"},"beecare":{"allOf":[{"$ref":"#/components/schemas/BeeCareSetting"}],"type":"object"},"house_types":{"items":{"example":"CLASSIC","type":"string","x-extensible-enum":["CLASSIC","OBSERVER","ONE","DIVERSITY","PRO"]},"type":"array"},"organisation_id":{"readOnly":true,"type":"integer"},"startpop":{"allOf":[{"$ref":"#/components/schemas/StartpopSetting"}],"type":"object"}},"type":"object"},"ShippingLabel":{"properties":{"shipping_label_url":{"type":"string"}},"type":"object"},"SignedURL":{"properties":{"upload_url":{"example":"https://storage.googleapis.com/devadmin-images/X44CHE45H_2021_6107db57ad890.jpg","format":"url","type":"string"},"url":{"example":"gs://devadmin-images/X44CHE45H_2021_6107db57ad890.jpg","format":"url","type":"string"}},"type":"object"},"Snapshot":{"properties":{"beecare_id":{"readOnly":true,"type":"integer"},"filename":{"example":"X44CHE45H_2021_6107db57ad890.jpg","type":"string"},"id":{"readOnly":true,"type":"integer"},"url":{"example":"https://storage.googleapis.com/devadmin-images/X44CHE45H_2021_6107db57ad890.jpg","format":"url","type":"string"}},"type":"object"},"StartpopOrder":{"allOf":[{"$ref":"#/components/schemas/Order"},{"properties":{"delivery_on":{"format":"date","type":"string"},"total_price":{"description":"Only allowed when price is a suggestion, user can set the price\n","example":19.9,"minimum":0,"type":"number"}},"required":["delivery_on"],"type":"object"}]},"StartpopSetting":{"properties":{"bicornis_start_date":{"description":"First day of the bicornis ordering season","format":"date","type":"string"},"cocoons_per_unit":{"minimum":0,"type":"integer"},"currency":{"description":"ISO 4217 currency code","example":"CHF","type":"string"},"end_date":{"description":"Last day of ordering season","format":"date","type":"string"},"max_units":{"minimum":0,"type":"integer"},"next_possible_date":{"description":"Next possible delivery date","format":"date","readOnly":true,"type":"string"},"price":{"example":15.0,"minimum":0,"type":"number"},"price_is_suggestion":{"example":false,"type":"boolean"},"remaining_units":{"minimum":0,"readOnly":true,"type":"integer"},"season":{"example":"2020","type":"string"},"start_date":{"description":"First day of ordering season","format":"date","type":"string"},"unavailable_dates":{"description":"List of dates between start_date and end_date on which delivery is not possible\n","items":{"format":"date","type":"string"},"readOnly":true,"type":"array"}},"type":"object"},"Voucher":{"properties":{"code":{"description":"voucher code, could be house code or generic voucher code\n","example":"X24CH100A","nullable":true,"type":"string"},"expiry_on":{"format":"date","type":"string"},"house_id":{"type":"integer"},"id":{"description":"Unique identifier","example":76016,"readOnly":true,"type":"integer"},"is_active":{"readOnly":true,"type":"boolean"},"order_id":{"type":"integer"},"type":{"enum":["BEECARE","STARTPOP","STARTPOP_OC","STARTPOP_BC"],"example":"BEECARE","type":"string"}},"required":["type","code"],"type":"object"}},"securitySchemes":{"firebase":{"bearerFormat":"JWT","scheme":"bearer","type":"http","x-bearerInfoFunc":"beehome.auth.decode_firebase_token"},"keycloak":{"bearerFormat":"JWT","scheme":"bearer","type":"http","x-bearerInfoFunc":"beehome.auth.decode_keycloak_token"}}},"info":{"title":"BeeHome API","version":"1.0"},"openapi":"3.0.0","paths":{"/beecare":{"get":{"operationId":"app.api.admin.list_beecare","parameters":[{"$ref":"#/components/parameters/client_id_filter"},{"$ref":"#/components/parameters/house_id_filter"},{"$ref":"#/components/parameters/order_id_filter"},{"$ref":"#/components/parameters/season_filter"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"content":{"text/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BeeCare"},"type":"array"},"page":{"example":1,"type":"integer"},"page_size":{"example":20,"type":"integer"},"total_count":{"example":200,"type":"integer"},"total_pages":{"example":10,"type":"integer"}},"type":"object"}}},"description":"Ok"}},"security":[{"keycloak":[]}],"summary":"List beecare","tags":["BeeCare"]},"post":{"operationId":"app.api.admin.post_beecare","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BeeCare","required":["house_id"]}}},"required":true},"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/BeeCare"}}},"description":"Ok"}},"security":[{"keycloak":[]}],"summary":"create Bee Care","tags":["BeeCare"]}},"/beecare/{beecare_id}":{"patch":{"operationId":"app.api.admin.patch_beecare","parameters":[{"$ref":"#/components/parameters/beecare_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BeeCare"}}},"required":true},"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/BeeCare"}}},"description":"Ok"}},"security":[{"keycloak":[]}],"summary":"Update Bee Care","tags":["BeeCare"]}},"/beecare/{beecare_id}/snapshots":{"delete":{"operationId":"app.api.admin.delete_snapshot","parameters":[{"$ref":"#/components/parameters/beecare_id"}],"responses":{"204":{"description":"No Content"}},"security":[{"keycloak":[]}],"summary":"Delete a snapshot record.","tags":["BeeCare"]},"post":{"operationId":"app.api.admin.post_snapshot","parameters":[{"$ref":"#/components/parameters/beecare_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Snapshot"}}},"required":true},"responses":{"201":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/Snapshot"}}},"description":"created"},"202":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/SignedURL"}}},"description":"accepted"}},"security":[{"keycloak":[]}],"summary":"add a snapshot to an existing beecare entry.","tags":["BeeCare"]}},"/houses":{"get":{"operationId":"app.api.admin.list_houses","parameters":[{"$ref":"#/components/parameters/code"},{"$ref":"#/components/parameters/client_id_filter"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"content":{"text/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminHouse"},"type":"array"},"page":{"example":1,"type":"integer"},"page_size":{"example":20,"type":"integer"},"total_count":{"example":200,"type":"integer"},"total_pages":{"example":10,"type":"integer"}},"type":"object"}}},"description":"Ok"}},"security":[{"keycloak":[]}],"summary":"List houses","tags":["Houses"]},"post":{"operationId":"app.api.admin.post_house","parameters":[{"description":"If this flag is false (default) and the house is already assigned to another owner then return a 409 error. If this flag is true and the house is already assigned, then transfer the house anyway.\n","in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminHouse","required":["code"]}}},"required":true},"responses":{"201":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/AdminHouse"}}},"description":"Created"},"409":{"description":"Conflict"}},"security":[{"keycloak":[]}],"summary":"Add house","tags":["Houses"]}},"/houses/{house_id}":{"delete":{"operationId":"app.api.admin.delete_house","parameters":[{"$ref":"#/components/parameters/house_id"}],"responses":{"204":{"description":"No content"}},"security":[{"keycloak":[]}],"summary":"Delete house","tags":["Houses"]},"get":{"operationId":"app.api.admin.get_house","parameters":[{"$ref":"#/components/parameters/house_id"}],"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/AdminHouse"}}},"description":"Ok"}},"security":[{"keycloak":[]}],"summary":"Get house","tags":["Houses"]},"patch":{"operationId":"app.api.admin.patch_house","parameters":[{"$ref":"#/components/parameters/house_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminHouse"}}},"required":true},"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/AdminHouse"}}},"description":"Ok"},"404":{"description":"House not found"}},"security":[{"keycloak":[]}],"summary":"Update house","tags":["Houses"]}},"/me":{"delete":{"operationId":"app.api.me.delete_account","responses":{"204":{"description":"No Content"}},"security":[{"firebase":[]}],"summary":"Delete account","tags":["Account"]},"get":{"operationId":"app.api.me.get_account","responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/Client"}}},"description":"Ok"},"404":{"description":"Not found"}},"security":[{"firebase":[]}],"summary":"Get account","tags":["Account"]},"put":{"operationId":"app.api.me.put_account","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}},"required":true},"responses":{"200":{"description":"Ok"}},"security":[{"firebase":[]}],"summary":"Update account","tags":["Account"]}},"/me/addresses":{"post":{"operationId":"app.api.me.post_address","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Address"}}},"required":true},"responses":{"201":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/Address"}}},"description":"Created"}},"security":[{"firebase":[]}],"summary":"Add an address","tags":["Addresses"]}},"/me/addresses/{address_id}":{"delete":{"operationId":"app.api.me.delete_address","parameters":[{"$ref":"#/components/parameters/address_id"}],"responses":{"204":{"description":"No Content"}},"security":[{"firebase":[]}],"summary":"Delete an address","tags":["Addresses"]},"put":{"operationId":"app.api.me.put_address","parameters":[{"$ref":"#/components/parameters/address_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Address"}}},"required":true},"responses":{"200":{"description":"Ok"}},"security":[{"firebase":[]}],"summary":"Update an address","tags":["Addresses"]}},"/me/beecare":{"get":{"operationId":"app.api.me.list_beecare","parameters":[{"$ref":"#/components/parameters/season_filter"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"content":{"text/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BeeCare"},"type":"array"},"page":{"example":1,"type":"integer"},"page_size":{"example":20,"type":"integer"},"total_count":{"example":200,"type":"integer"},"total_pages":{"example":10,"type":"integer"}},"type":"object"}}},"description":"Ok"}},"security":[{"firebase":[]}],"summary":"List beecare","tags":["BeeCare"]}},"/me/contacts/{contact_id}":{"put":{"operationId":"app.api.me.put_contact","parameters":[{"$ref":"#/components/parameters/contact_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"required":true},"responses":{"200":{"description":"Ok"},"403":{"description":"Email does not match the verified email provided in the auth token."},"409":{"description":"Another account with this email already exists."}},"security":[{"firebase":[]}],"summary":"Update a contact","tags":["Contacts"]}},"/me/houses":{"get":{"description":"List houses assigned to the logged in account.\n","operationId":"app.api.me.list_houses","responses":{"200":{"content":{"text/json":{"schema":{"items":{"$ref":"#/components/schemas/House"},"type":"array"}}},"description":"Ok"}},"security":[{"firebase":[]}],"summary":"List houses","tags":["Houses"]},"post":{"operationId":"app.api.me.post_house","parameters":[{"description":"If this flag is false (default) and the house is already assigned to another owner then return a 409 error. If this flag is true and the house is already assigned, then transfer the house anyway.\n","in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/House","required":["code","type"]}}},"required":true},"responses":{"201":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/House"}}},"description":"Created"},"409":{"description":"Conflict"}},"security":[{"firebase":[]}],"summary":"Add a house","tags":["Houses"]}},"/me/houses/{house_id}":{"delete":{"operationId":"app.api.me.delete_house","parameters":[{"$ref":"#/components/parameters/house_id"}],"responses":{"204":{"description":"No content"}},"security":[{"firebase":[]}],"summary":"Delete a house","tags":["Houses"]},"put":{"operationId":"app.api.me.put_house","parameters":[{"$ref":"#/components/parameters/house_id"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/House"},{"properties":{"code":{"readOnly":true,"type":"string"}},"type":"object"}]}}},"required":true},"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/House"}}},"description":"Ok"}},"security":[{"firebase":[]}],"summary":"Update a house","tags":["Houses"]}},"/me/orders":{"get":{"operationId":"app.api.me.list_orders","responses":{"200":{"content":{"text/json":{"schema":{"items":{"oneOf":[{"$ref":"#/components/schemas/StartpopOrder"},{"$ref":"#/components/schemas/BeeCareOrder"}]},"type":"array"}}},"description":"Ok"}},"security":[{"firebase":[]}],"summary":"Get orders","tags":["Orders"]},"post":{"operationId":"app.api.me.post_order","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StartpopOrder"},{"$ref":"#/components/schemas/BeeCareOrder"}]}}},"required":true},"responses":{"201":{"content":{"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StartpopOrder"},{"$ref":"#/components/schemas/BeeCareOrder"}]}}},"description":"Created"}},"security":[{"firebase":[]}],"summary":"Place an order","tags":["Orders"]}},"/me/orders/{order_id}":{"get":{"operationId":"app.api.me.get_order","parameters":[{"$ref":"#/components/parameters/order_id"}],"responses":{"200":{"content":{"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StartpopOrder"},{"$ref":"#/components/schemas/BeeCareOrder"}]}}},"description":"Ok"}},"security":[{"firebase":[]}],"summary":"Get order","tags":["Orders"]}},"/me/orders/{order_id}/shippinglabel":{"get":{"operationId":"app.api.me.get_shipping_label","parameters":[{"$ref":"#/components/parameters/order_id"}],"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/ShippingLabel"}}},"description":"Ok"},"403":{"description":"Order does not belong to the client"},"404":{"description":"unable to generate shipping label."}},"security":[{"firebase":[]}],"summary":"returns the orders shipping label link or try's to generate a new shipping label from swisspost if one does not exist","tags":["Orders"]}},"/me/settings":{"get":{"operationId":"app.api.me.get_settings","responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/Setting"}}},"description":"Ok"},"406":{"description":"settings are unavailable for the specified organisation"}},"security":[{"firebase":[]}],"summary":"Get settings","tags":["Settings"]}},"/me/shopify-login":{"get":{"operationId":"app.api.shopify.login","parameters":[{"description":"Path relative to shopify home where to forward the client after successful login\n","example":"products/beehome-one","in":"query","name":"return_to","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/locale"}],"responses":{"200":{"content":{"text/json":{"schema":{"properties":{"url":{"example":"https://beehome-ch.myshopify.com/account/login/multipass/xxxxxxxxx","type":"string"}},"type":"object"}}},"description":"Ok"}},"security":[{"firebase":[]}],"summary":"Get a shopify login url","tags":["Login"]}},"/me/shopify/orders/{shopify_id}":{"get":{"operationId":"app.api.me.get_order_by_shopify_id","parameters":[{"$ref":"#/components/parameters/shopify_id"}],"responses":{"200":{"content":{"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StartpopOrder"},{"$ref":"#/components/schemas/BeeCareOrder"}]}}},"description":"Ok"}},"security":[{"firebase":[]}],"summary":"Get order by Shopify Id","tags":["Orders"]}},"/me/signup":{"post":{"description":"Create a new account with the validated information provided in the JWT and the additional unvalidated information in the request body. Send the id of the new account to the auth provider, so the client_id claim is set in the JWT.\n","operationId":"app.api.me.signup","requestBody":{"content":{"application/json":{"schema":{"properties":{"country_code":{"description":"ISO 3166-1 alpha-2 country code","example":"FR","type":"string"},"first_name":{"example":"John","type":"string"},"language":{"description":"ISO 639-1 language code","example":"de","nullable":true,"type":"string"},"last_name":{"example":"Bee","type":"string"}},"required":["country_code","first_name","language"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/Client"}}},"description":"Created"}},"security":[{"firebase":[]}],"summary":"Sign up","tags":["Login"]}},"/me/signup-existing":{"post":{"description":"Check if an account already exists for the email provided in the JWT. If an account exists, then send the client_id to the auth provider, so the client_id claim is set in the JWT. If no existing account is found return 404.\n","operationId":"app.api.me.signup_existing","responses":{"204":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/Client"}}},"description":"Created"},"404":{"description":"Not found"}},"security":[{"firebase":[]}],"summary":"Sign up existing client","tags":["Login"]}},"/me/towns":{"get":{"description":"Validate postal code and return list of towns for auto-complete\n","operationId":"app.api.me.get_towns","parameters":[{"$ref":"#/components/parameters/country_code_filter"},{"$ref":"#/components/parameters/postal_code_filter"}],"responses":{"200":{"content":{"text/json":{"schema":{"items":{"properties":{"town":{"example":"Z\u00fcrich","type":"string"}},"type":"object"},"type":"array"}}},"description":"Ok"},"404":{"content":{"text/json":{"schema":{"properties":{"detail":{"example":"We do not ship to the postal code provided","type":"string"},"status":{"example":404,"type":"integer"},"title":{"example":"Not found","type":"string"}},"type":"object"}}},"description":"Not found"}},"security":[{"firebase":[]}],"summary":"Validate postal code\n","tags":["Other"]}},"/me/vouchers":{"get":{"description":"List active vouchers assigned to the logged in account, i.e. vouchers that have not yet expired and were not yet redeemd.\n","operationId":"app.api.me.list_vouchers","responses":{"200":{"content":{"text/json":{"schema":{"items":{"$ref":"#/components/schemas/Voucher"},"type":"array"}}},"description":"Ok"}},"security":[{"firebase":[]}],"summary":"List vouchers","tags":["Vouchers"]},"post":{"description":"If the supplied code is valid, then the id returned here can be used when posting the order.\n","operationId":"app.api.me.post_voucher","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voucher"}}},"required":true},"responses":{"201":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/Voucher"}}},"description":"Created"}},"security":[{"firebase":[]}],"summary":"Add voucher","tags":["Vouchers"]}},"/orders":{"get":{"operationId":"app.api.admin.search_order","parameters":[{"$ref":"#/components/parameters/q"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"},{"$ref":"#/components/parameters/is_printed"},{"$ref":"#/components/parameters/is_paid"},{"$ref":"#/components/parameters/has_bexio_id"},{"$ref":"#/components/parameters/is_invoice"},{"$ref":"#/components/parameters/is_standard"},{"$ref":"#/components/parameters/order_date_from"},{"$ref":"#/components/parameters/order_date_to"},{"$ref":"#/components/parameters/delivery_date_from"},{"$ref":"#/components/parameters/delivery_date_to"},{"$ref":"#/components/parameters/client_id_filter"},{"$ref":"#/components/parameters/organisation_id_filter"},{"$ref":"#/components/parameters/house_id_filter"},{"$ref":"#/components/parameters/type_filter"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"content":{"text/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminOrder"},"type":"array"},"page":{"example":1,"type":"integer"},"page_size":{"example":20,"type":"integer"},"total_count":{"example":200,"type":"integer"},"total_pages":{"example":10,"type":"integer"}},"type":"object"}}},"description":"Ok"}},"security":[{"keycloak":[]}],"summary":"List orders","tags":["Orders"]},"post":{"operationId":"app.api.admin.post_order","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrder"}}},"required":true},"responses":{"201":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/AdminOrder"}}},"description":"Created"}},"security":[{"keycloak":[]}],"summary":"Place an order","tags":["Orders"]}},"/orders/{order_id}":{"delete":{"operationId":"app.api.admin.delete_order","parameters":[{"$ref":"#/components/parameters/order_id"}],"responses":{"204":{"description":"No content"}},"security":[{"keycloak":[]}],"summary":"Delete order","tags":["Orders"]},"get":{"description":"Information about order by id\n","operationId":"app.api.admin.get_order","parameters":[{"$ref":"#/components/parameters/order_id"}],"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/AdminOrder"}}},"description":"Ok"}},"security":[{"keycloak":[]}],"summary":"Get order","tags":["Orders"]},"patch":{"operationId":"app.api.admin.patch_order","parameters":[{"$ref":"#/components/parameters/order_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrder"}}},"required":true},"responses":{"201":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/AdminOrder"}}},"description":"Created"}},"security":[{"keycloak":[]}],"summary":"Update order","tags":["Orders"]}},"/session":{"post":{"description":"Accepts a Firebase idToken, verifies it, creates a session cookie, and sets it in the response header for subdomain authentication.\n","operationId":"app.api.session.create_session_cookie","requestBody":{"content":{"application/json":{"schema":{"properties":{"idToken":{"description":"Firebase ID token obtained after user login.","type":"string"}},"required":["idToken"],"type":"object"}}},"description":"Firebase idToken in JSON format","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"success":{"example":true,"type":"boolean"}},"type":"object"}}},"description":"Session cookie created successfully."},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"example":"Missing idToken","type":"string"}},"type":"object"}}},"description":"Missing idToken."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"example":"Invalid idToken","type":"string"}},"type":"object"}}},"description":"Unauthorized - invalid idToken or failure creating session cookie."}},"summary":"Create a Firebase session cookie","tags":["Session"]}},"/session/logout":{"post":{"description":"Clears the session cookie, effectively logging out the user across all subdomains.\n","operationId":"app.api.session.logout","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"success":{"example":true,"type":"boolean"}},"type":"object"}}},"description":"Logout successful."}},"summary":"Destroy the session cookie"}},"/session/verify":{"post":{"description":"Checks if a valid Firebase session cookie exists. If valid, generates a Firebase custom token that can be used for silent sign-in on another subdomain.\n","operationId":"app.api.session.verify_session_cookie","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"customToken":{"description":"A Firebase custom token for signing in the user.","example":"eyJhbGciOiJIUzI1NiIsIn...","type":"string"}},"type":"object"}}},"description":"Firebase custom token returned successfully."},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"example":"Missing session cookie","type":"string"}},"type":"object"}}},"description":"Missing session cookie."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"example":"Invalid or expired session cookie","type":"string"}},"type":"object"}}},"description":"Invalid or expired session cookie."},"500":{"content":{"application/json":{"schema":{"properties":{"error":{"example":"Failed to create custom token","type":"string"}},"type":"object"}}},"description":"Internal server error - failed to generate custom token."}},"summary":"Verify session cookie and return Firebase custom token","tags":["Session"]}},"/settings":{"get":{"description":"List all settings","operationId":"app.api.admin.list_settings","responses":{"200":{"content":{"text/json":{"schema":{"items":{"$ref":"#/components/schemas/AdminSetting"},"type":"array"}}},"description":"Ok"}},"security":[{"keycloak":[]}],"summary":"List settings","tags":["Settings"]}},"/settings/{organisation_id}":{"delete":{"operationId":"app.api.admin.delete_setting","parameters":[{"$ref":"#/components/parameters/organisation_id"}],"responses":{"204":{"description":"No Content"}},"security":[{"keycloak":[]}],"summary":"Remove settings","tags":["Settings"]},"get":{"operationId":"app.api.admin.get_setting","parameters":[{"$ref":"#/components/parameters/organisation_id"}],"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/AdminSetting"}}},"description":"Ok"}},"security":[{"keycloak":[]}],"summary":"Get settings","tags":["Settings"]},"put":{"operationId":"app.api.admin.put_setting","parameters":[{"$ref":"#/components/parameters/organisation_id"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Setting"}]}}},"required":true},"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/Setting"}}},"description":"Ok"},"201":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/Setting"}}},"description":"Created"}},"security":[{"keycloak":[]}],"summary":"Update or create settings","tags":["Settings"]}},"/settings/{organisation_id}/beecare":{"delete":{"operationId":"app.api.admin.delete_beecare_setting","parameters":[{"$ref":"#/components/parameters/organisation_id"}],"responses":{"204":{"description":"No Content"}},"security":[{"keycloak":[]}],"summary":"Remove BeeCare settings","tags":["Settings"]},"get":{"operationId":"app.api.admin.get_beecare_setting","parameters":[{"$ref":"#/components/parameters/organisation_id"}],"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/AdminBeeCareSetting"}}},"description":"Ok"}},"security":[{"keycloak":[]}],"summary":"Get BeeCare settings","tags":["Settings"]},"put":{"operationId":"app.api.admin.put_beecare_setting","parameters":[{"$ref":"#/components/parameters/organisation_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBeeCareSetting"}}},"required":true},"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/AdminBeeCareSetting"}}},"description":"Ok"},"201":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/AdminBeeCareSetting"}}},"description":"Created"}},"security":[{"keycloak":[]}],"summary":"Update or create BeeCare settings","tags":["Settings"]}},"/settings/{organisation_id}/excluded-dates/{date}":{"delete":{"operationId":"app.api.admin.delete_excluded_date","parameters":[{"$ref":"#/components/parameters/organisation_id"},{"$ref":"#/components/parameters/date"}],"responses":{"204":{"description":"No Content"}},"security":[{"keycloak":[]}],"summary":"Remove an excluded date","tags":["Settings"]},"put":{"operationId":"app.api.admin.put_excluded_date","parameters":[{"$ref":"#/components/parameters/organisation_id"},{"$ref":"#/components/parameters/date"}],"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/Date"}}},"description":"Ok"},"201":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/Date"}}},"description":"Created"}},"security":[{"keycloak":[]}],"summary":"Add an excluded date","tags":["Settings"]}},"/settings/{organisation_id}/excluded-postal-codes/{country_code}/{postal_code}":{"delete":{"operationId":"app.api.admin.delete_excluded_postal_code","parameters":[{"$ref":"#/components/parameters/organisation_id"},{"$ref":"#/components/parameters/country_code"},{"$ref":"#/components/parameters/postal_code"}],"responses":{"204":{"description":"No Content"}},"security":[{"keycloak":[]}],"summary":"Remove an excluded postal code","tags":["Settings"]},"put":{"operationId":"app.api.admin.put_excluded_postal_code","parameters":[{"$ref":"#/components/parameters/organisation_id"},{"$ref":"#/components/parameters/country_code"},{"$ref":"#/components/parameters/postal_code"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostalCode"}}},"required":true},"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/PostalCode"}}},"description":"Created"},"201":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/PostalCode"}}},"description":"Created"}},"security":[{"keycloak":[]}],"summary":"Add an excluded postal code","tags":["Settings"]}},"/settings/{organisation_id}/startpop":{"delete":{"operationId":"app.api.admin.delete_startpop_setting","parameters":[{"$ref":"#/components/parameters/organisation_id"}],"responses":{"204":{"description":"No Content"}},"security":[{"keycloak":[]}],"summary":"Remove Startpop settings","tags":["Settings"]},"get":{"operationId":"app.api.admin.get_startpop_setting","parameters":[{"$ref":"#/components/parameters/organisation_id"}],"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/AdminStartpopSetting"}}},"description":"Ok"}},"security":[{"keycloak":[]}],"summary":"Get Startpop settings","tags":["Settings"]},"put":{"operationId":"app.api.admin.put_startpop_setting","parameters":[{"$ref":"#/components/parameters/organisation_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStartpopSetting"}}},"required":true},"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/AdminStartpopSetting"}}},"description":"Ok"},"201":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/AdminStartpopSetting"}}},"description":"Created"}},"security":[{"keycloak":[]}],"summary":"Update or create Startpop settings","tags":["Settings"]}},"/shopify-graphql":{"post":{"description":"passes a query to the shopify graphQL api and returns the value","operationId":"app.api.shopify.call_graphQL","parameters":[{"$ref":"#/components/parameters/locale"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"query":{"description":"graphQL Query","example":"test","type":"string"},"variables":{"description":"graphQL Variables","example":"test","type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"text/json":{"schema":{}}},"description":"Response from shopify"}},"security":[{"keycloak":[]}]}},"/shopify/orderhook":{"post":{"description":"accepts an order and triggers the same flow as the shopify webook with keycloak validation","operationId":"app.api.shopify.order_hook","parameters":[{"$ref":"#/components/parameters/locale"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"query":{"description":"graphQL Query","example":"test","type":"string"},"variables":{"description":"graphQL Variables","example":"test","type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"text/json":{"schema":{}}},"description":"Response from shopify"}},"security":[{"keycloak":[]}]}},"/vouchers":{"get":{"description":"List all vouchers assigned to the logged in account, i.e. vouchers that have not yet expired and were not yet redeemed.\n","operationId":"app.api.admin.list_vouchers","parameters":[{"$ref":"#/components/parameters/code"},{"$ref":"#/components/parameters/client_id_filter"},{"$ref":"#/components/parameters/order_id_filter"},{"$ref":"#/components/parameters/house_id_filter"},{"$ref":"#/components/parameters/type_filter"},{"$ref":"#/components/parameters/is_active_filter"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"content":{"text/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminVoucher"},"type":"array"},"page":{"example":1,"type":"integer"},"page_size":{"example":20,"type":"integer"},"total_count":{"example":200,"type":"integer"},"total_pages":{"example":10,"type":"integer"}},"type":"object"}}},"description":"Ok"}},"security":[{"keycloak":[]}],"summary":"List vouchers","tags":["Vouchers"]},"post":{"operationId":"app.api.admin.post_voucher","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminVoucher"}}},"required":true},"responses":{"201":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/AdminVoucher"}}},"description":"Created"}},"security":[{"keycloak":[]}],"summary":"Add a new voucher","tags":["Vouchers"]}},"/vouchers/{voucher_id}":{"delete":{"operationId":"app.api.admin.delete_voucher","parameters":[{"$ref":"#/components/parameters/voucher_id"}],"responses":{"204":{"description":"No Content"}},"security":[{"keycloak":[]}],"summary":"Delete voucher","tags":["Vouchers"]},"get":{"operationId":"app.api.admin.get_voucher","parameters":[{"$ref":"#/components/parameters/voucher_id"}],"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/AdminVoucher"}}},"description":"Ok"}},"security":[{"keycloak":[]}],"summary":"Get voucher","tags":["Vouchers"]},"patch":{"operationId":"app.api.admin.patch_voucher","parameters":[{"$ref":"#/components/parameters/voucher_id"}],"responses":{"200":{"content":{"text/json":{"schema":{"$ref":"#/components/schemas/AdminVoucher"}}},"description":"Ok"}},"security":[{"keycloak":[]}],"summary":"Update voucher","tags":["Vouchers"]}},"/webhook/payrexx":{"post":{"description":"Generic webhook endpoint to receive events from Payrexx. Payrexx is not able to send authenticated requests.\n","operationId":"app.api.payrexx.webhook","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":false},"responses":{"201":{"description":"Created"}},"summary":"Payrexx webhook","tags":["Webhooks"]}},"/webhook/shopify":{"post":{"description":"Generic webhook endpoint to receive events from Shopify.\n","operationId":"app.api.shopify.webhook","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":false},"responses":{"202":{"description":"Accepted"}},"summary":"Shopify webhook","tags":["Webhooks"]}}},"servers":[{"url":""}]}
