# Create Child Client Creates a new child client under the authenticated client (or under a visible descendant via ). The child is created for travel-data ingestion only: it inherits address, tax, currency, and methodology defaults from its parent, but has no credentials, no billing or purchasing capability, and no product or project access. Submit travel data for the new client by passing its as the on . The child is usable on the very next request after creation. Send to configure the child's methodologies in the same request instead of inheriting the parent's. Omit it and the child gets a copy of the parent's current options — a copy, not a link: later changes on the parent never propagate to the child. Options that cannot be read as a list at all are rejected with (); options that are readable but not allowed — an unknown or , two defaults for one activity type, more than three per type — are rejected with (). In both cases no client is created. Requires this feature to be enabled for your account (contact us); otherwise this endpoint responds with . Endpoint: POST /v2/clients Security: Bearer-Auth ## Request fields (application/json): - `name` (string, required) The child client's display name. - `external_reference` (string) Your own reference for the client, unique among the children of the same parent. Generated from the name when omitted. - `parent_id` (string) The parent to create the child under. Defaults to the authenticated client; must be the authenticated client or one of its descendants. - `metadata` (object) A set of key-value pairs of yours that helps you link this record in your system. - `methodology_configuration` (object) The methodologies the child calculates with. Omit the whole object to inherit a copy of the parent's current options. When present it must carry ; an empty object is rejected with (). - `methodology_configuration.methodology_options` (array, required) The full list of options to configure. Replaces the inherited defaults outright, so send every option the child should have — including an empty array to configure no methodology at all. - `methodology_configuration.methodology_options.activity_type` (string, required) The activity type this option applies to. Enum: "flight", "train", "car", "hotel" - `methodology_configuration.methodology_options.methodology` (string, required) The methodology used to calculate this activity type. Must be one of the methodologies available for the ; anything else is rejected with (). - `methodology_configuration.methodology_options.version` (string,null) The methodology version to calculate with. Use to always pick the factor set that was valid on the travel date. Send (or omit the field) to use the methodology's current version. Only , , , , and publish selectable versions; for the others the value is informational. - `methodology_configuration.methodology_options.default` (boolean, required) Whether this is the methodology reported for the activity type. Exactly one option per must be . Required on every entry — an entry without a boolean is rejected with (). ## Response 201 fields (application/json): - `id` (string, required) The client's unique identifier (UUID). Use this value as a or as the travel-data . - `name` (string,null) The client's display name. - `external_reference` (string,null) Your own reference for this client, unique among the children of a given parent. Generated from the name when omitted on creation. - `parent_id` (string,null, required) The UUID of this client's parent, or for the authenticated (root) client. - `status` (string, required) The client's lifecycle status. Enum: "active" - `metadata` (object, required) A set of key-value pairs of yours that helps you link this record in your system. - `methodology_options` (array, required) The methodologies this client calculates with, one entry per activity type and methodology. Always present: a client that has never been configured reports the SQUAKE defaults it calculates with ( and for flights, for trains and cars, for hotels — all ). Set it with the object on and . - `methodology_options.activity_type` (string, required) The activity type this option applies to. Enum: "flight", "train", "car", "hotel" - `methodology_options.methodology` (string, required) The methodology used to calculate this activity type. Must be one of the methodologies available for the ; anything else is rejected with (). - `methodology_options.version` (string,null) The methodology version to calculate with. Use to always pick the factor set that was valid on the travel date. Send (or omit the field) to use the methodology's current version. Only , , , , and publish selectable versions; for the others the value is informational. - `methodology_options.default` (boolean, required) Whether this is the methodology reported for the activity type. Exactly one option per must be . Required on every entry — an entry without a boolean is rejected with (). ## Response 400 fields (application/json): - `errors` (array) - `errors.code` (string, required) An application-specific error code, expressed as a string value. Enum: "field_validation_error", "invalid_params", "server_error", "not_authorized", "not_found", "invalid_methodology", "invalid_type", "client_not_found", "invalid_parent_client", "client_has_children", "parent_id_immutable", "travel_data_not_found" - `errors.detail` (string) A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized. - `errors.source` (object) An object containing references to the primary source of the error - `errors.source.id` (string) - `errors.source.attribute` (string, required) - `errors.source.model` (string) ## Response 401 fields (application/json): - `errors` (array) - `errors.code` (string, required) An application-specific error code, expressed as a string value. Enum: "field_validation_error", "invalid_params", "server_error", "not_authorized", "not_found", "invalid_methodology", "invalid_type", "client_not_found", "invalid_parent_client", "client_has_children", "parent_id_immutable", "travel_data_not_found" - `errors.detail` (string) A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized. - `errors.source` (object) An object containing references to the primary source of the error - `errors.source.id` (string) - `errors.source.attribute` (string, required) - `errors.source.model` (string) ## Response 404 fields (application/json): - `errors` (array) - `errors.code` (string, required) An application-specific error code, expressed as a string value. Enum: "field_validation_error", "invalid_params", "server_error", "not_authorized", "not_found", "invalid_methodology", "invalid_type", "client_not_found", "invalid_parent_client", "client_has_children", "parent_id_immutable", "travel_data_not_found" - `errors.detail` (string) A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized. - `errors.source` (object) An object containing references to the primary source of the error - `errors.source.id` (string) - `errors.source.attribute` (string, required) - `errors.source.model` (string) ## Response 422 fields (application/json): - `errors` (array) - `errors.code` (string, required) An application-specific error code, expressed as a string value. Enum: "field_validation_error", "invalid_params", "server_error", "not_authorized", "not_found", "invalid_methodology", "invalid_type", "client_not_found", "invalid_parent_client", "client_has_children", "parent_id_immutable", "travel_data_not_found" - `errors.detail` (string) A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized. - `errors.source` (object) An object containing references to the primary source of the error - `errors.source.id` (string) - `errors.source.attribute` (string, required) - `errors.source.model` (string)