{"openapi":"3.1.0","$schema":"https://json-schema.org/draft/2020-12/schema","info":{"title":"API V1","version":"v1","description":"For general info about Unidy API please visit [Unidy docs](https://docs.unidy.io/technical-documentation/43Yox8946664zbsR6p9VyD/using-unidy-rest-api/43Yox8946355SVgJroU9dZ)"},"paths":{"/oauth/authorize":{"get":{"summary":"Authorize","tags":["OIDC Authorization"],"description":"Due to swagger not being able to follow redirects copy the created URL to the browser. See further information and list of additional paramters.","parameters":[{"name":"client_id","in":"query","example":"3oyGaZLxkppqDi5V3kLw0e2mDh97ioEH6jMvSgYuhzE","description":"REQUIRED: Get in touch to get your credentials from unidy","required":true},{"name":"redirect_uri","in":"query","example":"https://example.com/oauth/callback","description":"REQUIRED. Redirection URI to which the response will be sent. This URI MUST exactly match one of the Redirection URI values for the Client pre-registered at the OpenID Provider.","required":true},{"name":"scope","in":"query","example":"openid email profile","description":"REQUIRED. OpenID Connect requests MUST contain the openid scope value.","required":true,"schema":{"type":"string"}},{"name":"response_type","example":"code","in":"query","description":"REQUIRED. Choose between code and implicit flow","schema":{"type":"string","enum":["code","token","id_token"]},"required":true},{"name":"response_mode","in":"query","example":"fragment","description":"OPTIONAL. Decide to retrieve authorization result as fragment in redirect url or as form post","schema":{"type":"string","enum":["fragment","form_post"]},"required":true}],"responses":{"302":{"description":"redirect","content":{"text/html":{"example":""}}}}}},"/oauth/token":{"post":{"summary":"create access token","tags":["AccessToken"],"description":"See further information and list of additional paramters here: https://docs.unidy.de/","parameters":[],"responses":{"200":{"description":"success","content":{"application/json":{"example":{"access_token":"8n3G8vJD8EVR5P5xRP8ebhttV17qtjB8BgxPqLvfzig","token_type":"Bearer","expires_in":7200,"scope":"users:read users:write","created_at":1673778600}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"example":"3oyGaZLxkppqDi5V3kLw0e2mDh97ioEH6jMvSgYuhzE","description":"REQUIRED: Get in touch to get your credentials from unidy","required":true},"client_secret":{"example":"rXDV5m_XkOI9XpEou_w-yW5A_Dby_EwHNg-5sHLnqnE","description":"REQUIRED when considered confidential. Get in touch to get your credentials from unidy"},"redirect_uri":{"example":"https://example.com/oauth/callback","description":"REQUIRED. Redirection URI to which the response will be sent. This URI MUST exactly match one of the Redirection URI values for the Client pre-registered at the OpenID Provider.","required":true},"grant_type":{"type":"string","example":"client_credentials","description":"REQUIRED: Choose between supported grant types. When using authorization_code an additinal parameter code needs to be added.The code can be optained by performing a authorization request. Tokens created by the authorization_code grant type are user bound and can only access that user's resources. When choosing client_credentials the access token is not user bound and has global access to all resources. ","enum":["authorization_code","client_credentials","refresh_token"],"required":true},"refresh_token":{"type":"string","example":"some-token","description":"When using grant type refresh_token you will need to add the refresh_token parameter to obtain a new token after the token expired. Tokens created by client_credentials flow do not include a refresh token."},"scope":{"type":"string","example":"users:read users:write","description":"Choose which access rights an access token should have. See https://docs.unidy.de/api/authentication for available scopes, Required when using client_credentials grant type"},"code":{"example":"JSN4xbznaj31KslFF3d8t_E4x2Ii_NNff-asdasdSM","description":"REQUIRED: Use code provided by previous authorization request","required":true}},"required":["client_id","client_secret","grant_type","redirect_uri","scope"]}}}}}},"/oauth/userinfo":{"get":{"summary":"user information","tags":["OIDC Authorization"],"security":[{"user_token":["openid email profile phone address email_verified"]}],"description":"After creating an access token you can fetch user data with the token. Blank attributes are not included in the response. Response is different depending on chosen scopes.","responses":{"200":{"description":"successful","content":{"application/json":{"example":{"sub":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","email":"popo.mr.zeus163@example.com","email_verified":true,"given_name":"Mr. Popo","family_name":"Zeus","name":"Mr. Popo Zeus","gender":"male","updated_at":1673778600,"birthdate":"1987-11-23","phone_number":"+494066969123","address":{"formatted":"999 Wolf Square\nApt. 703\n36251\nSouth Jacquelinemouth\nDeutschland","street_address":"999 Wolf Square\nApt. 703","locality":"South Jacquelinemouth","region":"","country":"Deutschland","postal_code":"36251","address_line_1":"999 Wolf Square","address_line_2":"Apt. 703","street":"999 Wolf","house_number":"Square","country_code":"DE","company":"Lindgren-Spinka"}}}}}}}},"/api/v1/custom_attribute_definitions":{"get":{"summary":"get list of all api-accessible custom_attributes on the instance","security":[{"client_credentials":["custom_attributes:read"]}],"tags":["Custom Attributes"],"description":"Returns a list of all api-accessible custom_attributes on the instance","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/custom_attributes"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}}}},"/api/v1/newsletter_subscriptions":{"post":{"summary":"create newsletter subscription","security":[{"client_credentials":["newsletter_subscriptions:write"]}],"tags":["LegacyNewsletters"],"description":"Creates a newsletter subscription","parameters":[],"responses":{"201":{"description":"created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/legacy_newsletter_subscription"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"422":{"description":"unprocessable entity - invalid email address"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/legacy_create_newsletter_subscription"}}}}}},"/api/v1/newsletter_subscriptions/by_email":{"parameters":[{"name":"email","in":"query","example":"user@example.com","description":"email address","schema":{"type":"string"}}],"get":{"summary":"get newsletter subscription by email","security":[{"client_credentials":["newsletter_subscriptions:read"]}],"tags":["LegacyNewsletters"],"description":"Returns a newsletter subscription via its email","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/legacy_newsletter_subscription"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}},"delete":{"summary":"delete newsletter subscription","security":[{"client_credentials":["newsletter_subscriptions:write"]}],"tags":["LegacyNewsletters"],"description":"Deletes a newsletter subscription via its email","responses":{"204":{"description":"no-content"},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}}},"/api/v1/newsletter_subscriptions/{id}":{"parameters":[{"name":"id","in":"path","description":"id","required":true,"schema":{"type":"string"}}],"put":{"summary":"update newsletter subscription","security":[{"client_credentials":["newsletter_subscriptions:write"]}],"tags":["LegacyNewsletters"],"description":"Updates a newsletter subscription","parameters":[{"name":"id","in":"path","description":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":1,"email":"tillie@example.com","confirmed_at":null,"topics":["Pudding_46","Cupcake_47"]},"schema":{"$ref":"#/components/schemas/legacy_update_newsletter_subscription"}}}},"401":{"description":"unauthorized"},"422":{"description":"unprocessable entity - invalid email address"},"403":{"description":"forbidden"},"404":{"description":"not found"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/legacy_update_newsletter_subscription"}}}}},"delete":{"summary":"delete newsletter subscription","security":[{"client_credentials":["newsletter_subscriptions:write"]}],"tags":["LegacyNewsletters"],"description":"Deletes a newsletter subscription","responses":{"204":{"description":"no-content"},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}}},"/api/v1/newsletter_subscriptions/{id}/confirm":{"parameters":[{"name":"id","in":"path","description":"id","required":true,"schema":{"type":"string"}}],"post":{"summary":"confirm newsletter subscription","security":[{"client_credentials":["newsletter_subscriptions:write"]}],"tags":["LegacyNewsletters"],"description":"Confirms a newsletter subscription","parameters":[],"responses":{"200":{"description":"successful nothing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/legacy_newsletter_subscription"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/legacy_confirm_newsletter_subscription"}}}}}},"/api/v1/newsletters":{"get":{"summary":"get list of all newsletters enabled on instance","security":[{"client_credentials":["newsletter_subscriptions:read"]}],"tags":["Newsletters"],"description":"Returns a list of all newsletters enabled on instance","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/newsletters"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}}}},"/api/v1/newsletters/{internal_name}":{"parameters":[{"name":"internal_name","in":"path","description":"internal_name","required":true,"schema":{"type":"string"}}],"get":{"summary":"gets newsletter","security":[{"client_credentials":["newsletter_subscriptions:read"]}],"tags":["Newsletters"],"description":"Gets a newsletter","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/newsletter"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}}},"/api/v1/newsletters/{internal_name}/subscriptions":{"parameters":[{"name":"internal_name","in":"path","example":"my-newsletter","description":"internal name","required":true,"schema":{"type":"string"}}],"post":{"summary":"create newsletter subscription","security":[{"client_credentials":["newsletter_subscriptions:write"]}],"tags":["Newsletters"],"description":"Creates a newsletter subscription","parameters":[],"responses":{"201":{"description":"created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/newsletter_subscription"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"422":{"description":"unprocessable entity - invalid email address"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/create_newsletter_subscription"}}}}}},"/api/v1/newsletters/{internal_name}/subscriptions/by_email":{"parameters":[{"name":"internal_name","in":"path","example":"my-newsletter","description":"internal name","required":true,"schema":{"type":"string"}},{"name":"email","in":"query","example":"user@example.com","description":"email address","schema":{"type":"string"}}],"get":{"summary":"get newsletter subscription by email","security":[{"client_credentials":["newsletter_subscriptions:read"]}],"tags":["Newsletters"],"description":"Returns a newsletter subscription via its email","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/newsletter_subscription"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}},"delete":{"summary":"delete newsletter subscription","security":[{"client_credentials":["newsletter_subscriptions:write"]}],"tags":["Newsletters"],"description":"Deletes a newsletter subscription via its email","responses":{"204":{"description":"no-content"},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}}},"/api/v1/newsletters/{internal_name}/subscriptions/{id}":{"parameters":[{"name":"internal_name","in":"path","example":"my-newsletter","description":"internal name","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"id","required":true,"schema":{"type":"string"}}],"put":{"summary":"update newsletter subscription","security":[{"client_credentials":["newsletter_subscriptions:write"]}],"tags":["Newsletters"],"description":"Updates a newsletter subscription","parameters":[{"name":"id","in":"path","description":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":1,"email":"lee_kozey@example.com","confirmed_at":null,"opted_out_at":null,"newsletter_id":1,"preference_token":"2c38HhjbA4sGMRP27iSEDYMJ","user_id":null,"preference_identifiers":["Upside Down Pineapple Cake_64","Brownie_65"]},"schema":{"$ref":"#/components/schemas/newsletter_subscription"}}}},"401":{"description":"unauthorized"},"422":{"description":"unprocessable entity - invalid email address"},"403":{"description":"forbidden"},"404":{"description":"not found"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/update_newsletter_subscription"}}}}},"delete":{"summary":"delete newsletter subscription","security":[{"client_credentials":["newsletter_subscriptions:write"]}],"tags":["Newsletters"],"description":"Deletes a newsletter subscription","responses":{"204":{"description":"no-content"},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}}},"/api/v1/newsletters/{internal_name}/subscriptions/{id}/confirm":{"parameters":[{"name":"internal_name","in":"path","example":"my-newsletter","description":"internal name","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"id","required":true,"schema":{"type":"string"}}],"post":{"summary":"confirm newsletter subscription","security":[{"client_credentials":["newsletter_subscriptions:write"]}],"tags":["Newsletters"],"description":"Confirms a newsletter subscription","parameters":[],"responses":{"200":{"description":"successful nothing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/newsletter_subscription"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/confirm_newsletter_subscription"}}}}}},"/api/v1/one_time_login_tokens/unidy":{"post":{"summary":"create a unidy one time login token","security":[{"user_token":["one_time_login_tokens:write"]}],"tags":["One Time Login Tokens"],"description":"Creates a one time login token for a user to log in to the Unidy platform directly.","parameters":[],"responses":{"201":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/one_time_login_token"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/new_unidy_one_time_login_token"}}}}}},"/api/v1/one_time_login_tokens":{"post":{"summary":"create a one time login token","security":[{"user_token":["one_time_login_tokens:write"]}],"tags":["One Time Login Tokens"],"description":"Creates a one time login token for a user to log in to a third party application.Note that the access token needs to be generated by the user and not via client credentials flow.","parameters":[],"responses":{"201":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/one_time_login_token"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/new_one_time_login_token"}}}}}},"/api/v1/users/{user_id}/plugin_data/{plugin_type}":{"parameters":[{"name":"user_id","in":"path","description":"Enter user unidy id","example":"eb7a4199-de25-515a-991e-2e721b24728e","required":true,"schema":{"type":"string"}},{"name":"plugin_type","in":"path","description":"Enter plugin type","example":"hubspot","required":true,"schema":{"type":"string"}}],"put":{"summary":"saves external id","security":[{"client_credentials":["users:write"]}],"tags":["Users"],"description":"Connects user to external system","parameters":[],"responses":{"201":{"description":"successful"},"400":{"description":"bad_request","content":{"application/json":{"example":{"errors":["param is missing or the value is empty or invalid: plugin"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"404":{"description":"user not found","content":{"application/json":{"example":{"errors":["User not found"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"plugin":{"$ref":"#/components/schemas/put_plugin_data"}}}}}}},"delete":{"summary":"deletes external id","security":[{"client_credentials":["users:write"]}],"tags":["Users"],"description":"Deletes external system ID","responses":{"204":{"description":"successfully deleted"},"404":{"description":"record not found","content":{"application/json":{"example":{"errors":["User not found"]},"schema":{"$ref":"#/components/schemas/errors"}}}}}}},"/api/v1/subscriptions":{"get":{"summary":"list subscriptions","tags":["Subscriptions"],"description":"List all subscriptions for the authrorized user. Requires a user based token which can be created by e.g. Authorization Code flow","security":[{"user_token":["subscriptions:read"]}],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"subscriptions":[{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"factory title","text":"factory test text which descirbes the subscription","payment_frequency":"yearly","metadata":{"name":{"label":"Name","value":"Max Mustermann"},"test":{"label":"added info","value":"some additional wallet information"}},"wallet_export":{"qr_code":"2222","further_information":"Lorem ipsum dolor sit amet, https://google.de","additional_attributes":["name","test"]},"state":"active","reference":"987654321","payment_state":"payed","currency":"EUR","button_cta_url":null,"subscription_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","next_payment_at":"2023-01-15T10:30:00.000Z","price":100.99,"exportable_to_wallet":false,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b"}]},"schema":{"type":"object","properties":{"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/subscription"}}}}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}}},"post":{"summary":"create subscription","security":[{"user_token":["subscriptions:write"]}],"tags":["Subscriptions"],"description":"Creates a subscription for the authrorized user. Requires a user based token which can be created by e.g. Authorization Code flow.","parameters":[],"responses":{"201":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"test title","text":"test text which descirbes the subscription","payment_frequency":"monthly","metadata":{"full_name":{"value":"Max Mustermann","label":"Full Name"}},"wallet_export":{"additional_attributes":["full_name"],"qr_code":"1234","further_information":"More information to display in wallet"},"state":"active","reference":"1234fff","payment_state":null,"currency":"EUR","button_cta_url":null,"subscription_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","next_payment_at":"2023-01-15T10:30:00.000Z","price":10.23,"exportable_to_wallet":false,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b"},"schema":{"$ref":"#/components/schemas/subscription"}}}},"400":{"description":"bad_request","content":{"application/json":{"example":{"errors":["param is missing or the value is empty or invalid: subscription"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"422":{"description":"unprocessable entity","content":{"application/json":{"example":{"errors":["The property '#/' did not contain a required property of 'title'","The property '#/' did not contain a required property of 'text'","The property '#/' did not contain a required property of 'reference'"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/new_subscription"}}}}}},"/api/v1/subscriptions/{id}":{"parameters":[{"name":"id","in":"path","description":"id","required":true,"schema":{"type":"string"}}],"get":{"summary":"show subscription","security":[{"user_token":["subscriptions:read"]}],"tags":["Subscriptions"],"description":"Show the subscription for the authrorized user. Requires a user based token which can be created by e.g. Authorization Code flow.","responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"factory title","text":"factory test text which descirbes the subscription","payment_frequency":"yearly","metadata":null,"wallet_export":null,"state":"active","reference":"987654321","payment_state":"payed","currency":"EUR","button_cta_url":null,"subscription_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","next_payment_at":"2023-01-15T10:30:00.000Z","price":100.99,"exportable_to_wallet":false,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b"},"schema":{"$ref":"#/components/schemas/subscription"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}},"patch":{"summary":"update subscription","security":[{"user_token":["subscriptions:write"]}],"tags":["Subscriptions"],"description":"Update a subscription for the authrorized user. Requires a user based token which can be created by e.g. Authorization Code flow.","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"factory title","text":"factory test text which descirbes the subscription","payment_frequency":"yearly","metadata":null,"wallet_export":null,"state":"active","reference":"1234fff","payment_state":"payed","currency":"EUR","button_cta_url":null,"subscription_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","next_payment_at":"2023-01-15T10:30:00.000Z","price":100.99,"exportable_to_wallet":false,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b"},"schema":{"$ref":"#/components/schemas/update_subscription"}}}},"400":{"description":"bad_request","content":{"application/json":{"example":{"errors":["param is missing or the value is empty or invalid: subscription"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"},"422":{"description":"unprocessable entity","content":{"application/json":{"example":{"errors":["Abo-Kategorie existiert nicht"]},"schema":{"$ref":"#/components/schemas/errors"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/update_subscription"}}}}},"put":{"summary":"update subscription","security":[{"user_token":["subscriptions:write"]}],"tags":["Subscriptions"],"description":"Update a subscription for the authrorized user. Requires a user based token which can be created by e.g. Authorization Code flow.","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"test title","text":"test text which descirbes the subscription","payment_frequency":"monthly","metadata":null,"wallet_export":null,"state":"active","reference":"1234fff","payment_state":"payed","currency":"EUR","button_cta_url":null,"subscription_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","next_payment_at":"2023-01-15T10:30:00.000Z","price":10.23,"exportable_to_wallet":false,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b"},"schema":{"$ref":"#/components/schemas/update_subscription"}}}},"400":{"description":"bad_request","content":{"application/json":{"example":{"errors":["param is missing or the value is empty or invalid: subscription"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"},"422":{"description":"bad_request","content":{"application/json":{"example":{"errors":["Abo-Kategorie existiert nicht"]},"schema":{"$ref":"#/components/schemas/errors"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/update_subscription"}}}}},"delete":{"summary":"delete subscription","security":[{"user_token":["subscriptions:write"]}],"tags":["Subscriptions"],"description":"Delete a subscription for the authrorized user. Requires a user based token which can be created by e.g. Authorization Code flow.","responses":{"204":{"description":"successful"},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}}},"/api/v1/subscriptions/batch":{"post":{"summary":"batch create subscriptions (beta)","security":[{"client_credentials":["newsletter_subscriptions:write"]},{"user_token":["newsletter_subscriptions:write"]}],"tags":["Subscriptions"],"description":"Creates a batch of subscriptions. Must at least contain 1 subscription. If one subscription is invalid the whole batch is being declinded. This endpoint is still in beta and might be changed in future. Can be used with user and non user based tokens. When using a user based token it's only possible to create subscriptions for the current authorized user.","parameters":[],"responses":{"201":{"description":"successful","content":{"application/json":{"example":{"subscriptions":[{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"test title","text":"test text which descirbes the subscription","payment_frequency":null,"metadata":null,"wallet_export":null,"state":"active","reference":"1234fff","payment_state":null,"currency":"EUR","button_cta_url":null,"subscription_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","starts_at":null,"ends_at":null,"next_payment_at":null,"price":null,"exportable_to_wallet":false,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b"}]},"schema":{"$ref":"#/components/schemas/subscription"}}}},"400":{"description":"bad_request","content":{"application/json":{"examples":{"test_example":{"value":{"errors":["The property '#/0' did not contain a required property of 'subscription_category_id'","The property '#/0' did not contain a required property of 'title'","The property '#/0' did not contain a required property of 'text'","The property '#/0' did not contain a required property of 'reference'","The property '#/0' did not contain a required property of 'user_id'"]}}},"schema":{"$ref":"#/components/schemas/errors"}}}},"422":{"description":"unprocessable entity","content":{"application/json":{"examples":{"test_example":{"value":{"errors":["Das Attribut #/0/user ist nicht valide: existiert nicht","Das Attribut #/0/subscription_category ist nicht valide: existiert nicht"]}}},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/new_subscriptions"}}}}}},"/api/v1/users/{user_id}/subscriptions":{"parameters":[{"name":"user_id","in":"path","description":"user id","required":true,"schema":{"type":"string"}}],"get":{"summary":"list subscriptions","tags":["Subscriptions"],"description":"List all subscriptions for given user. Can be used with non user based tokens only. Create one using the client credentials flow.","security":[{"client_credentials":["subscriptions:read"]}],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"subscriptions":[{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"factory title","text":"factory test text which descirbes the subscription","payment_frequency":"yearly","metadata":null,"wallet_export":null,"state":"active","reference":"987654321","payment_state":"payed","currency":"EUR","button_cta_url":null,"subscription_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","next_payment_at":"2023-01-15T10:30:00.000Z","price":100.99,"exportable_to_wallet":false,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b"}]},"schema":{"type":"object","properties":{"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/subscription"}}}}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}}},"post":{"summary":"create subscription","security":[{"client_credentials":["subscriptions:write"]}],"tags":["Subscriptions"],"description":"Creates a subscription for given user. Can be used with non user based tokens only. Create one using the client credentials flow.","parameters":[],"responses":{"201":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"test title","text":"test text which descirbes the subscription","payment_frequency":"monthly","metadata":null,"wallet_export":null,"state":"active","reference":"1234fff","payment_state":null,"currency":"EUR","button_cta_url":null,"subscription_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","next_payment_at":"2023-01-15T10:30:00.000Z","price":10.23,"exportable_to_wallet":false,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b"},"schema":{"$ref":"#/components/schemas/subscription"}}}},"400":{"description":"bad_request","content":{"application/json":{"example":{"errors":["param is missing or the value is empty or invalid: subscription"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"422":{"description":"unprocessable entity","content":{"application/json":{"example":{"errors":["The property '#/' did not contain a required property of 'title'","The property '#/' did not contain a required property of 'text'","The property '#/' did not contain a required property of 'reference'"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/new_subscription"}}}}}},"/api/v1/users/{user_id}/subscriptions/{id}":{"parameters":[{"name":"id","in":"path","description":"id","required":true,"schema":{"type":"string"}},{"name":"user_id","in":"path","description":"user id","required":true,"schema":{"type":"string"}}],"get":{"summary":"show subscription","security":[{"client_credentials":["subscriptions:read"]}],"tags":["Subscriptions"],"description":"Show a subscription for given user. Can be used with non user based tokens only. Create one using the client credentials flow.","responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"factory title","text":"factory test text which descirbes the subscription","payment_frequency":"yearly","metadata":null,"wallet_export":null,"state":"active","reference":"987654321","payment_state":"payed","currency":"EUR","button_cta_url":null,"subscription_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","next_payment_at":"2023-01-15T10:30:00.000Z","price":100.99,"exportable_to_wallet":false,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b"},"schema":{"$ref":"#/components/schemas/subscription"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}},"patch":{"summary":"update subscription","security":[{"client_credentials":["subscriptions:write"]}],"tags":["Subscriptions"],"description":"Update a subscription for given user. Can be used with non user based tokens only. Create one using the client credentials flow.","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"factory title","text":"factory test text which descirbes the subscription","payment_frequency":"yearly","metadata":null,"wallet_export":null,"state":"active","reference":"1234fff","payment_state":"payed","currency":"EUR","button_cta_url":null,"subscription_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","next_payment_at":"2023-01-15T10:30:00.000Z","price":100.99,"exportable_to_wallet":false,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b"},"schema":{"$ref":"#/components/schemas/new_subscription"}}}},"400":{"description":"bad_request","content":{"application/json":{"example":{"errors":["param is missing or the value is empty or invalid: subscription"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"},"422":{"description":"unprocessable entity","content":{"application/json":{"example":{"errors":["Abo-Kategorie existiert nicht"]},"schema":{"$ref":"#/components/schemas/errors"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/new_subscription"}}}}},"put":{"summary":"update subscription","security":[{"client_credentials":["subscriptions:write"]}],"tags":["Subscriptions"],"description":"Delete a subscription for given user. Can be used with non user based tokens only. Create one using the client credentials flow.","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"test title","text":"test text which descirbes the subscription","payment_frequency":"monthly","metadata":null,"wallet_export":null,"state":"active","reference":"1234fff","payment_state":"payed","currency":"EUR","button_cta_url":null,"subscription_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","next_payment_at":"2023-01-15T10:30:00.000Z","price":10.23,"exportable_to_wallet":false,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b"},"schema":{"$ref":"#/components/schemas/new_subscription"}}}},"400":{"description":"bad_request","content":{"application/json":{"example":{"errors":["param is missing or the value is empty or invalid: subscription"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"},"422":{"description":"bad_request","content":{"application/json":{"example":{"errors":["Abo-Kategorie existiert nicht"]},"schema":{"$ref":"#/components/schemas/errors"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/new_subscription"}}}}},"delete":{"summary":"delete subscription","security":[{"client_credentials":["subscriptions:write"]}],"tags":["Subscriptions"],"description":"Delete a subscription for given user. Can be used with non user based tokens only. Create one using the client credentials flow.","responses":{"204":{"description":"successful"},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}}},"/api/v1/tickets":{"get":{"summary":"list tickets","tags":["Tickets"],"description":"List all tickets for the authrorized user. Requires a user based token which can be created by e.g. Authorization Code flow","security":[{"user_token":["tickets:read"]}],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"tickets":[{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"factory title","text":"factory test text which descirbes the subscription","reference":"987654321","metadata":null,"wallet_export":null,"state":"active","payment_state":"payed","button_cta_url":"https://google.de","info_banner":null,"seating":"factory seating","venue":"factory venue","currency":"EUR","ticket_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","price":100.99,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","exportable_to_wallet":false}]},"schema":{"type":"object","properties":{"tickets":{"type":"array","items":{"$ref":"#/components/schemas/ticket"}}}}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}}},"post":{"summary":"create ticket","security":[{"user_token":["tickets:write"]}],"tags":["Tickets"],"description":"Creates a ticket for the authrorized user.Requires a user based token which can be created by e.g. Authorization Code flow.","parameters":[],"responses":{"201":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"test title","text":"test text which descirbes the subscription","reference":"1234fff","metadata":{"full_name":{"value":"Max Mustermann","label":"Full Name"}},"wallet_export":{"qr_code":"1234","further_information":"More information to display in wallet","additional_attributes":["full_name"]},"state":"active","payment_state":null,"button_cta_url":"https://example.com","info_banner":null,"seating":"RANDOM","venue":"Random Venue","currency":"EUR","ticket_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","price":10.23,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","exportable_to_wallet":false},"schema":{"$ref":"#/components/schemas/ticket"}}}},"400":{"description":"bad_request","content":{"application/json":{"example":{"errors":["param is missing or the value is empty or invalid: ticket"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"422":{"description":"unprocessable entity","content":{"application/json":{"example":{"errors":["The property '#/' did not contain a required property of 'title'","The property '#/' did not contain a required property of 'text'","The property '#/' did not contain a required property of 'reference'","The property '#/' did not contain a required property of 'starts_at'"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/new_ticket"}}}}}},"/api/v1/tickets/{id}":{"parameters":[{"name":"id","in":"path","description":"id","required":true,"schema":{"type":"string"}}],"get":{"summary":"show ticket","security":[{"user_token":["tickets:read"]}],"tags":["Tickets"],"description":"Show the ticket for the authrorized user.Requires a user based token which can be created by e.g. Authorization Code flow.","responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"factory title","text":"factory test text which descirbes the subscription","reference":"987654321","metadata":null,"wallet_export":null,"state":"active","payment_state":"payed","button_cta_url":"https://google.de","info_banner":null,"seating":"factory seating","venue":"factory venue","currency":"EUR","ticket_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","price":100.99,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","exportable_to_wallet":false},"schema":{"$ref":"#/components/schemas/ticket"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}},"patch":{"summary":"update ticket","security":[{"user_token":["tickets:write"]}],"tags":["Tickets"],"description":"Update a ticket for the authrorized user.Requires a user based token which can be created by e.g. Authorization Code flow.","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"factory title","text":"factory test text which descirbes the subscription","reference":"1234fff","metadata":null,"wallet_export":null,"state":"active","payment_state":"payed","button_cta_url":"https://google.de","info_banner":null,"seating":"factory seating","venue":"factory venue","currency":"EUR","ticket_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","price":100.99,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","exportable_to_wallet":false},"schema":{"$ref":"#/components/schemas/update_ticket"}}}},"400":{"description":"bad_request","content":{"application/json":{"example":{"errors":["param is missing or the value is empty or invalid: ticket"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"},"422":{"description":"unprocessable entity","content":{"application/json":{"example":{"errors":["Ticket category muss ausgefüllt werden"]},"schema":{"$ref":"#/components/schemas/errors"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/update_ticket"}}}}},"put":{"summary":"update ticket","security":[{"user_token":["tickets:write"]}],"tags":["Tickets"],"description":"Update a ticket for the authrorized user.Requires a user based token which can be created by e.g. Authorization Code flow.","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"test title","text":"test text which descirbes the subscription","reference":"1234fff","metadata":null,"wallet_export":null,"state":"active","payment_state":"payed","button_cta_url":"https://example.com","info_banner":null,"seating":"RANDOM","venue":"Random Venue","currency":"EUR","ticket_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","price":10.23,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","exportable_to_wallet":false},"schema":{"$ref":"#/components/schemas/update_ticket"}}}},"400":{"description":"bad_request","content":{"application/json":{"example":{"errors":["param is missing or the value is empty or invalid: ticket"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"},"422":{"description":"bad_request","content":{"application/json":{"example":{"errors":["Ticket category muss ausgefüllt werden"]},"schema":{"$ref":"#/components/schemas/errors"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/update_ticket"}}}}},"delete":{"summary":"delete ticket","security":[{"user_token":["tickets:write"]}],"tags":["Tickets"],"description":"Delete a ticket for the authrorized user.Requires a user based token which can be created by e.g. Authorization Code flow.","responses":{"204":{"description":"successful"},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}}},"/api/v1/tickets/batch":{"post":{"summary":"batch create tickets (beta)","security":[{"client_credentials":["newsletter_subscriptions:write"]},{"user_token":["newsletter_subscriptions:write"]}],"tags":["Tickets"],"description":"Creates a batch of tickets. Must at least contain 1 ticket. If one ticket is invalid the whole batch is being declinded. This endpoint is still in beta and might be changed in future. Can be used with user and non user based tokens. When using a user based token it's only possible to create tickets for the current authorized user.","parameters":[],"responses":{"201":{"description":"successful","content":{"application/json":{"example":{"tickets":[{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"test title","text":"test text which descirbes the ticket","reference":"1234fff","metadata":null,"wallet_export":null,"state":"active","payment_state":null,"button_cta_url":"https://example.com","info_banner":null,"seating":null,"venue":null,"currency":"EUR","ticket_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","starts_at":"2023-01-15T10:30:00.000Z","ends_at":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","price":null,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","exportable_to_wallet":false}]},"schema":{"$ref":"#/components/schemas/ticket"}}}},"422":{"description":"unprocessable entity","content":{"application/json":{"examples":{"test_example":{"value":{"errors":["The property '#/0' did not contain a required property of 'starts_at'"]}}},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/new_tickets"}}}}}},"/api/v1/users/{user_id}/tickets":{"parameters":[{"name":"user_id","in":"path","description":"user id","required":true,"schema":{"type":"string"}}],"get":{"summary":"list tickets","tags":["Tickets"],"description":"List all tickets for given user. Can be used with non user based tokens only. Create one using the client credentials flow.","security":[{"client_credentials":["tickets:read"]}],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"tickets":[{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"factory title","text":"factory test text which descirbes the subscription","reference":"987654321","metadata":null,"wallet_export":null,"state":"active","payment_state":"payed","button_cta_url":"https://google.de","info_banner":null,"seating":"factory seating","venue":"factory venue","currency":"EUR","ticket_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","price":100.99,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","exportable_to_wallet":false}]},"schema":{"type":"object","properties":{"tickets":{"type":"array","items":{"$ref":"#/components/schemas/ticket"}}}}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}}},"post":{"summary":"create ticket","security":[{"client_credentials":["tickets:write"]}],"tags":["Tickets"],"description":"Creates a ticket for given user. Can be used with non user based tokens only. Create one using the client credentials flow.","parameters":[],"responses":{"201":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"test title","text":"test text which descirbes the subscription","reference":"1234fff","metadata":{"full_name":{"value":"Max Mustermann","label":"Full Name"}},"wallet_export":{"qr_code":"1234","further_information":"More information to display in wallet","additional_attributes":["full_name"]},"state":"active","payment_state":null,"button_cta_url":"https://example.com","info_banner":null,"seating":"RANDOM","venue":"Random Venue","currency":"EUR","ticket_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","price":10.23,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","exportable_to_wallet":false},"schema":{"$ref":"#/components/schemas/ticket"}}}},"400":{"description":"bad_request","content":{"application/json":{"example":{"errors":["param is missing or the value is empty or invalid: ticket"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"422":{"description":"unprocessable entity","content":{"application/json":{"example":{"errors":["The property '#/' did not contain a required property of 'title'","The property '#/' did not contain a required property of 'text'","The property '#/' did not contain a required property of 'reference'","The property '#/' did not contain a required property of 'starts_at'"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/new_ticket"}}}}}},"/api/v1/users/{user_id}/tickets/{id}":{"parameters":[{"name":"id","in":"path","description":"id","required":true,"schema":{"type":"string"}},{"name":"user_id","in":"path","description":"user id","required":true,"schema":{"type":"string"}}],"get":{"summary":"show ticket","security":[{"client_credentials":["tickets:read"]}],"tags":["Tickets"],"description":"Show a ticket for given user. Can be used with non user based tokens only. Create one using the client credentials flow.","responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"factory title","text":"factory test text which descirbes the subscription","reference":"987654321","metadata":null,"wallet_export":null,"state":"active","payment_state":"payed","button_cta_url":"https://google.de","info_banner":null,"seating":"factory seating","venue":"factory venue","currency":"EUR","ticket_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","price":100.99,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","exportable_to_wallet":false},"schema":{"$ref":"#/components/schemas/ticket"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}},"patch":{"summary":"update ticket","security":[{"client_credentials":["tickets:write"]}],"tags":["Tickets"],"description":"Update a ticket for given user. Can be used with non user based tokens only. Create one using the client credentials flow.","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"factory title","text":"factory test text which descirbes the subscription","reference":"1234fff","metadata":null,"wallet_export":null,"state":"active","payment_state":"payed","button_cta_url":"https://google.de","info_banner":null,"seating":"factory seating","venue":"factory venue","currency":"EUR","ticket_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","price":100.99,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","exportable_to_wallet":false},"schema":{"$ref":"#/components/schemas/new_ticket"}}}},"400":{"description":"bad_request","content":{"application/json":{"example":{"errors":["param is missing or the value is empty or invalid: ticket"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"},"422":{"description":"unprocessable entity","content":{"application/json":{"example":{"errors":["Ticket category muss ausgefüllt werden"]},"schema":{"$ref":"#/components/schemas/errors"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/update_ticket"}}}}},"put":{"summary":"update ticket","security":[{"client_credentials":["tickets:write"]}],"tags":["Tickets"],"description":"Delete a ticket for given user. Can be used with non user based tokens only. Create one using the client credentials flow.","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","title":"test title","text":"test text which descirbes the subscription","reference":"1234fff","metadata":null,"wallet_export":null,"state":"active","payment_state":"payed","button_cta_url":"https://example.com","info_banner":null,"seating":"RANDOM","venue":"Random Venue","currency":"EUR","ticket_category_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","starts_at":"2023-01-15T10:30:00.000Z","ends_at":"2023-01-15T10:30:00.000Z","created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","price":10.23,"user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","exportable_to_wallet":false},"schema":{"$ref":"#/components/schemas/new_ticket"}}}},"400":{"description":"bad_request","content":{"application/json":{"example":{"errors":["param is missing or the value is empty or invalid: ticket"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"},"422":{"description":"bad_request","content":{"application/json":{"example":{"errors":["Ticket category muss ausgefüllt werden"]},"schema":{"$ref":"#/components/schemas/errors"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/update_ticket"}}}}},"delete":{"summary":"delete ticket","security":[{"client_credentials":["tickets:write"]}],"tags":["Tickets"],"description":"Delete a subscription for given user. Can be used with non user based tokens only.Create one using the client credentials flow.","responses":{"204":{"description":"successful"},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}}},"/api/v1/transaction_categories":{"get":{"summary":"list transaction categories","tags":["Transaction Categories"],"security":[{"client_credentials":["transactions:read"]}],"description":"Returns all transaction categories. Requires a non-user based token created via the client credentials flow.","responses":{"200":{"description":"successful","content":{"application/json":{"example":{"transaction_categories":[{"id":1,"internal_name":"velit-5","name":"Baby","metadata":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z"}]},"schema":{"type":"object","properties":{"transaction_categories":{"type":"array","items":{"$ref":"#/components/schemas/transaction_category"}}}}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}}}},"/api/v1/transaction_categories/{internal_name}":{"parameters":[{"name":"internal_name","in":"path","description":"Unique internal name of the transaction category","required":true,"schema":{"type":"string"}}],"get":{"summary":"show transaction category","tags":["Transaction Categories"],"security":[{"client_credentials":["transactions:read"]}],"description":"Returns a single transaction category by its internal_name. Requires a non-user based token created via the client credentials flow.","responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":1,"internal_name":"illum-8","name":"Industrial \u0026 Beauty","metadata":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z"},"schema":{"$ref":"#/components/schemas/transaction_category"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}}},"/api/v1/transactions/batch":{"post":{"summary":"batch create transactions","tags":["Transactions"],"security":[{"client_credentials":["transactions_batch:write"]}],"description":"Creates a batch of up to 100 transactions. Each item must include user_id or email for user resolution. If email is provided and no user exists, a user is auto-created. Duplicate transactions (same external_id + source_platform) are skipped. Requires a non-user based token created via the client credentials flow.","parameters":[],"responses":{"201":{"description":"successful","content":{"application/json":{"example":{"transactions":[{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","transaction_category_id":1,"external_id":"BATCH-001","reference":"REF-001","source_platform":"shopify","order_type":null,"state":"open","financial_status":null,"fulfillment_status":null,"currency":"EUR","payment_method":null,"payment_provider_ref":null,"coupon_code":null,"invoice_number":null,"prices_include_tax":false,"tax_exempt":false,"tags":[],"cancel_reason":null,"customer_note":null,"staff_note":null,"source_channel_id":null,"platform_metadata":null,"placed_at":"2023-01-15T10:30:00.000Z","cancelled_at":null,"completed_at":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","total":49.99,"subtotal":null,"total_discount":null,"total_paid":null,"total_refunded":null,"total_shipping":null,"total_tax":null,"exchange_rate":null,"billing_address":null,"shipping_address":null,"line_items":[{"id":1,"name":"Widget","quantity":2,"sku":null,"variant":null,"category":null,"item_type":null,"position":null,"external_product_id":"P-1","seller_id":null,"staff_note":null,"metadata":null,"unit_price":10.0,"total_price":20.0,"total_discount":null,"total_tax":null,"tax_rate":null}]}],"skipped":[],"errors":[]},"schema":{"type":"object","properties":{"transactions":{"type":"array","items":{"$ref":"#/components/schemas/transaction"}},"skipped":{"type":"array","items":{"type":"object","properties":{"external_id":{"type":"string"},"source_platform":{"type":"string"}}}},"errors":{"type":"array","items":{"type":"object","properties":{"external_id":{"type":"string"},"source_platform":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}}}}}}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"422":{"description":"unprocessable entity - validation error","content":{"application/json":{"example":{"errors":["The property '#/' did not contain a minimum number of items 1"]},"schema":{"$ref":"#/components/schemas/errors"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/new_transactions"}}}}}},"/api/v1/transactions/{transaction_id}/line_items":{"parameters":[{"name":"transaction_id","in":"path","description":"Transaction unidy_id","required":true,"schema":{"type":"string"}}],"post":{"summary":"create line item","tags":["Transactions"],"security":[{"client_credentials":["transactions:write"]}],"description":"Creates a line item on the given transaction. Requires a non-user based token created via the client credentials flow.","parameters":[],"responses":{"201":{"description":"successful","content":{"application/json":{"example":{"id":1,"name":"Concert Ticket","quantity":2,"sku":null,"variant":null,"category":null,"item_type":null,"position":null,"external_product_id":"PROD-123","seller_id":null,"staff_note":null,"metadata":null,"unit_price":24.99,"total_price":49.98,"total_discount":null,"total_tax":null,"tax_rate":null},"schema":{"$ref":"#/components/schemas/line_item"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"transaction not found"},"422":{"description":"unprocessable entity - missing required fields","content":{"application/json":{"example":{"errors":["The property '#/' did not contain a required property of 'quantity'","The property '#/' did not contain a required property of 'external_product_id'","The property '#/' did not contain a required property of 'unit_price'","The property '#/' did not contain a required property of 'total_price'"]},"schema":{"$ref":"#/components/schemas/errors"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/new_line_item"}}}}}},"/api/v1/transactions/{transaction_id}/line_items/{id}":{"parameters":[{"name":"transaction_id","in":"path","description":"Transaction unidy_id","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Line item ID","required":true,"schema":{"type":"integer"}}],"patch":{"summary":"update line item","tags":["Transactions"],"security":[{"client_credentials":["transactions:write"]}],"description":"Updates a line item on the given transaction. Requires a non-user based token created via the client credentials flow.","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":1,"name":"Updated Name","quantity":5,"sku":"o6hedf538p","variant":null,"category":null,"item_type":null,"position":null,"external_product_id":"m3sqs1zzwi","seller_id":null,"staff_note":null,"metadata":null,"unit_price":9.99,"total_price":9.99,"total_discount":null,"total_tax":null,"tax_rate":null},"schema":{"$ref":"#/components/schemas/line_item"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"line item not found"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/patch_line_item"}}}}},"put":{"summary":"update line item","tags":["Transactions"],"security":[{"client_credentials":["transactions:write"]}],"description":"Updates a line item on the given transaction. Requires a non-user based token created via the client credentials flow.","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":1,"name":"Replaced Name","quantity":3,"sku":"aelz7nz0iz","variant":null,"category":null,"item_type":null,"position":null,"external_product_id":"PROD-NEW","seller_id":null,"staff_note":null,"metadata":null,"unit_price":19.99,"total_price":59.97,"total_discount":null,"total_tax":null,"tax_rate":null},"schema":{"$ref":"#/components/schemas/line_item"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"line item not found"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/patch_line_item"}}}}},"delete":{"summary":"delete line item","tags":["Transactions"],"security":[{"client_credentials":["transactions:write"]}],"description":"Deletes a line item from the given transaction. Requires a non-user based token created via the client credentials flow.","responses":{"204":{"description":"successful"},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"line item not found"}}}},"/api/v1/transactions/search":{"get":{"summary":"search transactions","tags":["Transactions"],"security":[{"client_credentials":["transactions:read"]}],"description":"Searches transactions across a predefined set of fields: transaction (external_id, reference, invoice_number, payment_provider_ref, coupon_code, customer_note, staff_note, cancel_reason), tags (matches any element in the transaction tags array), billing/shipping address (first_name, last_name, company_name, address_line_1, address_line_2, city, postal_code, phone_number), and line item (name, external_product_id, sku, variant, category, staff_note, seller_id). Search is case-insensitive (ILIKE). Supports the same filters as the index endpoint (category_id, channel, source_platform, external_id, user_id, user_email). Requires a non-user based token created via the client credentials flow.","parameters":[{"name":"query","in":"query","required":true,"description":"Search term (case-insensitive substring match)","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Number of results per page (max 250, default 50)","schema":{"type":"integer"}},{"name":"page","in":"query","required":false,"description":"Page number (default 1)","schema":{"type":"integer"}},{"name":"user_id","in":"query","required":false,"description":"Filter by user unidy_id","schema":{"type":"string"}},{"name":"user_email","in":"query","required":false,"description":"Filter by user email","schema":{"type":"string"}},{"name":"category_id","in":"query","required":false,"description":"Filter by transaction category ID","schema":{"type":"integer"}},{"name":"source_platform","in":"query","required":false,"description":"Filter by source platform","schema":{"type":"string"}}],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"meta":{"count":1,"page":1,"limit":50,"last":1,"prev":null,"next":null},"results":[{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","transaction_category_id":1,"external_id":"cguirdyniz","reference":"UNIQUE-SEARCH-REF","source_platform":"shopify","order_type":null,"state":"refunded","financial_status":null,"fulfillment_status":null,"currency":"EUR","payment_method":null,"payment_provider_ref":null,"coupon_code":null,"invoice_number":null,"prices_include_tax":false,"tax_exempt":false,"tags":[],"cancel_reason":null,"customer_note":null,"staff_note":null,"source_channel_id":null,"platform_metadata":null,"placed_at":"2023-01-15T10:30:00.000Z","cancelled_at":null,"completed_at":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","total":99.99,"subtotal":null,"total_discount":null,"total_paid":null,"total_refunded":null,"total_shipping":null,"total_tax":null,"exchange_rate":null,"billing_address":null,"shipping_address":null,"line_items":[]}]},"schema":{"type":"object","properties":{"meta":{"type":"object","description":"Pagy pagination metadata"},"results":{"type":"array","items":{"$ref":"#/components/schemas/transaction"}}}}}}},"400":{"description":"bad request - query missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}}}},"/api/v1/users/{user_id}/transactions/search":{"parameters":[{"name":"user_id","in":"path","description":"User unidy_id","required":true,"schema":{"type":"string"}}],"get":{"summary":"search transactions for user","tags":["Transactions"],"security":[{"client_credentials":["transactions:read"]}],"description":"Searches transactions for a specific user across the same predefined fields as the global search endpoint. Results are scoped to the user in the path. Requires a non-user based token created via the client credentials flow.","parameters":[{"name":"query","in":"query","required":true,"description":"Search term (case-insensitive substring match)","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Number of results per page (max 250, default 50)","schema":{"type":"integer"}},{"name":"page","in":"query","required":false,"description":"Page number (default 1)","schema":{"type":"integer"}}],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"meta":{"count":1,"page":1,"limit":50,"last":1,"prev":null,"next":null},"results":[{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","transaction_category_id":1,"external_id":"bale5i8spc","reference":"USER-SEARCH-REF","source_platform":"shopify","order_type":null,"state":"refunded","financial_status":null,"fulfillment_status":null,"currency":"EUR","payment_method":null,"payment_provider_ref":null,"coupon_code":null,"invoice_number":null,"prices_include_tax":false,"tax_exempt":false,"tags":[],"cancel_reason":null,"customer_note":null,"staff_note":null,"source_channel_id":null,"platform_metadata":null,"placed_at":"2023-01-15T10:30:00.000Z","cancelled_at":null,"completed_at":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","total":99.99,"subtotal":null,"total_discount":null,"total_paid":null,"total_refunded":null,"total_shipping":null,"total_tax":null,"exchange_rate":null,"billing_address":null,"shipping_address":null,"line_items":[]}]},"schema":{"type":"object","properties":{"meta":{"type":"object","description":"Pagy pagination metadata"},"results":{"type":"array","items":{"$ref":"#/components/schemas/transaction"}}}}}}},"400":{"description":"bad request - query missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errors"}}}},"404":{"description":"user not found"}}}},"/api/v1/transactions":{"get":{"summary":"list transactions","tags":["Transactions"],"security":[{"client_credentials":["transactions:read"]}],"description":"Returns a paginated list of transactions. Supports filtering by category_id, channel, source_platform, external_id, user_id, and user_email. Requires a non-user based token created via the client credentials flow.","parameters":[{"name":"limit","in":"query","required":false,"description":"Number of results per page (max 250, default 50)","schema":{"type":"integer"}},{"name":"page","in":"query","required":false,"description":"Page number (default 1)","schema":{"type":"integer"}},{"name":"category_id","in":"query","required":false,"description":"Filter by transaction category ID","schema":{"type":"integer"}},{"name":"channel","in":"query","required":false,"description":"Filter by source channel ID","schema":{"type":"string"}},{"name":"source_platform","in":"query","required":false,"description":"Filter by source platform","schema":{"type":"string"}},{"name":"external_id","in":"query","required":false,"description":"Filter by external ID","schema":{"type":"string"}},{"name":"user_id","in":"query","required":false,"description":"Filter by user unidy_id","schema":{"type":"string"}},{"name":"user_email","in":"query","required":false,"description":"Filter by user email","schema":{"type":"string"}}],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"meta":{"count":1,"page":1,"limit":50,"last":1,"prev":null,"next":null},"results":[{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","transaction_category_id":1,"external_id":"bt1gh8nq9d","reference":"cguirdyniz","source_platform":"shopify","order_type":null,"state":"refunded","financial_status":null,"fulfillment_status":null,"currency":"EUR","payment_method":null,"payment_provider_ref":null,"coupon_code":null,"invoice_number":null,"prices_include_tax":false,"tax_exempt":false,"tags":[],"cancel_reason":null,"customer_note":null,"staff_note":null,"source_channel_id":null,"platform_metadata":null,"placed_at":"2023-01-15T10:30:00.000Z","cancelled_at":null,"completed_at":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","total":99.99,"subtotal":null,"total_discount":null,"total_paid":null,"total_refunded":null,"total_shipping":null,"total_tax":null,"exchange_rate":null,"billing_address":null,"shipping_address":null,"line_items":[]}]},"schema":{"type":"object","properties":{"meta":{"type":"object","description":"Pagy pagination metadata"},"results":{"type":"array","items":{"$ref":"#/components/schemas/transaction"}}}}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}}},"post":{"summary":"create transaction","tags":["Transactions"],"security":[{"client_credentials":["transactions:write"]}],"description":"Creates a transaction for a user identified by user_id (unidy_id) or email. If email is provided and no user exists, a minimal user record will be created. Requires a non-user based token created via the client credentials flow.","parameters":[],"responses":{"201":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","transaction_category_id":1,"external_id":"EXT-001","reference":"REF-001","source_platform":"shopify","order_type":null,"state":"open","financial_status":null,"fulfillment_status":null,"currency":"EUR","payment_method":null,"payment_provider_ref":null,"coupon_code":null,"invoice_number":null,"prices_include_tax":false,"tax_exempt":false,"tags":[],"cancel_reason":null,"customer_note":null,"staff_note":null,"source_channel_id":null,"platform_metadata":null,"placed_at":"2023-01-15T10:30:00.000Z","cancelled_at":null,"completed_at":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","total":49.99,"subtotal":null,"total_discount":null,"total_paid":null,"total_refunded":null,"total_shipping":null,"total_tax":null,"exchange_rate":null,"billing_address":null,"shipping_address":null,"line_items":[]},"schema":{"$ref":"#/components/schemas/transaction"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"422":{"description":"unprocessable entity - user_id or email missing","content":{"application/json":{"example":{"errors":["user_id or email must be provided"]},"schema":{"$ref":"#/components/schemas/errors"}}}}},"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/new_transaction"},{"type":"object","properties":{"user_id":{"type":"string","example":"13a10e14-330d-4169-8b17-5b0263aedae9","description":"Unidy ID of the user. Takes precedence over email."},"email":{"type":"string","example":"user@example.com","description":"Email of the user. Used if user_id is not provided. Creates the user if they do not exist."}}}]}}}}}},"/api/v1/transactions/{id}":{"parameters":[{"name":"id","in":"path","description":"Transaction unidy_id","required":true,"schema":{"type":"string"}}],"get":{"summary":"show transaction","tags":["Transactions"],"security":[{"client_credentials":["transactions:read"]}],"description":"Returns a transaction by its unidy_id. Requires a non-user based token created via the client credentials flow.","responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","transaction_category_id":1,"external_id":"07u3616esd","reference":"gcq6lvv3h0","source_platform":"shopify","order_type":null,"state":"refunded","financial_status":null,"fulfillment_status":null,"currency":"EUR","payment_method":null,"payment_provider_ref":null,"coupon_code":null,"invoice_number":null,"prices_include_tax":false,"tax_exempt":false,"tags":[],"cancel_reason":null,"customer_note":null,"staff_note":null,"source_channel_id":null,"platform_metadata":null,"placed_at":"2023-01-15T10:30:00.000Z","cancelled_at":null,"completed_at":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","total":99.99,"subtotal":null,"total_discount":null,"total_paid":null,"total_refunded":null,"total_shipping":null,"total_tax":null,"exchange_rate":null,"billing_address":null,"shipping_address":null,"line_items":[]},"schema":{"$ref":"#/components/schemas/transaction"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}},"patch":{"summary":"update transaction","tags":["Transactions"],"security":[{"client_credentials":["transactions:write"]}],"description":"Updates a transaction by its unidy_id. Requires a non-user based token created via the client credentials flow.","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","transaction_category_id":1,"external_id":"k29yu9jix8","reference":"qzh2zjz7gd","source_platform":"shopify","order_type":null,"state":"paid","financial_status":"paid","fulfillment_status":null,"currency":"EUR","payment_method":null,"payment_provider_ref":null,"coupon_code":null,"invoice_number":null,"prices_include_tax":false,"tax_exempt":false,"tags":[],"cancel_reason":null,"customer_note":null,"staff_note":null,"source_channel_id":null,"platform_metadata":null,"placed_at":"2023-01-15T10:30:00.000Z","cancelled_at":null,"completed_at":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","total":99.99,"subtotal":null,"total_discount":null,"total_paid":null,"total_refunded":null,"total_shipping":null,"total_tax":null,"exchange_rate":null,"billing_address":null,"shipping_address":null,"line_items":[{"id":1,"name":"Concert Ticket","quantity":2,"sku":null,"variant":null,"category":null,"item_type":null,"position":null,"external_product_id":"PROD-1","seller_id":null,"staff_note":null,"metadata":null,"unit_price":24.99,"total_price":49.98,"total_discount":null,"total_tax":null,"tax_rate":null}]},"schema":{"$ref":"#/components/schemas/transaction"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/update_transaction"}}}}},"put":{"summary":"update transaction","tags":["Transactions"],"security":[{"client_credentials":["transactions:write"]}],"description":"Updates a transaction by its unidy_id. Requires a non-user based token created via the client credentials flow.","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","transaction_category_id":1,"external_id":"EXT-001-UPDATED","reference":"REF-001-UPDATED","source_platform":"shopify","order_type":null,"state":"paid","financial_status":null,"fulfillment_status":null,"currency":"EUR","payment_method":null,"payment_provider_ref":null,"coupon_code":null,"invoice_number":null,"prices_include_tax":false,"tax_exempt":false,"tags":[],"cancel_reason":null,"customer_note":null,"staff_note":null,"source_channel_id":null,"platform_metadata":null,"placed_at":"2023-01-15T10:30:00.000Z","cancelled_at":null,"completed_at":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","total":59.99,"subtotal":null,"total_discount":null,"total_paid":null,"total_refunded":null,"total_shipping":null,"total_tax":null,"exchange_rate":null,"billing_address":null,"shipping_address":null,"line_items":[]},"schema":{"$ref":"#/components/schemas/transaction"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/update_transaction"}}}}},"delete":{"summary":"delete transaction","tags":["Transactions"],"security":[{"client_credentials":["transactions:write"]}],"description":"Deletes a transaction by its unidy_id. Requires a non-user based token created via the client credentials flow.","responses":{"204":{"description":"successful"},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}}},"/api/v1/users/{user_id}/transactions":{"parameters":[{"name":"user_id","in":"path","description":"User unidy_id","required":true,"schema":{"type":"string"}}],"get":{"summary":"list transactions for user","tags":["Transactions"],"security":[{"client_credentials":["transactions:read"]}],"description":"Lists all transactions for a given user. Requires a non-user based token created via the client credentials flow. Supports pagination via limit and page query parameters.","parameters":[{"name":"limit","in":"query","required":false,"description":"Number of results per page (max 250, default 250)","schema":{"type":"integer"}},{"name":"page","in":"query","required":false,"description":"Page number (default 1)","schema":{"type":"integer"}}],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"meta":{"count":1,"page":1,"limit":50,"last":1,"prev":null,"next":null},"results":[{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","transaction_category_id":1,"external_id":"r070qxygfx","reference":"iijz8yzkbg","source_platform":"shopify","order_type":null,"state":"open","financial_status":null,"fulfillment_status":null,"currency":"EUR","payment_method":null,"payment_provider_ref":null,"coupon_code":null,"invoice_number":null,"prices_include_tax":false,"tax_exempt":false,"tags":[],"cancel_reason":null,"customer_note":null,"staff_note":null,"source_channel_id":null,"platform_metadata":null,"placed_at":"2023-01-15T10:30:00.000Z","cancelled_at":null,"completed_at":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","total":99.99,"subtotal":null,"total_discount":null,"total_paid":null,"total_refunded":null,"total_shipping":null,"total_tax":null,"exchange_rate":null,"billing_address":null,"shipping_address":null,"line_items":[]}]},"schema":{"type":"object","properties":{"meta":{"type":"object","description":"Pagy pagination metadata"},"results":{"type":"array","items":{"$ref":"#/components/schemas/transaction"}}}}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"user not found"}}}},"/api/v1/users/{user_id}/transactions/{id}":{"parameters":[{"name":"user_id","in":"path","description":"User unidy_id","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Transaction unidy_id","required":true,"schema":{"type":"string"}}],"get":{"summary":"show transaction for user","tags":["Transactions"],"security":[{"client_credentials":["transactions:read"]}],"description":"Returns a single transaction for a given user by its unidy_id. The transaction must belong to the specified user. Requires a non-user based token created via the client credentials flow.","responses":{"200":{"description":"successful","content":{"application/json":{"example":{"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","user_id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","transaction_category_id":1,"external_id":"38rqn4x87c","reference":"gnogihw2r4","source_platform":"shopify","order_type":null,"state":"partially_refunded","financial_status":null,"fulfillment_status":null,"currency":"EUR","payment_method":null,"payment_provider_ref":null,"coupon_code":null,"invoice_number":null,"prices_include_tax":false,"tax_exempt":false,"tags":[],"cancel_reason":null,"customer_note":null,"staff_note":null,"source_channel_id":null,"platform_metadata":null,"placed_at":"2023-01-15T10:30:00.000Z","cancelled_at":null,"completed_at":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","total":99.99,"subtotal":null,"total_discount":null,"total_paid":null,"total_refunded":null,"total_shipping":null,"total_tax":null,"exchange_rate":null,"billing_address":null,"shipping_address":null,"line_items":[]},"schema":{"$ref":"#/components/schemas/transaction"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"transaction not found"}}}},"/api/v1/users/{user_id}/custom_attributes":{"parameters":[{"name":"user_id","in":"path","description":"Enter user unidy id","example":"eb7a4199-de25-515a-991e-2e721b24728e","required":true,"schema":{"type":"string"}}],"get":{"summary":"list custom attributes","tags":["Custom Attributes"],"description":"List all custom attribute values for given user.","security":[{"client_credentials":["custom_attributes:read"]}],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"custom_attributes":[{"name":"custom_attribute_name","value":null,"type":"string","defined":false},{"name":"another_custom_attribute_name","value":null,"type":"string","defined":false}]},"schema":{"type":"object","properties":{"custom_attributes":{"type":"array","items":{"$ref":"#/components/schemas/custom_attribute"}}}}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}}},"patch":{"summary":"update custom attributes","tags":["Custom Attributes"],"description":"Update and/or delete custom attribute values for a given user. Both `custom_attributes` and `custom_attributes_delete` are optional; omit `custom_attributes` to perform a delete-only operation.","security":[{"client_credentials":["custom_attributes:write"]}],"parameters":[],"responses":{"200":{"description":"successful - delete only","content":{"application/json":{"example":{"custom_attributes":[{"name":"custom_attribute_name","value":null,"type":"string","defined":false},{"name":"another_custom_attribute_name","value":null,"type":"string","defined":false},{"name":"robin_meeblind","value":null,"type":"string","defined":false}]},"schema":{"type":"object","properties":{"custom_attributes":{"type":"array","items":{"$ref":"#/components/schemas/custom_attribute"}}}}}}},"400":{"description":"bad_request","content":{"application/json":{"example":{"errors":["invalid value type: custom_attribute_name needs to be a [\"string\", \"null\"] included in [\"internal_name\", \"example_value\"]"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/update_custom_attributes"}}}}}},"/api/v1/users/{user_id}/custom_attributes/{attribute_name}":{"parameters":[{"name":"user_id","in":"path","description":"Enter users unidy id","example":"eb7a4199-de25-515a-991e-2e721b24728e","required":true,"schema":{"type":"string"}},{"name":"attribute_name","in":"path","description":"Provide the internal name of the custom attribute","required":true,"schema":{"type":"string"}}],"get":{"summary":"show custom custom attribute value","security":[{"client_credentials":["custom_attributes:read"]}],"tags":["Custom Attributes"],"description":"Show a custom attributes values for given user.","responses":{"200":{"description":"successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/custom_attribute"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}},"patch":{"summary":"update custom attribute value","security":[{"client_credentials":["custom_attributes:write"]}],"tags":["Custom Attributes"],"description":"Update a custom attributes value for given user.","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"name":"custom_attribute_name","value":"example_value","type":"string","defined":true},"schema":{"$ref":"#/components/schemas/custom_attribute"}}}},"400":{"description":"bad_request","content":{"application/json":{"example":{"errors":["param is missing or the value is empty or invalid: value"]},"schema":{"$ref":"#/components/schemas/errors"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/new_custom_attribute"}}}}}},"/api/v1/users":{"post":{"summary":"create user","security":[{"client_credentials":["users:write"]}],"tags":["Users"],"description":"Creates a User","parameters":[{"name":"include_plugins_data","in":"query","required":false,"description":"Include plugins data in response","schema":{"type":"boolean"}}],"responses":{"201":{"description":"successful","content":{"application/json":{"example":{"brands":["unidy"],"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","first_name":null,"last_name":null,"email":"user@example.com","salutation":null,"gender":null,"phone_number":null,"date_of_birth":null,"company_name":null,"address_line_1":null,"address_line_2":null,"city":null,"postal_code":null,"country_code":null,"preferred_language":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","confirmed_at":null,"invitation_created_at":"2023-01-15T10:30:00.000Z","invitation_sent_at":null,"invitation_accepted_at":null},"schema":{"$ref":"#/components/schemas/user"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"422":{"description":"unprocessable entity","content":{"application/json":{"example":{"errors":["E-Mail ist nicht gültig","E-Mail ist nicht gültig"]},"schema":{"$ref":"#/components/schemas/errors"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/new_user"}}}}}},"/api/v1/users/by_email":{"parameters":[{"name":"email","in":"query","example":"user@example.com","description":"email address","schema":{"type":"string"}},{"name":"include_plugins_data","in":"query","required":false,"description":"Include plugins data in response","schema":{"type":"boolean"}}],"get":{"summary":"show user by email address","security":[{"client_credentials":["users:read_by_email"]}],"tags":["Users"],"description":"Show a user","responses":{"200":{"description":"successful","content":{"application/json":{"example":{"brands":["unidy"],"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","first_name":"Chi Shenlong","last_name":"Hestia","email":"chi.shenlong.hestia371@example.com","salutation":"mr","gender":"male","phone_number":"+494066969123","date_of_birth":"1987-11-23","company_name":"Macejkovic LLC","address_line_1":"131 Schuster Avenue","address_line_2":"Suite 659","city":"O'Konside","postal_code":"19376-8741","country_code":"DE","preferred_language":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","confirmed_at":"2023-01-15T10:30:00.000Z","invitation_created_at":null,"invitation_sent_at":null,"invitation_accepted_at":null},"schema":{"$ref":"#/components/schemas/user"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}}},"/api/v1/users/{id}":{"parameters":[{"name":"id","in":"path","description":"user id","required":true,"schema":{"type":"string"}},{"name":"include_plugins_data","in":"query","required":false,"description":"Include plugins data in response","schema":{"type":"boolean"}}],"get":{"summary":"show user","security":[{"client_credentials":["users:read"]}],"tags":["Users"],"description":"Show a user","responses":{"200":{"description":"successful with plugins data returned","content":{"application/json":{"example":{"brands":["unidy"],"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","first_name":"Goku","last_name":"Ares","email":"goku_ares375@example.com","salutation":"mx","gender":"other","phone_number":"+494066969123","date_of_birth":"1987-11-23","company_name":"Hickle and Sons","address_line_1":"7367 Davis Grove","address_line_2":"Suite 255","city":"Eliaburgh","postal_code":"23329-2236","country_code":"DE","preferred_language":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","confirmed_at":"2023-01-15T10:30:00.000Z","invitation_created_at":null,"invitation_sent_at":null,"invitation_accepted_at":null,"plugins_data":{"hubspot":{"contact_id":1}}},"schema":{"$ref":"#/components/schemas/user"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"}}},"put":{"summary":"update user","security":[{"client_credentials":["users:write"]}],"tags":["Users"],"description":"Update a user. Note that you can not update the email address using this endpoint. There is a separate endpoint for that.","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"brands":["unidy"],"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","first_name":"Hermann","last_name":"Hestia","email":"hestia378_android_19@example.com","salutation":"mx","gender":"other","phone_number":"+494066969123","date_of_birth":"1987-11-23","company_name":"Anderson LLC","address_line_1":"57042 Frami Summit","address_line_2":"Apt. 560","city":"Paucekside","postal_code":"95927","country_code":"DE","preferred_language":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","confirmed_at":"2023-01-15T10:30:00.000Z","invitation_created_at":null,"invitation_sent_at":null,"invitation_accepted_at":null},"schema":{"$ref":"#/components/schemas/update_user"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"},"422":{"description":"unprocessable entity","content":{"application/json":{"example":{"errors":["The property '#/salutation' value \"random_broken_value\" did not match one of the following values: mr, mrs, mx, null"]},"schema":{"$ref":"#/components/schemas/errors"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/update_user"}}}}},"patch":{"summary":"update user","security":[{"client_credentials":["users:write"]}],"tags":["Users"],"description":"Update a user. Note that you can not update the email address using this endpoint. There is a separate endpoint for that.","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":{"brands":["unidy"],"id":"b402f79e-30ce-4c94-b4c6-f7443ce26b4b","first_name":"Hermann","last_name":"Artemis","email":"artemis382_zamasu@example.com","salutation":"mr","gender":"male","phone_number":"+494066969123","date_of_birth":"1987-11-23","company_name":"Hahn-Weber","address_line_1":"84376 Schulist Road","address_line_2":"Apt. 471","city":"Sarahberg","postal_code":"20079-1212","country_code":"DE","preferred_language":null,"created_at":"2023-01-15T10:30:00.000Z","updated_at":"2023-01-15T10:30:00.000Z","confirmed_at":"2023-01-15T10:30:00.000Z","invitation_created_at":null,"invitation_sent_at":null,"invitation_accepted_at":null},"schema":{"$ref":"#/components/schemas/update_user"}}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"},"422":{"description":"unprocessable entity","content":{"application/json":{"example":{"errors":["The property '#/salutation' value \"random_broken_value\" did not match one of the following values: mr, mrs, mx, null"]},"schema":{"$ref":"#/components/schemas/errors"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/update_user"}}}}}},"/api/v1/users/{id}/change_email":{"parameters":[{"name":"id","in":"path","description":"user id","required":true,"schema":{"type":"string"}}],"post":{"summary":"request changing a user's email address","security":[{"client_credentials":["users:change_email"]}],"tags":["Users"],"description":"Request changing a user's email address. This is going to send a confirmation email to the new address. It gets activated once the user clicks the link in the email.","parameters":[],"responses":{"200":{"description":"successful","content":{"application/json":{"example":""}}},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"not found"},"422":{"description":"unprocessable entity","content":{"application/json":{"example":{"errors":["The property '#/' did not contain a required property of 'new_email'"]},"schema":{"$ref":"#/components/schemas/errors"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email_template_brand_id":{"type":["integer","null"],"example":1,"description":"If you have multiple brands available set the confirmation email template here. The user must have used that brand in the past. You do not need to set this if you only have one brand."},"new_email":{"type":"string","example":"newemail@example.com"},"skip_confirmation":{"type":"boolean","example":true,"description":"Do not send out a confirmation email to the new email address and confirm it immediately. Default value is false."},"return_to_after_confirmation":{"type":["string","null"],"example":"https://ch.example.com","description":"URL to redirect the user to after they confirm their new email address. Useful when the same brand serves multiple domains (e.g. country-specific shops)."}},"required":["new_email"]}}}}}}},"components":{"securitySchemes":{"client_credentials":{"type":"oauth2","flows":{"clientCredentials":{"scopes":{"admin:read":"Read all resources","admin:write":"Write all resources","custom_attributes:read":"Read a users custom attribute value","custom_attributes:write":"Write a users custom_attribute value","users:read":"Read user","users:read_by_email":"Read user by email","users:change_email":"Request changing a user's email address","users:write":"Create, update and users","newsletter_subscriptions:read":"Read newsletter subscriptions","newsletter_subscriptions:write":"Create a and delete newsletter subscriptions","subscriptions_batch:write":"Create a batch of subscriptions","subscriptions:read":"Read subscription","subscriptions:write":"Create, update and delete subscriptions","tickets_batch:write":"Create a batch of tickets","tickets:read":"Read tickets","tickets:write":"Create, update and delete ticket","transactions_batch:write":"Create a batch of transactions","transactions:read":"Read transactions","transactions:write":"Create, update and delete transactions"},"tokenUrl":"https://demo.unidy.de/oauth/token"}}},"user_token":{"type":"oauth2","flows":{"authorizationCode":{"scopes":{"openid":"OIDC standard scope","subscriptions:read":"Read subscription","subscriptions:write":"Create, update and delete subscriptions","subscriptions_batch:write":"Create a batch of subscriptions","tickets:read":"Read tickets","tickets:write":"Create, update and delete ticket","tickets_batch:write":"Create a batch of tickets","one_time_login_tokens:write":"Create one time login tokens for third party applications"},"authorizationUrl":"https://demo.unidy.de/oauth/authorize","tokenUrl":"https://demo.unidy.de/oauth/token"},"implicit":{"scopes":{"openid":"OIDC standard scope","subscriptions:read":"Read subscription","subscriptions:write":"Create, update and delete subscriptions","subscriptions_batch:write":"Create a batch of subscriptions","tickets:read":"Read tickets","tickets:write":"Create, update and delete ticket","tickets_batch:write":"Create a batch of tickets","one_time_login_tokens:write":"Create one time login tokens for third party applications"},"authorizationUrl":"https://demo.unidy.de/oauth/authorize"}}}},"schemas":{"errors":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}},"user":{"type":"object","properties":{"brands":{"type":"array","description":"the brand name/identifier in multibrand context","items":{"type":"string"},"example":["mybrand","otherbrand"]},"id":{"type":"string","example":"eb7a4199-de25-515a-991e-2e721b24728e"},"email":{"type":"string","format":"email","example":"herman@example.com"},"gender":{"type":["string","null"],"example":"other","enum":["male","female","other",null]},"confirmed_at":{"type":["string","null"],"format":"date-time","example":"2021-06-10T12:47:35.741Z"},"invited_at":{"type":["string","null"],"format":"date-time","example":"2021-06-10T12:47:35.741Z"},"created_at":{"type":"string","format":"date-time","example":"2021-06-10T12:47:35.741Z"},"updated_at":{"type":"string","format":"date-time","example":"2021-06-10T12:47:35.741Z"},"custom_attributes":{"type":["object","null"],"description":"Object containing key-value pairs where keys are the custom attribute names.The allowed value depends on the custom attribute type.","additionalProperties":true,"example":{"custom_attribute_name":"value","another_custom_attribute_name":12}},"plugins_data":{"type":"object","properties":{"hubspot":{"type":"object","properties":{"contact_id":{"type":["integer","null"],"example":123456}}},"eventim":{"type":"object","properties":{"tixx_id":{"type":["string","null"],"example":"2017916"}}},"plenigo":{"type":"object","properties":{"customer_id":{"type":["integer","null"],"example":987654}}}},"required":[]},"first_name":{"type":["string","null"],"example":"Herrman"},"last_name":{"type":["string","null"],"example":"Mueller"},"salutation":{"type":["string","null"],"example":"mr","enum":["mr","mrs","mx",null]},"phone_number":{"type":["string","null"],"example":"+49123456789"},"date_of_birth":{"type":["string","null"],"format":"date","example":"1991-06-10"},"company_name":{"type":["string","null"],"example":"Unidy"},"address_line_1":{"type":["string","null"],"example":"Jakob-Kaiser-Str 70a"},"address_line_2":{"type":["string","null"],"example":"5 OG"},"city":{"type":["string","null"],"example":"Hamburg"},"postal_code":{"type":["string","null"],"example":"AA0A 0AA"},"country_code":{"type":["string","null"],"example":"GB","description":"codes follow ISO 3166"},"preferred_language":{"type":["string","null"],"example":"de"}},"required":[]},"new_user":{"type":"object","properties":{"accept_invitation_return_url":{"type":["string","null"],"example":"https://unidy.de"},"send_invitation":{"type":"boolean","example":true,"description":"Send an email invitation to provided email to let a user claim an account"},"email":{"type":"string","format":"email","example":"herman@example.com"},"custom_attributes":{"type":["object","null"],"description":"Object containing key-value pairs where keys are the custom attribute names.The allowed value depends on the custom attribute type.","additionalProperties":true,"example":{"custom_attribute_name":"value","another_custom_attribute_name":12}},"brand":{"type":"string","example":"mybrand","description":"Change the user in a brand context, in a multi brand scenario. If this paremeter is not supplied brand will\n        be determined by host and if that is not possible it will fall back to default brand.\n        This determines for example, which branding is used for outgoing emails. !!"},"first_name":{"type":["string","null"],"example":"Herrman"},"last_name":{"type":["string","null"],"example":"Mueller"},"salutation":{"type":["string","null"],"example":"mr","enum":["mr","mrs","mx",null]},"phone_number":{"type":["string","null"],"example":"+49123456789"},"date_of_birth":{"type":["string","null"],"format":"date","example":"1991-06-10"},"company_name":{"type":["string","null"],"example":"Unidy"},"address_line_1":{"type":["string","null"],"example":"Jakob-Kaiser-Str 70a"},"address_line_2":{"type":["string","null"],"example":"5 OG"},"city":{"type":["string","null"],"example":"Hamburg"},"postal_code":{"type":["string","null"],"example":"AA0A 0AA"},"country_code":{"type":["string","null"],"example":"GB","description":"codes follow ISO 3166"},"preferred_language":{"type":["string","null"],"example":"de"}},"required":["email"]},"update_user":{"type":"object","properties":{"brand":{"type":"string","example":"mybrand","description":"Change the user in a brand context, in a multi brand scenario. If this paremeter is not supplied brand will\n        be determined by host and if that is not possible it will fall back to default brand.\n        This determines for example, which branding is used for outgoing emails. !!"},"first_name":{"type":["string","null"],"example":"Herrman"},"last_name":{"type":["string","null"],"example":"Mueller"},"salutation":{"type":["string","null"],"example":"mr","enum":["mr","mrs","mx",null]},"phone_number":{"type":["string","null"],"example":"+49123456789"},"date_of_birth":{"type":["string","null"],"format":"date","example":"1991-06-10"},"company_name":{"type":["string","null"],"example":"Unidy"},"address_line_1":{"type":["string","null"],"example":"Jakob-Kaiser-Str 70a"},"address_line_2":{"type":["string","null"],"example":"5 OG"},"city":{"type":["string","null"],"example":"Hamburg"},"postal_code":{"type":["string","null"],"example":"AA0A 0AA"},"country_code":{"type":["string","null"],"example":"GB","description":"codes follow ISO 3166"},"preferred_language":{"type":["string","null"],"example":"de"}},"required":[]},"custom_attribute":{"type":"object","properties":{"value":{"anyOf":[{"type":["number",null],"example":234},{"type":["string",null],"example":"fan"},{"type":["boolean",null],"example":true,"enum":[true,false]},{"type":["string",null],"format":"date-time","example":"2020-05-18T13:07:36.985Z"}]},"name":{"example":"member_since","type":"string"},"type":{"example":"string","type":"string","enum":["boolean","number","string"]},"format":{"example":"date-time","type":"string"},"defined":{"example":true,"type":"boolean","description":"Whether the custom attribute is set or not (since deleting the attribute still returns it as attributewith value \"null\", this field can be used to check if the attribute is set)"}},"required":["name","type","defined"]},"update_custom_attributes":{"type":"object","properties":{"custom_attributes":{"type":"object","additionalProperties":true,"description":"Object containing key-value pairs where keys are the custom attribute names.The allowed value depends on the custom attribute type.","example":{"custom_attribute_name":"value","another_custom_attribute_name":12}},"custom_attributes_delete":{"type":"array","description":"Array of custom attribute names to delete","items":{"type":"string"}}}},"new_custom_attribute":{"type":"object","properties":{"value":{"anyOf":[{"type":["number",null],"example":234},{"type":["string",null],"example":"fan"},{"type":["boolean",null],"example":true,"enum":[true,false]},{"type":["string",null],"format":"date-time","example":"2020-05-18T13:07:36.985Z"}]},"name":{"example":"member_since","type":"string"},"type":{"example":"string","type":"string","enum":["boolean","number","string"]},"format":{"example":"date-time","type":"string"},"defined":{"example":true,"type":"boolean","description":"Whether the custom attribute is set or not (since deleting the attribute still returns it as attributewith value \"null\", this field can be used to check if the attribute is set)"}},"required":["name","type","defined"]},"subscription":{"type":"object","properties":{"id":{"type":"string","example":"86668c4a-4073-5e81-b892-07393d11c60d"},"user_id":{"type":"string","example":"78eb9bab-c334-48fb-8d13-109f16d703fg","description":"Identifies the user that subscribed"},"created_at":{"type":"string","format":"date-time","example":"2021-03-31T08:12:52.119Z"},"updated_at":{"type":"string","format":"date-time","example":"2021-03-31T08:12:52.119Z"},"subscription_category_id":{"type":"string","example":"86668c4a-4073-5e81-b892-07393d11c60d","description":"Id to a subscription category, for example a membership"},"title":{"type":"string","example":"Vereinsmitgliedschaft","description":"Explains the subscription"},"text":{"type":"string","example":"Sei teil unseres Vereins","description":"Explains the subscription in more details"},"reference":{"type":"string","example":"123456aa","description":"A reference to to an entity in the service that the subscription is part of.\\\n                    Usually a customer reference or ticket number. Will be treated as uninterpreted metainformation."},"ends_at":{"type":["string","null"],"format":"date-time","example":"2021-03-31T08:12:52.119Z"},"starts_at":{"type":["string","null"],"format":"date-time","example":"2021-03-31T08:12:52.119Z"},"payment_frequency":{"type":["string","null"],"example":"monthly","enum":["daily","weekly","monthly","quarterly","six_monthly","yearly","onetime",null]},"payment_state":{"type":["string","null"],"example":"payed","enum":["payed","not_payed",null]},"state":{"type":"string","example":"active","enum":["active","passive","inactive"]},"next_payment_at":{"type":["string","null"],"format":"date-time","example":"2021-03-31T08:12:52.119Z"},"price":{"type":["number","null"],"example":10.99},"currency":{"type":["string","null"],"example":"EUR","description":"The currency of the subscription price, if not provided the currency of the category will be used"},"button_cta_url":{"type":["string","null"],"example":"https://example.com"},"metadata":{"type":["object","null"],"additionalProperties":true,"description":"You can provide any further data you like. This could be exported to a wallet later by using additional_attributes\n        in wallet export parameter. Metadata is mandatory if you are using additional_attributes in wallet_export.","example":{"full_name":{"label":"Name","value":"Max Mustermann"}}},"wallet_export":{"type":["object","null"],"description":"Configuration for Apple Wallet Pass and PDF export. Supports v1 (legacy) and v2 formats. Set version: 2 to use the v2 field mapping system.","example":{"version":2,"qr_code":"abcd1235","logo_text":"My Organisation","further_information":"Membership card","fields":{"header":["user.first_name"],"primary":"metadata.name","secondary":["ticketable.starts_at","ticketable.ends_at"],"auxiliary":[{"value":"ticketable.starts_at","format":"%d.%m.%Y","label":"Date"}]}},"properties":{"qr_code":{"type":"string","minLength":1,"example":"abcd1235"},"version":{"type":["integer","null"],"enum":[null,1,2],"example":2,"description":"Export format version. Use 2 for the v2 field mapping system. Omit or set to 1 for legacy format."},"logo_text":{"type":["string","null"],"example":"My Organisation","description":"(v2 only) Text displayed next to the logo on the Apple Wallet pass header and PDF."},"further_information":{"type":["string","null"],"example":"Membership card"},"fields":{"type":["object","null"],"description":"(v2 only) Dynamic field mapping for the pass. Each section maps to a zone on the pass. Field sources use the format \"prefix.field_name\" where prefix is one of: user (profile attribute), ticketable (ticket/subscription field), metadata (metadata key), user_custom_attribute (custom attribute name). A source can also be an object with value, optional format (strftime pattern), and optional label keys.","properties":{"header":{"type":["array","null"],"description":"Up to 3 small label/value fields shown in the pass header strip (next to logo text).","items":{"oneOf":[{"type":"string","example":"user.first_name"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Date"}},"required":["value"]}]}},"primary":{"description":"Single field shown prominently in the primary area of the pass.","oneOf":[{"type":"string","example":"metadata.name"},{"type":"object","properties":{"value":{"type":"string","example":"metadata.name"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Name"}},"required":["value"]}]},"secondary":{"type":["array","null"],"description":"Up to 2 fields shown below the primary field.","items":{"oneOf":[{"type":"string","example":"ticketable.starts_at"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Start"}},"required":["value"]}]}},"auxiliary":{"type":["array","null"],"description":"Additional fields shown in a grid below the secondary fields.","items":{"oneOf":[{"type":"string","example":"user.first_name"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Date"}},"required":["value"]}]}}}},"additional_attributes":{"type":["array","null"],"items":{"type":"string"},"example":["hair_color"],"uniqueItems":true,"description":"(v1 only) Additional attributes needs to be included as keys for objects in metadata"}},"required":["qr_code"]}}},"new_subscription":{"type":"object","properties":{"subscription_category_id":{"type":"string","example":"86668c4a-4073-5e81-b892-07393d11c60d","description":"Id to a subscription category, for example a membership"},"title":{"type":"string","example":"Vereinsmitgliedschaft","description":"Explains the subscription"},"text":{"type":"string","example":"Sei teil unseres Vereins","description":"Explains the subscription in more details"},"reference":{"type":"string","example":"123456aa","description":"A reference to to an entity in the service that the subscription is part of.\\\n                    Usually a customer reference or ticket number. Will be treated as uninterpreted metainformation."},"ends_at":{"type":["string","null"],"format":"date-time","example":"2021-03-31T08:12:52.119Z"},"starts_at":{"type":["string","null"],"format":"date-time","example":"2021-03-31T08:12:52.119Z"},"payment_frequency":{"type":["string","null"],"example":"monthly","enum":["daily","weekly","monthly","quarterly","six_monthly","yearly","onetime",null]},"payment_state":{"type":["string","null"],"example":"payed","enum":["payed","not_payed",null]},"state":{"type":"string","example":"active","enum":["active","passive","inactive"]},"next_payment_at":{"type":["string","null"],"format":"date-time","example":"2021-03-31T08:12:52.119Z"},"price":{"type":["number","null"],"example":10.99},"currency":{"type":["string","null"],"example":"EUR","description":"The currency of the subscription price, if not provided the currency of the category will be used"},"button_cta_url":{"type":["string","null"],"example":"https://example.com"},"metadata":{"type":["object","null"],"additionalProperties":true,"description":"You can provide any further data you like. This could be exported to a wallet later by using additional_attributes\n        in wallet export parameter. Metadata is mandatory if you are using additional_attributes in wallet_export.","example":{"full_name":{"label":"Name","value":"Max Mustermann"}}},"wallet_export":{"type":["object","null"],"description":"Configuration for Apple Wallet Pass and PDF export. Supports v1 (legacy) and v2 formats. Set version: 2 to use the v2 field mapping system.","example":{"version":2,"qr_code":"abcd1235","logo_text":"My Organisation","further_information":"Membership card","fields":{"header":["user.first_name"],"primary":"metadata.name","secondary":["ticketable.starts_at","ticketable.ends_at"],"auxiliary":[{"value":"ticketable.starts_at","format":"%d.%m.%Y","label":"Date"}]}},"properties":{"qr_code":{"type":"string","minLength":1,"example":"abcd1235"},"version":{"type":["integer","null"],"enum":[null,1,2],"example":2,"description":"Export format version. Use 2 for the v2 field mapping system. Omit or set to 1 for legacy format."},"logo_text":{"type":["string","null"],"example":"My Organisation","description":"(v2 only) Text displayed next to the logo on the Apple Wallet pass header and PDF."},"further_information":{"type":["string","null"],"example":"Membership card"},"fields":{"type":["object","null"],"description":"(v2 only) Dynamic field mapping for the pass. Each section maps to a zone on the pass. Field sources use the format \"prefix.field_name\" where prefix is one of: user (profile attribute), ticketable (ticket/subscription field), metadata (metadata key), user_custom_attribute (custom attribute name). A source can also be an object with value, optional format (strftime pattern), and optional label keys.","properties":{"header":{"type":["array","null"],"description":"Up to 3 small label/value fields shown in the pass header strip (next to logo text).","items":{"oneOf":[{"type":"string","example":"user.first_name"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Date"}},"required":["value"]}]}},"primary":{"description":"Single field shown prominently in the primary area of the pass.","oneOf":[{"type":"string","example":"metadata.name"},{"type":"object","properties":{"value":{"type":"string","example":"metadata.name"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Name"}},"required":["value"]}]},"secondary":{"type":["array","null"],"description":"Up to 2 fields shown below the primary field.","items":{"oneOf":[{"type":"string","example":"ticketable.starts_at"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Start"}},"required":["value"]}]}},"auxiliary":{"type":["array","null"],"description":"Additional fields shown in a grid below the secondary fields.","items":{"oneOf":[{"type":"string","example":"user.first_name"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Date"}},"required":["value"]}]}}}},"additional_attributes":{"type":["array","null"],"items":{"type":"string"},"example":["hair_color"],"uniqueItems":true,"description":"(v1 only) Additional attributes needs to be included as keys for objects in metadata"}},"required":["qr_code"]}},"required":["subscription_category_id","title","text","reference"]},"new_subscriptions":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","properties":{"subscription_category_id":{"type":"string","example":"86668c4a-4073-5e81-b892-07393d11c60d","description":"Id to a subscription category, for example a membership"},"title":{"type":"string","example":"Vereinsmitgliedschaft","description":"Explains the subscription"},"text":{"type":"string","example":"Sei teil unseres Vereins","description":"Explains the subscription in more details"},"reference":{"type":"string","example":"123456aa","description":"A reference to to an entity in the service that the subscription is part of.\\\n                    Usually a customer reference or ticket number. Will be treated as uninterpreted metainformation."},"ends_at":{"type":["string","null"],"format":"date-time","example":"2021-03-31T08:12:52.119Z"},"starts_at":{"type":["string","null"],"format":"date-time","example":"2021-03-31T08:12:52.119Z"},"payment_frequency":{"type":["string","null"],"example":"monthly","enum":["daily","weekly","monthly","quarterly","six_monthly","yearly","onetime",null]},"payment_state":{"type":["string","null"],"example":"payed","enum":["payed","not_payed",null]},"state":{"type":"string","example":"active","enum":["active","passive","inactive"]},"next_payment_at":{"type":["string","null"],"format":"date-time","example":"2021-03-31T08:12:52.119Z"},"price":{"type":["number","null"],"example":10.99},"currency":{"type":["string","null"],"example":"EUR","description":"The currency of the subscription price, if not provided the currency of the category will be used"},"button_cta_url":{"type":["string","null"],"example":"https://example.com"},"metadata":{"type":["object","null"],"additionalProperties":true,"description":"You can provide any further data you like. This could be exported to a wallet later by using additional_attributes\n        in wallet export parameter. Metadata is mandatory if you are using additional_attributes in wallet_export.","example":{"full_name":{"label":"Name","value":"Max Mustermann"}}},"wallet_export":{"type":["object","null"],"description":"Configuration for Apple Wallet Pass and PDF export. Supports v1 (legacy) and v2 formats. Set version: 2 to use the v2 field mapping system.","example":{"version":2,"qr_code":"abcd1235","logo_text":"My Organisation","further_information":"Membership card","fields":{"header":["user.first_name"],"primary":"metadata.name","secondary":["ticketable.starts_at","ticketable.ends_at"],"auxiliary":[{"value":"ticketable.starts_at","format":"%d.%m.%Y","label":"Date"}]}},"properties":{"qr_code":{"type":"string","minLength":1,"example":"abcd1235"},"version":{"type":["integer","null"],"enum":[null,1,2],"example":2,"description":"Export format version. Use 2 for the v2 field mapping system. Omit or set to 1 for legacy format."},"logo_text":{"type":["string","null"],"example":"My Organisation","description":"(v2 only) Text displayed next to the logo on the Apple Wallet pass header and PDF."},"further_information":{"type":["string","null"],"example":"Membership card"},"fields":{"type":["object","null"],"description":"(v2 only) Dynamic field mapping for the pass. Each section maps to a zone on the pass. Field sources use the format \"prefix.field_name\" where prefix is one of: user (profile attribute), ticketable (ticket/subscription field), metadata (metadata key), user_custom_attribute (custom attribute name). A source can also be an object with value, optional format (strftime pattern), and optional label keys.","properties":{"header":{"type":["array","null"],"description":"Up to 3 small label/value fields shown in the pass header strip (next to logo text).","items":{"oneOf":[{"type":"string","example":"user.first_name"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Date"}},"required":["value"]}]}},"primary":{"description":"Single field shown prominently in the primary area of the pass.","oneOf":[{"type":"string","example":"metadata.name"},{"type":"object","properties":{"value":{"type":"string","example":"metadata.name"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Name"}},"required":["value"]}]},"secondary":{"type":["array","null"],"description":"Up to 2 fields shown below the primary field.","items":{"oneOf":[{"type":"string","example":"ticketable.starts_at"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Start"}},"required":["value"]}]}},"auxiliary":{"type":["array","null"],"description":"Additional fields shown in a grid below the secondary fields.","items":{"oneOf":[{"type":"string","example":"user.first_name"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Date"}},"required":["value"]}]}}}},"additional_attributes":{"type":["array","null"],"items":{"type":"string"},"example":["hair_color"],"uniqueItems":true,"description":"(v1 only) Additional attributes needs to be included as keys for objects in metadata"}},"required":["qr_code"]},"user_id":{"type":"string","example":"13a10e14-330d-4169-8b17-5b0263aedae9"}},"required":["subscription_category_id","title","text","reference","user_id"]}},"update_subscription":{"type":"object","properties":{"subscription_category_id":{"type":"string","example":"86668c4a-4073-5e81-b892-07393d11c60d","description":"Id to a subscription category, for example a membership"},"title":{"type":"string","example":"Vereinsmitgliedschaft","description":"Explains the subscription"},"text":{"type":"string","example":"Sei teil unseres Vereins","description":"Explains the subscription in more details"},"reference":{"type":"string","example":"123456aa","description":"A reference to to an entity in the service that the subscription is part of.\\\n                    Usually a customer reference or ticket number. Will be treated as uninterpreted metainformation."},"ends_at":{"type":["string","null"],"format":"date-time","example":"2021-03-31T08:12:52.119Z"},"starts_at":{"type":["string","null"],"format":"date-time","example":"2021-03-31T08:12:52.119Z"},"payment_frequency":{"type":["string","null"],"example":"monthly","enum":["daily","weekly","monthly","quarterly","six_monthly","yearly","onetime",null]},"payment_state":{"type":["string","null"],"example":"payed","enum":["payed","not_payed",null]},"state":{"type":"string","example":"active","enum":["active","passive","inactive"]},"next_payment_at":{"type":["string","null"],"format":"date-time","example":"2021-03-31T08:12:52.119Z"},"price":{"type":["number","null"],"example":10.99},"currency":{"type":["string","null"],"example":"EUR","description":"The currency of the subscription price, if not provided the currency of the category will be used"},"button_cta_url":{"type":["string","null"],"example":"https://example.com"},"metadata":{"type":["object","null"],"additionalProperties":true,"description":"You can provide any further data you like. This could be exported to a wallet later by using additional_attributes\n        in wallet export parameter. Metadata is mandatory if you are using additional_attributes in wallet_export.","example":{"full_name":{"label":"Name","value":"Max Mustermann"}}},"wallet_export":{"type":["object","null"],"description":"Configuration for Apple Wallet Pass and PDF export. Supports v1 (legacy) and v2 formats. Set version: 2 to use the v2 field mapping system.","example":{"version":2,"qr_code":"abcd1235","logo_text":"My Organisation","further_information":"Membership card","fields":{"header":["user.first_name"],"primary":"metadata.name","secondary":["ticketable.starts_at","ticketable.ends_at"],"auxiliary":[{"value":"ticketable.starts_at","format":"%d.%m.%Y","label":"Date"}]}},"properties":{"qr_code":{"type":"string","minLength":1,"example":"abcd1235"},"version":{"type":["integer","null"],"enum":[null,1,2],"example":2,"description":"Export format version. Use 2 for the v2 field mapping system. Omit or set to 1 for legacy format."},"logo_text":{"type":["string","null"],"example":"My Organisation","description":"(v2 only) Text displayed next to the logo on the Apple Wallet pass header and PDF."},"further_information":{"type":["string","null"],"example":"Membership card"},"fields":{"type":["object","null"],"description":"(v2 only) Dynamic field mapping for the pass. Each section maps to a zone on the pass. Field sources use the format \"prefix.field_name\" where prefix is one of: user (profile attribute), ticketable (ticket/subscription field), metadata (metadata key), user_custom_attribute (custom attribute name). A source can also be an object with value, optional format (strftime pattern), and optional label keys.","properties":{"header":{"type":["array","null"],"description":"Up to 3 small label/value fields shown in the pass header strip (next to logo text).","items":{"oneOf":[{"type":"string","example":"user.first_name"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Date"}},"required":["value"]}]}},"primary":{"description":"Single field shown prominently in the primary area of the pass.","oneOf":[{"type":"string","example":"metadata.name"},{"type":"object","properties":{"value":{"type":"string","example":"metadata.name"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Name"}},"required":["value"]}]},"secondary":{"type":["array","null"],"description":"Up to 2 fields shown below the primary field.","items":{"oneOf":[{"type":"string","example":"ticketable.starts_at"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Start"}},"required":["value"]}]}},"auxiliary":{"type":["array","null"],"description":"Additional fields shown in a grid below the secondary fields.","items":{"oneOf":[{"type":"string","example":"user.first_name"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Date"}},"required":["value"]}]}}}},"additional_attributes":{"type":["array","null"],"items":{"type":"string"},"example":["hair_color"],"uniqueItems":true,"description":"(v1 only) Additional attributes needs to be included as keys for objects in metadata"}},"required":["qr_code"]}},"required":[]},"ticket":{"type":"object","properties":{"id":{"type":"string","example":"86668c4a-4073-5e81-b892-07393d11c60d"},"user_id":{"type":"string","example":"78eb9bab-c334-48fb-8d13-109f16d703fg","description":"Identifies the user that subscribed"},"created_at":{"type":"string","format":"date-time","example":"2021-03-31T08:12:52.119Z"},"updated_at":{"type":"string","format":"date-time","example":"2021-03-31T08:12:52.119Z"},"ticket_category_id":{"type":"string","example":"86668c4a-4073-5e81-b892-07393d11c60d","description":"Id to a ticket category, for example a membership"},"title":{"type":"string","example":"Vereinsmitgliedschaft","description":"Explains the ticket"},"text":{"type":"string","example":"Sei teil unseres Vereins","description":"Explains the ticket in more details"},"reference":{"type":"string","example":"123456aa","description":"A reference to to an entity in the service that the ticket is part of.\\\n                    Usually a customer reference or ticket number. Will be treated as uninterpreted metainformation."},"payment_state":{"type":["string","null"],"example":"payed","enum":["payed","not_payed",null]},"state":{"type":"string","example":"active","enum":["active","passive","inactive"]},"price":{"type":["number","null"],"example":10.99},"currency":{"type":["string","null"],"example":"EUR","description":"The currency of the ticket price, if not provided the currency of the category will be used"},"button_cta_url":{"type":["string","null"],"example":"https://example.com"},"info_banner":{"type":["string","null"],"example":"Info"},"seating":{"type":["string","null"],"example":"A1"},"venue":{"type":["string","null"],"example":"Stadion"},"metadata":{"type":["object","null"],"description":"You can provide any further data you like. This could be exported to a wallet later by using additional_attributes\n        in wallet export parameter. Metadata is mandatory if you are using additional_attributes in wallet_export.","example":{"full_name":{"label":"Name","value":"Max Mustermann"}},"additionalProperties":true},"wallet_export":{"type":["object","null"],"description":"Configuration for Apple Wallet Pass and PDF export. Supports v1 (legacy) and v2 formats. Set version: 2 to use the v2 field mapping system.","example":{"version":2,"qr_code":"abcd1235","logo_text":"My Organisation","further_information":"Ticket for entrance","fields":{"header":["user.first_name"],"primary":"metadata.name","secondary":["ticketable.starts_at","ticketable.ends_at"],"auxiliary":[{"value":"ticketable.starts_at","format":"%d.%m.%Y","label":"Date"}]}},"properties":{"qr_code":{"type":"string","minLength":1,"example":"abcd1235"},"version":{"type":["integer","null"],"enum":[null,1,2],"example":2,"description":"Export format version. Use 2 for the v2 field mapping system. Omit or set to 1 for legacy format."},"logo_text":{"type":["string","null"],"example":"My Organisation","description":"(v2 only) Text displayed next to the logo on the Apple Wallet pass header and PDF."},"further_information":{"type":["string","null"],"example":"Ticket for entrance"},"fields":{"type":["object","null"],"description":"(v2 only) Dynamic field mapping for the pass. Each section maps to a zone on the pass. Field sources use the format \"prefix.field_name\" where prefix is one of: user (profile attribute), ticketable (ticket/subscription field), metadata (metadata key), user_custom_attribute (custom attribute name). A source can also be an object with value, optional format (strftime pattern), and optional label keys.","properties":{"header":{"type":["array","null"],"description":"Up to 3 small label/value fields shown in the pass header strip (next to logo text).","items":{"oneOf":[{"type":"string","example":"user.first_name"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Date"}},"required":["value"]}]}},"primary":{"description":"Single field shown prominently in the primary area of the pass.","oneOf":[{"type":"string","example":"metadata.name"},{"type":"object","properties":{"value":{"type":"string","example":"metadata.name"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Name"}},"required":["value"]}]},"secondary":{"type":["array","null"],"description":"Up to 2 fields shown below the primary field.","items":{"oneOf":[{"type":"string","example":"ticketable.starts_at"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Start"}},"required":["value"]}]}},"auxiliary":{"type":["array","null"],"description":"Additional fields shown in a grid below the secondary fields.","items":{"oneOf":[{"type":"string","example":"user.first_name"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Date"}},"required":["value"]}]}}}},"additional_attributes":{"type":["array","null"],"items":{"type":"string"},"example":["hair_color"],"uniqueItems":true,"description":"(v1 only) Additional attributes needs to be included as keys for objects in metadata"}},"required":["qr_code"]},"starts_at":{"type":"string","format":"date-time","example":"2021-03-31T08:12:52.119Z"},"ends_at":{"type":["string","null"],"format":"date-time","example":"2021-03-31T08:12:52.119Z"}}},"new_ticket":{"type":"object","properties":{"ticket_category_id":{"type":"string","example":"86668c4a-4073-5e81-b892-07393d11c60d","description":"Id to a ticket category, for example a membership"},"title":{"type":"string","example":"Vereinsmitgliedschaft","description":"Explains the ticket"},"text":{"type":"string","example":"Sei teil unseres Vereins","description":"Explains the ticket in more details"},"reference":{"type":"string","example":"123456aa","description":"A reference to to an entity in the service that the ticket is part of.\\\n                    Usually a customer reference or ticket number. Will be treated as uninterpreted metainformation."},"payment_state":{"type":["string","null"],"example":"payed","enum":["payed","not_payed",null]},"state":{"type":"string","example":"active","enum":["active","passive","inactive"]},"price":{"type":["number","null"],"example":10.99},"currency":{"type":["string","null"],"example":"EUR","description":"The currency of the ticket price, if not provided the currency of the category will be used"},"button_cta_url":{"type":["string","null"],"example":"https://example.com"},"info_banner":{"type":["string","null"],"example":"Info"},"seating":{"type":["string","null"],"example":"A1"},"venue":{"type":["string","null"],"example":"Stadion"},"metadata":{"type":["object","null"],"description":"You can provide any further data you like. This could be exported to a wallet later by using additional_attributes\n        in wallet export parameter. Metadata is mandatory if you are using additional_attributes in wallet_export.","example":{"full_name":{"label":"Name","value":"Max Mustermann"}},"additionalProperties":true},"wallet_export":{"type":["object","null"],"description":"Configuration for Apple Wallet Pass and PDF export. Supports v1 (legacy) and v2 formats. Set version: 2 to use the v2 field mapping system.","example":{"version":2,"qr_code":"abcd1235","logo_text":"My Organisation","further_information":"Ticket for entrance","fields":{"header":["user.first_name"],"primary":"metadata.name","secondary":["ticketable.starts_at","ticketable.ends_at"],"auxiliary":[{"value":"ticketable.starts_at","format":"%d.%m.%Y","label":"Date"}]}},"properties":{"qr_code":{"type":"string","minLength":1,"example":"abcd1235"},"version":{"type":["integer","null"],"enum":[null,1,2],"example":2,"description":"Export format version. Use 2 for the v2 field mapping system. Omit or set to 1 for legacy format."},"logo_text":{"type":["string","null"],"example":"My Organisation","description":"(v2 only) Text displayed next to the logo on the Apple Wallet pass header and PDF."},"further_information":{"type":["string","null"],"example":"Ticket for entrance"},"fields":{"type":["object","null"],"description":"(v2 only) Dynamic field mapping for the pass. Each section maps to a zone on the pass. Field sources use the format \"prefix.field_name\" where prefix is one of: user (profile attribute), ticketable (ticket/subscription field), metadata (metadata key), user_custom_attribute (custom attribute name). A source can also be an object with value, optional format (strftime pattern), and optional label keys.","properties":{"header":{"type":["array","null"],"description":"Up to 3 small label/value fields shown in the pass header strip (next to logo text).","items":{"oneOf":[{"type":"string","example":"user.first_name"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Date"}},"required":["value"]}]}},"primary":{"description":"Single field shown prominently in the primary area of the pass.","oneOf":[{"type":"string","example":"metadata.name"},{"type":"object","properties":{"value":{"type":"string","example":"metadata.name"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Name"}},"required":["value"]}]},"secondary":{"type":["array","null"],"description":"Up to 2 fields shown below the primary field.","items":{"oneOf":[{"type":"string","example":"ticketable.starts_at"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Start"}},"required":["value"]}]}},"auxiliary":{"type":["array","null"],"description":"Additional fields shown in a grid below the secondary fields.","items":{"oneOf":[{"type":"string","example":"user.first_name"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Date"}},"required":["value"]}]}}}},"additional_attributes":{"type":["array","null"],"items":{"type":"string"},"example":["hair_color"],"uniqueItems":true,"description":"(v1 only) Additional attributes needs to be included as keys for objects in metadata"}},"required":["qr_code"]},"starts_at":{"type":"string","format":"date-time","example":"2021-03-31T08:12:52.119Z"},"ends_at":{"type":["string","null"],"format":"date-time","example":"2021-03-31T08:12:52.119Z"}},"required":["ticket_category_id","title","text","reference","starts_at"]},"new_tickets":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","properties":{"ticket_category_id":{"type":"string","example":"86668c4a-4073-5e81-b892-07393d11c60d","description":"Id to a ticket category, for example a membership"},"title":{"type":"string","example":"Vereinsmitgliedschaft","description":"Explains the ticket"},"text":{"type":"string","example":"Sei teil unseres Vereins","description":"Explains the ticket in more details"},"reference":{"type":"string","example":"123456aa","description":"A reference to to an entity in the service that the ticket is part of.\\\n                    Usually a customer reference or ticket number. Will be treated as uninterpreted metainformation."},"payment_state":{"type":["string","null"],"example":"payed","enum":["payed","not_payed",null]},"state":{"type":"string","example":"active","enum":["active","passive","inactive"]},"price":{"type":["number","null"],"example":10.99},"currency":{"type":["string","null"],"example":"EUR","description":"The currency of the ticket price, if not provided the currency of the category will be used"},"button_cta_url":{"type":["string","null"],"example":"https://example.com"},"info_banner":{"type":["string","null"],"example":"Info"},"seating":{"type":["string","null"],"example":"A1"},"venue":{"type":["string","null"],"example":"Stadion"},"metadata":{"type":["object","null"],"description":"You can provide any further data you like. This could be exported to a wallet later by using additional_attributes\n        in wallet export parameter. Metadata is mandatory if you are using additional_attributes in wallet_export.","example":{"full_name":{"label":"Name","value":"Max Mustermann"}},"additionalProperties":true},"wallet_export":{"type":["object","null"],"description":"Configuration for Apple Wallet Pass and PDF export. Supports v1 (legacy) and v2 formats. Set version: 2 to use the v2 field mapping system.","example":{"version":2,"qr_code":"abcd1235","logo_text":"My Organisation","further_information":"Ticket for entrance","fields":{"header":["user.first_name"],"primary":"metadata.name","secondary":["ticketable.starts_at","ticketable.ends_at"],"auxiliary":[{"value":"ticketable.starts_at","format":"%d.%m.%Y","label":"Date"}]}},"properties":{"qr_code":{"type":"string","minLength":1,"example":"abcd1235"},"version":{"type":["integer","null"],"enum":[null,1,2],"example":2,"description":"Export format version. Use 2 for the v2 field mapping system. Omit or set to 1 for legacy format."},"logo_text":{"type":["string","null"],"example":"My Organisation","description":"(v2 only) Text displayed next to the logo on the Apple Wallet pass header and PDF."},"further_information":{"type":["string","null"],"example":"Ticket for entrance"},"fields":{"type":["object","null"],"description":"(v2 only) Dynamic field mapping for the pass. Each section maps to a zone on the pass. Field sources use the format \"prefix.field_name\" where prefix is one of: user (profile attribute), ticketable (ticket/subscription field), metadata (metadata key), user_custom_attribute (custom attribute name). A source can also be an object with value, optional format (strftime pattern), and optional label keys.","properties":{"header":{"type":["array","null"],"description":"Up to 3 small label/value fields shown in the pass header strip (next to logo text).","items":{"oneOf":[{"type":"string","example":"user.first_name"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Date"}},"required":["value"]}]}},"primary":{"description":"Single field shown prominently in the primary area of the pass.","oneOf":[{"type":"string","example":"metadata.name"},{"type":"object","properties":{"value":{"type":"string","example":"metadata.name"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Name"}},"required":["value"]}]},"secondary":{"type":["array","null"],"description":"Up to 2 fields shown below the primary field.","items":{"oneOf":[{"type":"string","example":"ticketable.starts_at"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Start"}},"required":["value"]}]}},"auxiliary":{"type":["array","null"],"description":"Additional fields shown in a grid below the secondary fields.","items":{"oneOf":[{"type":"string","example":"user.first_name"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Date"}},"required":["value"]}]}}}},"additional_attributes":{"type":["array","null"],"items":{"type":"string"},"example":["hair_color"],"uniqueItems":true,"description":"(v1 only) Additional attributes needs to be included as keys for objects in metadata"}},"required":["qr_code"]},"starts_at":{"type":"string","format":"date-time","example":"2021-03-31T08:12:52.119Z"},"ends_at":{"type":["string","null"],"format":"date-time","example":"2021-03-31T08:12:52.119Z"},"user_id":{"type":"string","example":"13a10e14-330d-4169-8b17-5b0263aedae9"}},"required":["ticket_category_id","title","text","reference","starts_at","user_id"]}},"update_ticket":{"type":"object","properties":{"ticket_category_id":{"type":"string","example":"86668c4a-4073-5e81-b892-07393d11c60d","description":"Id to a ticket category, for example a membership"},"title":{"type":"string","example":"Vereinsmitgliedschaft","description":"Explains the ticket"},"text":{"type":"string","example":"Sei teil unseres Vereins","description":"Explains the ticket in more details"},"reference":{"type":"string","example":"123456aa","description":"A reference to to an entity in the service that the ticket is part of.\\\n                    Usually a customer reference or ticket number. Will be treated as uninterpreted metainformation."},"payment_state":{"type":["string","null"],"example":"payed","enum":["payed","not_payed",null]},"state":{"type":"string","example":"active","enum":["active","passive","inactive"]},"price":{"type":["number","null"],"example":10.99},"currency":{"type":["string","null"],"example":"EUR","description":"The currency of the ticket price, if not provided the currency of the category will be used"},"button_cta_url":{"type":["string","null"],"example":"https://example.com"},"info_banner":{"type":["string","null"],"example":"Info"},"seating":{"type":["string","null"],"example":"A1"},"venue":{"type":["string","null"],"example":"Stadion"},"metadata":{"type":["object","null"],"description":"You can provide any further data you like. This could be exported to a wallet later by using additional_attributes\n        in wallet export parameter. Metadata is mandatory if you are using additional_attributes in wallet_export.","example":{"full_name":{"label":"Name","value":"Max Mustermann"}},"additionalProperties":true},"wallet_export":{"type":["object","null"],"description":"Configuration for Apple Wallet Pass and PDF export. Supports v1 (legacy) and v2 formats. Set version: 2 to use the v2 field mapping system.","example":{"version":2,"qr_code":"abcd1235","logo_text":"My Organisation","further_information":"Ticket for entrance","fields":{"header":["user.first_name"],"primary":"metadata.name","secondary":["ticketable.starts_at","ticketable.ends_at"],"auxiliary":[{"value":"ticketable.starts_at","format":"%d.%m.%Y","label":"Date"}]}},"properties":{"qr_code":{"type":"string","minLength":1,"example":"abcd1235"},"version":{"type":["integer","null"],"enum":[null,1,2],"example":2,"description":"Export format version. Use 2 for the v2 field mapping system. Omit or set to 1 for legacy format."},"logo_text":{"type":["string","null"],"example":"My Organisation","description":"(v2 only) Text displayed next to the logo on the Apple Wallet pass header and PDF."},"further_information":{"type":["string","null"],"example":"Ticket for entrance"},"fields":{"type":["object","null"],"description":"(v2 only) Dynamic field mapping for the pass. Each section maps to a zone on the pass. Field sources use the format \"prefix.field_name\" where prefix is one of: user (profile attribute), ticketable (ticket/subscription field), metadata (metadata key), user_custom_attribute (custom attribute name). A source can also be an object with value, optional format (strftime pattern), and optional label keys.","properties":{"header":{"type":["array","null"],"description":"Up to 3 small label/value fields shown in the pass header strip (next to logo text).","items":{"oneOf":[{"type":"string","example":"user.first_name"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Date"}},"required":["value"]}]}},"primary":{"description":"Single field shown prominently in the primary area of the pass.","oneOf":[{"type":"string","example":"metadata.name"},{"type":"object","properties":{"value":{"type":"string","example":"metadata.name"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Name"}},"required":["value"]}]},"secondary":{"type":["array","null"],"description":"Up to 2 fields shown below the primary field.","items":{"oneOf":[{"type":"string","example":"ticketable.starts_at"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Start"}},"required":["value"]}]}},"auxiliary":{"type":["array","null"],"description":"Additional fields shown in a grid below the secondary fields.","items":{"oneOf":[{"type":"string","example":"user.first_name"},{"type":"object","properties":{"value":{"type":"string","example":"ticketable.starts_at"},"format":{"type":"string","example":"%d.%m.%Y"},"label":{"type":"string","example":"Date"}},"required":["value"]}]}}}},"additional_attributes":{"type":["array","null"],"items":{"type":"string"},"example":["hair_color"],"uniqueItems":true,"description":"(v1 only) Additional attributes needs to be included as keys for objects in metadata"}},"required":["qr_code"]},"starts_at":{"type":"string","format":"date-time","example":"2021-03-31T08:12:52.119Z"},"ends_at":{"type":["string","null"],"format":"date-time","example":"2021-03-31T08:12:52.119Z"}},"required":[]},"transaction":{"type":"object","properties":{"id":{"type":"string","example":"86668c4a-4073-5e81-b892-07393d11c60d"},"user_id":{"type":"string","example":"78eb9bab-c334-48fb-8d13-109f16d703fg","description":"Identifies the user that owns this transaction"},"created_at":{"type":"string","format":"date-time","example":"2024-01-15T10:30:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2024-01-15T10:30:00.000Z"},"line_items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Concert Ticket"},"quantity":{"type":"integer","example":2},"external_product_id":{"type":"string","example":"PROD-123"},"unit_price":{"type":"number","example":24.99},"total_price":{"type":"number","example":49.98},"sku":{"type":["string","null"],"example":"SKU-001"},"variant":{"type":["string","null"],"example":"Red / Large"},"category":{"type":["string","null"],"example":"clothing"},"item_type":{"type":["string","null"],"example":"physical"},"position":{"type":["integer","null"],"example":1},"seller_id":{"type":["string","null"],"example":"SELLER-001"},"staff_note":{"type":["string","null"],"example":"Signed copy reserved"},"total_discount":{"type":["number","null"],"example":5.0},"total_tax":{"type":["number","null"],"example":7.98},"tax_rate":{"type":["number","null"],"example":0.19},"metadata":{"type":["object","null"],"additionalProperties":true,"example":null},"id":{"type":"integer","example":1}}}},"transaction_category_id":{"type":"integer","example":42,"description":"ID of the transaction category"},"external_id":{"type":"string","example":"ORDER-123","description":"Unique identifier from the source platform, unique per source_platform"},"reference":{"type":"string","example":"REF-456","description":"A reference visible to the user, e.g. order number"},"source_platform":{"type":"string","example":"shopify","description":"The platform this transaction originates from"},"state":{"type":"string","example":"open","enum":["open","partially_paid","paid","partially_refunded","refunded","cancelled"]},"placed_at":{"type":"string","format":"date-time","example":"2024-01-15T10:30:00.000Z"},"order_type":{"type":["string","null"],"example":"online"},"financial_status":{"type":["string","null"],"example":"paid"},"fulfillment_status":{"type":["string","null"],"example":"fulfilled"},"currency":{"type":["string","null"],"example":"EUR"},"total":{"type":["number","null"],"example":49.99},"subtotal":{"type":["number","null"],"example":42.01},"total_discount":{"type":["number","null"],"example":5.0},"total_paid":{"type":["number","null"],"example":49.99},"total_refunded":{"type":["number","null"],"example":0.0},"total_shipping":{"type":["number","null"],"example":4.99},"total_tax":{"type":["number","null"],"example":7.98},"exchange_rate":{"type":["number","null"],"example":1.08},"payment_method":{"type":["string","null"],"example":"credit_card"},"payment_provider_ref":{"type":["string","null"],"example":"ch_1234"},"coupon_code":{"type":["string","null"],"example":"SUMMER10"},"invoice_number":{"type":["string","null"],"example":"INV-2024-001"},"prices_include_tax":{"type":["boolean","null"],"example":false},"tax_exempt":{"type":["boolean","null"],"example":false},"cancel_reason":{"type":["string","null"],"example":"Customer requested cancellation"},"cancelled_at":{"type":["string","null"],"format":"date-time","example":"2024-01-16T10:30:00.000Z"},"completed_at":{"type":["string","null"],"format":"date-time","example":"2024-01-15T12:00:00.000Z"},"customer_note":{"type":["string","null"],"example":"Please leave at front door"},"staff_note":{"type":["string","null"],"example":"VIP customer"},"source_channel_id":{"type":["string","null"],"example":"web"},"tags":{"type":["array","null"],"items":{"type":"string"},"example":["vip","loyalty"]},"billing_address":{"type":["object","null"],"properties":{"salutation":{"type":["string","null"],"example":"mr"},"first_name":{"type":["string","null"],"example":"Max"},"last_name":{"type":["string","null"],"example":"Mustermann"},"company_name":{"type":["string","null"],"example":"Acme GmbH"},"address_line_1":{"type":["string","null"],"example":"Alexanderplatz 1"},"address_line_2":{"type":["string","null"],"example":"c/o Acme"},"city":{"type":["string","null"],"example":"Berlin"},"postal_code":{"type":["string","null"],"example":"10178"},"country_code":{"type":["string","null"],"example":"DE"},"phone_number":{"type":["string","null"],"example":"+49 30 1234567"}},"additionalProperties":false},"shipping_address":{"type":["object","null"],"properties":{"salutation":{"type":["string","null"],"example":"mr"},"first_name":{"type":["string","null"],"example":"Max"},"last_name":{"type":["string","null"],"example":"Mustermann"},"company_name":{"type":["string","null"],"example":"Acme GmbH"},"address_line_1":{"type":["string","null"],"example":"Alexanderplatz 1"},"address_line_2":{"type":["string","null"],"example":"c/o Acme"},"city":{"type":["string","null"],"example":"Berlin"},"postal_code":{"type":["string","null"],"example":"10178"},"country_code":{"type":["string","null"],"example":"DE"},"phone_number":{"type":["string","null"],"example":"+49 30 1234567"}},"additionalProperties":false},"platform_metadata":{"type":["object","null"],"additionalProperties":true,"example":{"shopify_id":"12345"}}}},"new_transaction":{"type":"object","properties":{"transaction_category_id":{"type":"integer","example":42,"description":"ID of the transaction category"},"external_id":{"type":"string","example":"ORDER-123","description":"Unique identifier from the source platform, unique per source_platform"},"reference":{"type":"string","example":"REF-456","description":"A reference visible to the user, e.g. order number"},"source_platform":{"type":"string","example":"shopify","description":"The platform this transaction originates from"},"state":{"type":"string","example":"open","enum":["open","partially_paid","paid","partially_refunded","refunded","cancelled"]},"placed_at":{"type":"string","format":"date-time","example":"2024-01-15T10:30:00.000Z"},"order_type":{"type":["string","null"],"example":"online"},"financial_status":{"type":["string","null"],"example":"paid"},"fulfillment_status":{"type":["string","null"],"example":"fulfilled"},"currency":{"type":["string","null"],"example":"EUR"},"total":{"type":["number","null"],"example":49.99},"subtotal":{"type":["number","null"],"example":42.01},"total_discount":{"type":["number","null"],"example":5.0},"total_paid":{"type":["number","null"],"example":49.99},"total_refunded":{"type":["number","null"],"example":0.0},"total_shipping":{"type":["number","null"],"example":4.99},"total_tax":{"type":["number","null"],"example":7.98},"exchange_rate":{"type":["number","null"],"example":1.08},"payment_method":{"type":["string","null"],"example":"credit_card"},"payment_provider_ref":{"type":["string","null"],"example":"ch_1234"},"coupon_code":{"type":["string","null"],"example":"SUMMER10"},"invoice_number":{"type":["string","null"],"example":"INV-2024-001"},"prices_include_tax":{"type":["boolean","null"],"example":false},"tax_exempt":{"type":["boolean","null"],"example":false},"cancel_reason":{"type":["string","null"],"example":"Customer requested cancellation"},"cancelled_at":{"type":["string","null"],"format":"date-time","example":"2024-01-16T10:30:00.000Z"},"completed_at":{"type":["string","null"],"format":"date-time","example":"2024-01-15T12:00:00.000Z"},"customer_note":{"type":["string","null"],"example":"Please leave at front door"},"staff_note":{"type":["string","null"],"example":"VIP customer"},"source_channel_id":{"type":["string","null"],"example":"web"},"tags":{"type":["array","null"],"items":{"type":"string"},"example":["vip","loyalty"]},"billing_address":{"type":["object","null"],"properties":{"salutation":{"type":["string","null"],"example":"mr"},"first_name":{"type":["string","null"],"example":"Max"},"last_name":{"type":["string","null"],"example":"Mustermann"},"company_name":{"type":["string","null"],"example":"Acme GmbH"},"address_line_1":{"type":["string","null"],"example":"Alexanderplatz 1"},"address_line_2":{"type":["string","null"],"example":"c/o Acme"},"city":{"type":["string","null"],"example":"Berlin"},"postal_code":{"type":["string","null"],"example":"10178"},"country_code":{"type":["string","null"],"example":"DE"},"phone_number":{"type":["string","null"],"example":"+49 30 1234567"}},"additionalProperties":false},"shipping_address":{"type":["object","null"],"properties":{"salutation":{"type":["string","null"],"example":"mr"},"first_name":{"type":["string","null"],"example":"Max"},"last_name":{"type":["string","null"],"example":"Mustermann"},"company_name":{"type":["string","null"],"example":"Acme GmbH"},"address_line_1":{"type":["string","null"],"example":"Alexanderplatz 1"},"address_line_2":{"type":["string","null"],"example":"c/o Acme"},"city":{"type":["string","null"],"example":"Berlin"},"postal_code":{"type":["string","null"],"example":"10178"},"country_code":{"type":["string","null"],"example":"DE"},"phone_number":{"type":["string","null"],"example":"+49 30 1234567"}},"additionalProperties":false},"platform_metadata":{"type":["object","null"],"additionalProperties":true,"example":{"shopify_id":"12345"}}},"required":["transaction_category_id","external_id","reference","source_platform","placed_at","state"]},"new_transactions":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","properties":{"transaction_category_id":{"type":"integer","example":42,"description":"ID of the transaction category"},"external_id":{"type":"string","example":"ORDER-123","description":"Unique identifier from the source platform, unique per source_platform"},"reference":{"type":"string","example":"REF-456","description":"A reference visible to the user, e.g. order number"},"source_platform":{"type":"string","example":"shopify","description":"The platform this transaction originates from"},"state":{"type":"string","example":"open","enum":["open","partially_paid","paid","partially_refunded","refunded","cancelled"]},"placed_at":{"type":"string","format":"date-time","example":"2024-01-15T10:30:00.000Z"},"order_type":{"type":["string","null"],"example":"online"},"financial_status":{"type":["string","null"],"example":"paid"},"fulfillment_status":{"type":["string","null"],"example":"fulfilled"},"currency":{"type":["string","null"],"example":"EUR"},"total":{"type":["number","null"],"example":49.99},"subtotal":{"type":["number","null"],"example":42.01},"total_discount":{"type":["number","null"],"example":5.0},"total_paid":{"type":["number","null"],"example":49.99},"total_refunded":{"type":["number","null"],"example":0.0},"total_shipping":{"type":["number","null"],"example":4.99},"total_tax":{"type":["number","null"],"example":7.98},"exchange_rate":{"type":["number","null"],"example":1.08},"payment_method":{"type":["string","null"],"example":"credit_card"},"payment_provider_ref":{"type":["string","null"],"example":"ch_1234"},"coupon_code":{"type":["string","null"],"example":"SUMMER10"},"invoice_number":{"type":["string","null"],"example":"INV-2024-001"},"prices_include_tax":{"type":["boolean","null"],"example":false},"tax_exempt":{"type":["boolean","null"],"example":false},"cancel_reason":{"type":["string","null"],"example":"Customer requested cancellation"},"cancelled_at":{"type":["string","null"],"format":"date-time","example":"2024-01-16T10:30:00.000Z"},"completed_at":{"type":["string","null"],"format":"date-time","example":"2024-01-15T12:00:00.000Z"},"customer_note":{"type":["string","null"],"example":"Please leave at front door"},"staff_note":{"type":["string","null"],"example":"VIP customer"},"source_channel_id":{"type":["string","null"],"example":"web"},"tags":{"type":["array","null"],"items":{"type":"string"},"example":["vip","loyalty"]},"billing_address":{"type":["object","null"],"properties":{"salutation":{"type":["string","null"],"example":"mr"},"first_name":{"type":["string","null"],"example":"Max"},"last_name":{"type":["string","null"],"example":"Mustermann"},"company_name":{"type":["string","null"],"example":"Acme GmbH"},"address_line_1":{"type":["string","null"],"example":"Alexanderplatz 1"},"address_line_2":{"type":["string","null"],"example":"c/o Acme"},"city":{"type":["string","null"],"example":"Berlin"},"postal_code":{"type":["string","null"],"example":"10178"},"country_code":{"type":["string","null"],"example":"DE"},"phone_number":{"type":["string","null"],"example":"+49 30 1234567"}},"additionalProperties":false},"shipping_address":{"type":["object","null"],"properties":{"salutation":{"type":["string","null"],"example":"mr"},"first_name":{"type":["string","null"],"example":"Max"},"last_name":{"type":["string","null"],"example":"Mustermann"},"company_name":{"type":["string","null"],"example":"Acme GmbH"},"address_line_1":{"type":["string","null"],"example":"Alexanderplatz 1"},"address_line_2":{"type":["string","null"],"example":"c/o Acme"},"city":{"type":["string","null"],"example":"Berlin"},"postal_code":{"type":["string","null"],"example":"10178"},"country_code":{"type":["string","null"],"example":"DE"},"phone_number":{"type":["string","null"],"example":"+49 30 1234567"}},"additionalProperties":false},"platform_metadata":{"type":["object","null"],"additionalProperties":true,"example":{"shopify_id":"12345"}},"user_id":{"type":["string","null"],"example":"13a10e14-330d-4169-8b17-5b0263aedae9","description":"Unidy ID of the user. Takes precedence over email."},"email":{"type":["string","null"],"example":"user@example.com","description":"Email of the user. Used if user_id is not provided. Creates the user if they do not exist."},"line_items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Concert Ticket"},"quantity":{"type":"integer","example":2},"external_product_id":{"type":"string","example":"PROD-123"},"unit_price":{"type":"number","example":24.99},"total_price":{"type":"number","example":49.98},"sku":{"type":["string","null"],"example":"SKU-001"},"variant":{"type":["string","null"],"example":"Red / Large"},"category":{"type":["string","null"],"example":"clothing"},"item_type":{"type":["string","null"],"example":"physical"},"position":{"type":["integer","null"],"example":1},"seller_id":{"type":["string","null"],"example":"SELLER-001"},"staff_note":{"type":["string","null"],"example":"Signed copy reserved"},"total_discount":{"type":["number","null"],"example":5.0},"total_tax":{"type":["number","null"],"example":7.98},"tax_rate":{"type":["number","null"],"example":0.19},"metadata":{"type":["object","null"],"additionalProperties":true,"example":null}},"required":["name","quantity","external_product_id","unit_price","total_price"]}}},"required":["transaction_category_id","external_id","reference","source_platform","placed_at","state"]}},"update_transaction":{"type":"object","properties":{"transaction_category_id":{"type":"integer","example":42,"description":"ID of the transaction category"},"external_id":{"type":"string","example":"ORDER-123","description":"Unique identifier from the source platform, unique per source_platform"},"reference":{"type":"string","example":"REF-456","description":"A reference visible to the user, e.g. order number"},"source_platform":{"type":"string","example":"shopify","description":"The platform this transaction originates from"},"state":{"type":"string","example":"open","enum":["open","partially_paid","paid","partially_refunded","refunded","cancelled"]},"placed_at":{"type":"string","format":"date-time","example":"2024-01-15T10:30:00.000Z"},"order_type":{"type":["string","null"],"example":"online"},"financial_status":{"type":["string","null"],"example":"paid"},"fulfillment_status":{"type":["string","null"],"example":"fulfilled"},"currency":{"type":["string","null"],"example":"EUR"},"total":{"type":["number","null"],"example":49.99},"subtotal":{"type":["number","null"],"example":42.01},"total_discount":{"type":["number","null"],"example":5.0},"total_paid":{"type":["number","null"],"example":49.99},"total_refunded":{"type":["number","null"],"example":0.0},"total_shipping":{"type":["number","null"],"example":4.99},"total_tax":{"type":["number","null"],"example":7.98},"exchange_rate":{"type":["number","null"],"example":1.08},"payment_method":{"type":["string","null"],"example":"credit_card"},"payment_provider_ref":{"type":["string","null"],"example":"ch_1234"},"coupon_code":{"type":["string","null"],"example":"SUMMER10"},"invoice_number":{"type":["string","null"],"example":"INV-2024-001"},"prices_include_tax":{"type":["boolean","null"],"example":false},"tax_exempt":{"type":["boolean","null"],"example":false},"cancel_reason":{"type":["string","null"],"example":"Customer requested cancellation"},"cancelled_at":{"type":["string","null"],"format":"date-time","example":"2024-01-16T10:30:00.000Z"},"completed_at":{"type":["string","null"],"format":"date-time","example":"2024-01-15T12:00:00.000Z"},"customer_note":{"type":["string","null"],"example":"Please leave at front door"},"staff_note":{"type":["string","null"],"example":"VIP customer"},"source_channel_id":{"type":["string","null"],"example":"web"},"tags":{"type":["array","null"],"items":{"type":"string"},"example":["vip","loyalty"]},"billing_address":{"type":["object","null"],"properties":{"salutation":{"type":["string","null"],"example":"mr"},"first_name":{"type":["string","null"],"example":"Max"},"last_name":{"type":["string","null"],"example":"Mustermann"},"company_name":{"type":["string","null"],"example":"Acme GmbH"},"address_line_1":{"type":["string","null"],"example":"Alexanderplatz 1"},"address_line_2":{"type":["string","null"],"example":"c/o Acme"},"city":{"type":["string","null"],"example":"Berlin"},"postal_code":{"type":["string","null"],"example":"10178"},"country_code":{"type":["string","null"],"example":"DE"},"phone_number":{"type":["string","null"],"example":"+49 30 1234567"}},"additionalProperties":false},"shipping_address":{"type":["object","null"],"properties":{"salutation":{"type":["string","null"],"example":"mr"},"first_name":{"type":["string","null"],"example":"Max"},"last_name":{"type":["string","null"],"example":"Mustermann"},"company_name":{"type":["string","null"],"example":"Acme GmbH"},"address_line_1":{"type":["string","null"],"example":"Alexanderplatz 1"},"address_line_2":{"type":["string","null"],"example":"c/o Acme"},"city":{"type":["string","null"],"example":"Berlin"},"postal_code":{"type":["string","null"],"example":"10178"},"country_code":{"type":["string","null"],"example":"DE"},"phone_number":{"type":["string","null"],"example":"+49 30 1234567"}},"additionalProperties":false},"platform_metadata":{"type":["object","null"],"additionalProperties":true,"example":{"shopify_id":"12345"}},"line_items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Concert Ticket"},"quantity":{"type":"integer","example":2},"external_product_id":{"type":"string","example":"PROD-123"},"unit_price":{"type":"number","example":24.99},"total_price":{"type":"number","example":49.98},"sku":{"type":["string","null"],"example":"SKU-001"},"variant":{"type":["string","null"],"example":"Red / Large"},"category":{"type":["string","null"],"example":"clothing"},"item_type":{"type":["string","null"],"example":"physical"},"position":{"type":["integer","null"],"example":1},"seller_id":{"type":["string","null"],"example":"SELLER-001"},"staff_note":{"type":["string","null"],"example":"Signed copy reserved"},"total_discount":{"type":["number","null"],"example":5.0},"total_tax":{"type":["number","null"],"example":7.98},"tax_rate":{"type":["number","null"],"example":0.19},"metadata":{"type":["object","null"],"additionalProperties":true,"example":null},"id":{"type":"integer","example":1,"description":"ID of an existing line item to update or delete. Omit to create a new line item."},"_delete":{"type":"boolean","example":true,"description":"Set to true to delete the line item identified by id."}}},"description":"Line items to create, update, or delete. Items without id are created. Items with id are updated. Items with id and _delete: true are deleted."}},"required":[]},"line_item":{"type":"object","properties":{"name":{"type":"string","example":"Concert Ticket"},"quantity":{"type":"integer","example":2},"external_product_id":{"type":"string","example":"PROD-123"},"unit_price":{"type":"number","example":24.99},"total_price":{"type":"number","example":49.98},"sku":{"type":["string","null"],"example":"SKU-001"},"variant":{"type":["string","null"],"example":"Red / Large"},"category":{"type":["string","null"],"example":"clothing"},"item_type":{"type":["string","null"],"example":"physical"},"position":{"type":["integer","null"],"example":1},"seller_id":{"type":["string","null"],"example":"SELLER-001"},"staff_note":{"type":["string","null"],"example":"Signed copy reserved"},"total_discount":{"type":["number","null"],"example":5.0},"total_tax":{"type":["number","null"],"example":7.98},"tax_rate":{"type":["number","null"],"example":0.19},"metadata":{"type":["object","null"],"additionalProperties":true,"example":null},"id":{"type":"integer","example":1}}},"new_line_item":{"type":"object","properties":{"name":{"type":"string","example":"Concert Ticket"},"quantity":{"type":"integer","example":2},"external_product_id":{"type":"string","example":"PROD-123"},"unit_price":{"type":"number","example":24.99},"total_price":{"type":"number","example":49.98},"sku":{"type":["string","null"],"example":"SKU-001"},"variant":{"type":["string","null"],"example":"Red / Large"},"category":{"type":["string","null"],"example":"clothing"},"item_type":{"type":["string","null"],"example":"physical"},"position":{"type":["integer","null"],"example":1},"seller_id":{"type":["string","null"],"example":"SELLER-001"},"staff_note":{"type":["string","null"],"example":"Signed copy reserved"},"total_discount":{"type":["number","null"],"example":5.0},"total_tax":{"type":["number","null"],"example":7.98},"tax_rate":{"type":["number","null"],"example":0.19},"metadata":{"type":["object","null"],"additionalProperties":true,"example":null}},"required":["name","quantity","external_product_id","unit_price","total_price"]},"patch_line_item":{"type":"object","properties":{"name":{"type":"string","example":"Concert Ticket"},"quantity":{"type":"integer","example":2},"external_product_id":{"type":"string","example":"PROD-123"},"unit_price":{"type":"number","example":24.99},"total_price":{"type":"number","example":49.98},"sku":{"type":["string","null"],"example":"SKU-001"},"variant":{"type":["string","null"],"example":"Red / Large"},"category":{"type":["string","null"],"example":"clothing"},"item_type":{"type":["string","null"],"example":"physical"},"position":{"type":["integer","null"],"example":1},"seller_id":{"type":["string","null"],"example":"SELLER-001"},"staff_note":{"type":["string","null"],"example":"Signed copy reserved"},"total_discount":{"type":["number","null"],"example":5.0},"total_tax":{"type":["number","null"],"example":7.98},"tax_rate":{"type":["number","null"],"example":0.19},"metadata":{"type":["object","null"],"additionalProperties":true,"example":null}},"required":[]},"transaction_category":{"type":"object","properties":{"id":{"type":"integer","example":42},"internal_name":{"type":"string","example":"online_shop","description":"Unique machine-readable identifier for this category"},"name":{"type":"string","example":"Online Shop","description":"Display name of the category in the current locale"},"metadata":{"type":["object","null"],"additionalProperties":true,"example":null},"created_at":{"type":"string","format":"date-time","example":"2024-01-15T10:30:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2024-01-15T10:30:00.000Z"}}},"custom_attributes":{"type":"object","properties":{"custom_attributes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"member_number"},"display_name":{"type":"string","example":"Member number"},"profile_access":{"type":"string","enum":["hidden","show","edit"]},"input_type":{"type":"string","enum":["short_text","text","integer","decimal","select","multi_select","date_select","radio_buttons","datetime_select"]},"accessible_via_api":{"type":"boolean","example":true,"description":"All attributes return from this api will have this set to true"},"created_at":{"type":"string","example":"2020-01-01T00:00:00Z","format":"date-time"},"updated_at":{"type":"string","example":"2020-01-01T00:00:00Z","format":"date-time"},"custom_attribute_select_values":{"type":"array","items":{"type":"string","example":"red"},"example":["red"],"uniqueItems":true,"description":"Select values (if input_type is \"select\" or \"multi_select\")"}}}}}},"legacy_newsletter_subscription":{"type":"object","properties":{"id":{"type":"integer","example":1},"email":{"type":"string","example":"user@gmail.com"},"topics":{"type":"array","items":{"type":"string","example":"newsletter_topic_identifier","description":"Newsletter topic identifier"},"example":["newsletter_topic_identifier"],"uniqueItems":true,"description":"Newsletter topics"},"confirmed_at":{"type":["string",null],"example":"2020-01-01T00:00:00Z","description":"Date and time when the subscription was confirmed","format":"date-time"}},"required":["id","email","topics"]},"legacy_create_newsletter_subscription":{"type":"object","properties":{"email":{"type":"string","example":"user@gmail.com","description":"Subscribers email address"},"topics":{"type":"array","items":{"type":"string","example":"newsletter_topic_identifier","description":"Newsletter topic identifier"},"example":["newsletter_topic_identifier"],"uniqueItems":true,"description":"Newsletter topics"},"confirmed_at":{"type":["string",null],"example":"2020-01-01T00:00:00Z","description":"Date and time when the subscription was confirmed","format":"date-time"},"confirm_ip":{"type":["string",null],"example":"104.104.12.8"}},"required":["email"]},"legacy_update_newsletter_subscription":{"type":"object","properties":{"email":{"type":"string","example":"user@gmail.com","description":"Subscribers email address"},"topics":{"type":"array","items":{"type":"string","example":"newsletter_topic_identifier","description":"Newsletter topic identifier"},"example":["newsletter_topic_identifier"],"uniqueItems":true,"description":"Newsletter topics"}},"required":["topics"]},"legacy_confirm_newsletter_subscription":{"type":"object","properties":{"confirmed_at":{"type":["string",null],"example":"2020-01-01T00:00:00Z","description":"Date and time when the subscription was confirmed","format":"date-time"},"confirm_ip":{"type":["string",null],"example":"104.104.12.8"}},"required":[]},"newsletter":{"type":"object","properties":{"id":{"type":"integer","example":1},"internal_name":{"type":"string","example":"newsletter_internal_name (used in the API as the unique identifier)"},"default":{"type":"boolean","example":false},"title":{"type":"string","example":"Newsletter title"},"description":{"type":"string","example":"Newsletter description"},"brands":{"type":"array","items":{"type":"string","example":"brand_name"},"example":["brand_name"],"uniqueItems":true,"description":"Brands this newsletter is available for"},"created_at":{"type":"string","example":"2020-01-01T00:00:00Z","format":"date-time"}}},"newsletters":{"type":"object","properties":{"newsletters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":1},"internal_name":{"type":"string","example":"newsletter_internal_name (used in the API as the unique identifier)"},"default":{"type":"boolean","example":false},"title":{"type":"string","example":"Newsletter title"},"description":{"type":"string","example":"Newsletter description"},"brands":{"type":"array","items":{"type":"string","example":"brand_name"},"example":["brand_name"],"uniqueItems":true,"description":"Brands this newsletter is available for"},"created_at":{"type":"string","example":"2020-01-01T00:00:00Z","format":"date-time"}}},"example":[{"type":"object","properties":{"id":{"type":"integer","example":1},"internal_name":{"type":"string","example":"newsletter_internal_name (used in the API as the unique identifier)"},"default":{"type":"boolean","example":false},"title":{"type":"string","example":"Newsletter title"},"description":{"type":"string","example":"Newsletter description"},"brands":{"type":"array","items":{"type":"string","example":"brand_name"},"example":["brand_name"],"uniqueItems":true,"description":"Brands this newsletter is available for"},"created_at":{"type":"string","example":"2020-01-01T00:00:00Z","format":"date-time"}}}]}}},"newsletter_subscription":{"type":"object","properties":{"id":{"type":"integer","example":1},"email":{"type":"string","example":"user@gmail.com"},"user_id":{"type":["string",null],"example":"user_id"},"preference_token":{"type":"string","example":"se7xZa1mzpClveAQPZwANr123","description":"Unique newsletter subscription token"},"preference_identifiers":{"type":"array","items":{"type":"string","example":"newsletter_preference_identifier","description":"Newsletter preference identifier"},"example":["newsletter_preference_identifier"],"uniqueItems":true,"description":"Newsletter preferences"},"confirmed_at":{"type":["string",null],"example":"2020-01-01T00:00:00Z","description":"Date and time when the subscription was confirmed","format":"date-time"}},"required":["id","email","preference_identifiers"]},"create_newsletter_subscription":{"type":"object","properties":{"newsletter_subscription":{"type":"object","properties":{"email":{"type":"string","example":"user@gmail.com","description":"Subscribers email address"},"preference_token":{"type":"string","example":"se7xZa1mzpClveAQPZwANr123","description":"Unique newsletter subscription token"},"preference_identifiers":{"type":"array","items":{"type":"string","example":"newsletter_preference_identifier","description":"Newsletter preference identifier"},"example":["newsletter_preference_identifier"],"uniqueItems":true,"description":"Newsletter preferences"},"confirmed_at":{"type":["string",null],"example":"2020-01-01T00:00:00Z","description":"Date and time when the subscription was confirmed","format":"date-time"},"confirm_ip":{"type":["string",null],"example":"104.104.12.8"},"user_attributes":{"type":"object","required":["create_user"],"additionalProperties":false,"properties":{"create_user":{"type":"boolean","example":false,"description":"Whether to create a user if one does not exist"},"additional_fields":{"type":"object","properties":{"first_name":{"type":["string","null"],"example":"Herrman"},"last_name":{"type":["string","null"],"example":"Mueller"},"salutation":{"type":["string","null"],"example":"mr","enum":["mr","mrs","mx",null]},"phone_number":{"type":["string","null"],"example":"+49123456789"},"date_of_birth":{"type":["string","null"],"format":"date","example":"1991-06-10"},"company_name":{"type":["string","null"],"example":"Unidy"},"address_line_1":{"type":["string","null"],"example":"Jakob-Kaiser-Str 70a"},"address_line_2":{"type":["string","null"],"example":"5 OG"},"city":{"type":["string","null"],"example":"Hamburg"},"postal_code":{"type":["string","null"],"example":"AA0A 0AA"},"country_code":{"type":["string","null"],"example":"GB","description":"codes follow ISO 3166"},"preferred_language":{"type":["string","null"],"example":"de"},"custom_attributes":{"type":["object","null"],"description":"Object containing key-value pairs where keys are the custom attribute names.The allowed value depends on the custom attribute type.","additionalProperties":true,"example":{"custom_attribute_name":"value","another_custom_attribute_name":12}}},"description":"Additional fields to create the user with","additionalProperties":false}}}},"required":["email"]}},"required":["newsletter_subscription"]},"update_newsletter_subscription":{"type":"object","properties":{"newsletter_subscription":{"type":"object","properties":{"email":{"type":"string","example":"user@gmail.com","description":"Subscribers email address"},"preference_token":{"type":"string","example":"se7xZa1mzpClveAQPZwANr123","description":"Unique newsletter subscription token"},"preference_identifiers":{"type":"array","items":{"type":"string","example":"newsletter_preference_identifier","description":"Newsletter preference identifier"},"example":["newsletter_preference_identifier"],"uniqueItems":true,"description":"Newsletter preferences"}},"required":["preference_identifiers"]}},"required":["newsletter_subscription"]},"confirm_newsletter_subscription":{"type":"object","properties":{"newsletter_subscription":{"type":"object","properties":{"confirmed_at":{"type":["string",null],"example":"2020-01-01T00:00:00Z","description":"Date and time when the subscription was confirmed","format":"date-time"},"confirm_ip":{"type":["string",null],"example":"104.104.12.8"}},"required":["confirmed_at"]}},"required":["newsletter_subscription"]},"put_plugin_data":{"type":"object","properties":{"external_system_id":{"type":"string","example":"123456789","description":"The external system id of the user in the external system(\"Hubspot vid, Eventim tixx_id, Campai customer_id or Plenigo customer_id\")"}},"required":["external_system_id"]},"new_one_time_login_token":{"type":"object","properties":{"client_id":{"type":"string","example":"yjvbCry-HxhB2_NREjiFLAJtQhphKtxsk_FgAmh4qHU","description":"The client ID of the application requesting the one-time login token"},"redirect_uri":{"type":"string","example":"https://example.com/callback","description":"The URI to redirect to after the one-time login is complete. Make sure the URI is registered in the application settings in the Unidy admin."},"scopes":{"type":"array","default":["openid"],"items":{"type":"string","example":"openid","description":"The scopes requested for the one-time login token"}},"skip_oauth_authorization":{"type":"boolean","example":true,"default":false,"description":"Whether to skip the OAuth authorization step if the user has already authorized the application"}},"required":["client_id","redirect_uri"]},"new_unidy_one_time_login_token":{"type":"object","properties":{"path":{"type":"string","example":"/profile","description":"Path to redirect to in Unidy (must start with \"/\")"}},"required":["path"],"additionalProperties":false},"one_time_login_token":{"type":"object","properties":{"token":{"type":"string","example":"b09cde26-9239-4b9d-9b0a-fb1264da4348","description":"The generated one-time login token for the user to log in to a third-party application"}}}}}}