openapi: 3.0.0 x-readme: explorer-enabled: false samples-languages: - curl - python info: description: 'This section describes all Oneflow public APIs and their methods used for creating and interacting with Oneflow contracts. All references are grouped into several main categories according to their function:' version: '1' title: Public API for Oneflow servers: - url: https://{hostname}/v1 variables: hostname: default: api.oneflow.com paths: /: get: x-oneflow-internal: true x-tag: Core summary: Public API base endpoint operationId: public_api.api.v1.welcome.handler description: Use this endpoint to get the Public API welcome page and documentation. responses: '200': description: Returns the welcome message and url to the documentation. content: application/json: schema: type: object additionalProperties: false required: - api_version - description - documentation - message description: Oneflow public API welcome message and url to the documentation. properties: api_version: type: string description: type: string documentation: type: string message: type: string examples: contractMoveResponseExample: description: The response with welcome message and url to the documentation value: api_version: v1 description: Use the Oneflow public APIs to build powerful integrations to automate your contract management! Feel free to explore the available endpoints. documentation: https://developer.oneflow.com/docs/intro message: Welcome to the Oneflow public API! /accounts/me: get: x-tag: Account summary: Get account-related information operationId: public_api.api.v1.current_account_get.handler description: Use this endpoint to retrieve information about the current Oneflow account. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 responses: '200': description: Returns the current Oneflow account. content: application/json: schema: type: object additionalProperties: false required: - country_code - created_time - id - name - registration_number - token_info - updated_time description: A Oneflow account. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true country_code: description: The country of the contract party. type: string format: country_code created_time: type: string format: datetime nullable: true id: description: The ID of the account. type: integer format: signed_integer_id name: description: The Oneflow account's name. type: string minLength: 1 registration_number: description: The registration number of the company. type: string minLength: 0 maxLength: 25 token_info: description: Information about the token used for this request type: object properties: integration: description: The integration this token is connected to type: object properties: id: description: The ID of the integration instance this token belongs to. Returns null if it is a custom API token. type: integer format: signed_integer_id nullable: true key: description: The string key of the integration. Returns 'custom' if the token is a custom API token. type: string updated_time: type: string format: datetime nullable: true examples: accountResponseExample: description: 'A sample account:' value: _links: self: href: https://api.oneflow.com/v1/accounts/me country_code: SE created_time: '2019-05-16T10:00:00+00:00' id: 30001 name: Own Company AB registration_number: 11223344-5566 token_info: integration: id: null key: custom updated_time: '2020-07-09T12:00:00+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. /users: get: x-tag: User summary: Get users in an account operationId: public_api.api.v1.users_list.handler description: Use this endpoint to retrieve a list of all users from a Oneflow account. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: offset in: query required: false schema: type: integer minimum: 0 maximum: 19900 default: 0 example: 0 - name: limit in: query required: false schema: type: integer minimum: 1 maximum: 100 default: 100 example: 100 - name: filter description: An object containing key-value pairs to filter results. in: query required: false style: deepObject explode: true schema: type: object additionalProperties: false properties: active: description: Filter users by whether the user is active or not. type: string enum: - 'true' - 'false' email: description: Filter users by a user's email address. type: string format: email id: description: 'Retrieve specific users by providing a comma-separated list of user IDs. Note: Other filters still apply if specified. ' type: string maxLength: 100 name: description: Filter users by name. type: string minLength: 1 maxLength: 100 - name: sort description: "A comma-separated list of columns by which results are sorted. Valid columns:\n * name\n" in: query required: false schema: type: string responses: '200': description: Returns the list of all users from a Oneflow account. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A list of users in an account. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true count: type: integer data: type: array items: type: object additionalProperties: false required: - active - email - is_admin - id - name - phone_number - state - title description: A Oneflow user. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true active: description: True if the user is active and false otherwise. type: boolean email: description: The user's email. type: string format: email is_admin: description: True if the user is an administrator and false otherwise. type: boolean id: type: integer format: signed_integer_id name: description: The user's name. type: string minLength: 1 maxLength: 100 phone_number: description: The user's phone number. type: string minLength: 0 maxLength: 50 nullable: true state: description: The user's state. type: string enum: - registered title: description: The user's title. type: string minLength: 0 maxLength: 100 examples: usersResponseExample: description: 'A sample list of users from an account:' value: _links: next: href: null previous: href: null self: href: https://api.oneflow.com/v1/users?limit=100&offset=0 count: 2 data: - _links: self: href: https://api.oneflow.com/v1/users/190001 active: true email: oliver.queen@qc.com id: 190001 is_admin: true name: Oliver Queen phone_number: '+111222333444' state: registered title: Sales Manager - _links: self: href: https://api.oneflow.com/v1/users/190002 active: false email: john.diggel@qc.com id: 190002 is_admin: true name: John Diggle phone_number: '' state: registered title: '' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. /ping: get: x-tag: Core summary: Check API availability operationId: public_api.api.v1.ping.handler description: Use this endpoint to check if the Oneflow API is available and to authenticate a Oneflow user. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com responses: '200': description: The service is up, and the API token is valid. '401': description: The API token or the user email is invalid. /contracts: get: x-tag: Contract summary: Get contracts operationId: public_api.api.v1.contracts_list.handler description: Use this endpoint to retrieve the list of contracts. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com - name: offset in: query required: false schema: type: integer minimum: 0 maximum: 19900 default: 0 example: 0 - name: limit in: query required: false schema: type: integer minimum: 1 maximum: 100 default: 100 example: 100 - name: sort description: "A comma-separated list of columns by which results are sorted. Valid columns:\n * name\n * state\n * state_updated_time\n * published_time\n" in: query required: false schema: type: string example: -state,name - name: filter description: An object containing key-value pairs to filter results. in: query required: false style: deepObject explode: true schema: type: object additionalProperties: false properties: canceled: description: Filter contracts by whether the contract lifecycle has been canceled or not. type: string enum: - 'true' - 'false' closed_time: description: 'Filter contracts where the `sign` or `decline` timestamp is within the specified [datetime range](doc:filtering#filtering-on-datetimes). ' type: string maxLength: 60 example: 2022-01-02T03:04:05+02:00|2022-05-06T07:08:09-05:00 created_time: description: 'Filter contracts where the `created` timestamp is within the specified [datetime range](doc:filtering#filtering-on-datetimes). ' type: string maxLength: 60 example: 2022-01-02T03:04:05+02:00|2022-05-06T07:08:09-05:00 data_field_match: description: 'Filter contracts where the given data field has a given value. The format for this parameter is `filter[data_field_match]=:` Dont forget to URL escape the value as it can be any Unicode string. The value can''t be the empty string. ' type: string pattern: ^.*:.*$ maxLength: 600 folder_ids: description: Filter contracts with folders that are in the specified comma-separated list of folder IDs. type: string maxLength: 100 id: description: 'Retrieve specific contracts by providing a comma-separated list of contract IDs. Note: Other filters still apply if specified. ' type: string maxLength: 200 lifecycle_started_time: description: 'Filter contracts where the lifecycle start timestamp is within the specified [datetime range](doc:filtering#filtering-on-datetimes). ' type: string maxLength: 60 example: 2022-01-02T03:04:05+02:00|2022-05-06T07:08:09-05:00 lifecycle_states: description: 'Filter contracts where the lifecycle state is one of the specified states in a comma-separated list. See [lifecycle-state](doc:contract#lifecycle-states) for allowed values. ' type: string maxLength: 100 participant_custom_id: description: Filter contracts where the custom_id of one of the participants matches the given value. type: string maxLength: 100 participant_identification_number: description: 'Filter contracts where the identification_number of one of the participants matches the given value. ' type: string maxLength: 100 published_time: description: 'Filter contracts where the `publish` timestamp is within the specified [datetime range](doc:filtering#filtering-on-datetimes). ' type: string maxLength: 60 example: 2022-01-02T03:04:05+02:00|2022-05-06T07:08:09-05:00 query: description: "Free text search in the following fields:\n * participant fullname\n * participant title\n * participant ssn\n * participant phone number\n * participant email\n * party org number\n * party phone number\n * data field value\n * tag name\n * contract name\n" type: string maxLength: 300 states: description: 'Filter contracts where the contract state is one of the specified states in a comma-separated list. See [state](doc:contract#state) for allowed values. ' type: string maxLength: 100 upcoming_time: description: 'Filter contracts where the next upcoming event is within the specified [datetime range](doc:filtering#filtering-on-datetimes). Here, an event refers to the signing period expiration or a lifecycle event (start, end, renewal). ' type: string maxLength: 60 example: 2022-01-02T03:04:05+02:00|2022-05-06T07:08:09-05:00 updated_time: description: 'Filter contracts where the contract was last updated within the specified [datetime range](doc:filtering#filtering-on-datetimes). ' type: string maxLength: 60 example: 2022-01-02T03:04:05+02:00|2022-05-06T07:08:09-05:00 workspace_ids: description: Filter contracts from workspaces that are in the specified comma-separated list of workspace IDs. type: string maxLength: 100 tag_ids: description: Filter contracts with tags that are in the specified comma-separated list of tag IDs. type: string maxLength: 100 - name: output_data_fields description: If 'true', include data_fields in the output x-oneflow-internal: true in: query required: false schema: type: boolean responses: '200': description: Returns the list of all [contracts](contract) in the specified account. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A list of contracts in an account. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true count: type: integer data: type: array items: type: object additionalProperties: false description: See [Contract](doc:contract). required: - _permissions - _private - _private_ownerside - id - lifecycle_settings - lifecycle_state - parties - published_time - signing_period_expiry_time - state - state_updated_time - tags - updated_time properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for various operations possible on the contract. The format of the permission is 'contract:' followed by the specific operation, like 'contract:create.' required: - contract:delete - contract:download:pdf - contract:send properties: contract:delete: type: boolean contract:download:pdf: type: boolean contract:send: type: boolean _integration_permissions: type: array additionalProperties: false description: A list of integration specific permissions. This exists only for specific integration tokens items: type: object additionalProperties: false required: - key - value properties: key: type: string value: type: string _private: type: object description: See [Private](doc:contract#private) required: - date_format - value - folder - name - signing_period_expiration - workspace_id properties: date_format: description: The date format of the contract. type: string value: type: object description: See [Contract value](doc:contract#value). required: - amount - currency nullable: true properties: amount: type: string format: amount currency: type: string format: currency folder: additionalProperties: false required: - id - name - parent_id - path description: A folder. properties: id: description: Folder ID type: integer format: signed_integer_id name: description: Folder name. type: string parent_id: description: If exist any parent folder, its ID. type: integer format: signed_integer_id nullable: true path: description: An array of folder IDs representing the path from the top of the hierarchy to the current folder. type: array items: type: integer format: signed_integer_id name: description: The name of the contract. type: string minLength: 0 maxLength: 130 signing_period_expiration: discriminator: propertyName: type oneOf: - type: object additionalProperties: false description: The signing period for this contract never expires required: - type properties: type: type: string description: Can only be 'never'. enum: - never - type: object additionalProperties: false description: The signing period for this contract expires a given number of days after publishing. This setting can only be used when the contract is in the draft stage. Converts into a "fixed_date" after the contract is published. required: - type - expire_days_after_publish properties: type: type: string description: Can only be 'days_after_publish'. enum: - days_after_publish expire_days_after_publish: type: integer minimum: 1 - type: object additionalProperties: false description: The signing period for this contract expires on a set date. required: - type - expire_date properties: type: type: string description: Can only be 'fixed_date'. enum: - fixed_date expire_date: type: string format: date workspace_id: description: The unique id of this workspace. type: integer format: signed_integer_id nullable: true single_sign: description: State of the feature single sign type: boolean format: single_sign _private_ownerside: type: object description: Contract data that is private to the ownerside. nullable: true required: - created_time - template_id - template_type_id properties: created_time: type: string format: datetime template_id: type: integer format: signed_integer_id nullable: true template_type_id: type: integer format: signed_integer_id nullable: true id: type: integer format: signed_integer_id data_fields: x-oneflow-internal: true type: array description: The data fields that are part of the contract. items: type: object additionalProperties: false description: See [Data field](doc:data-field). required: - _private_ownerside - description - id - name - placeholder - value properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object additionalProperties: false description: Data field attributes that are private to the ownerside. required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true description: type: string minLength: 0 maxLength: 300 id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 placeholder: type: string minLength: 0 maxLength: 100 value: type: string minLength: 0 lifecycle_settings: type: object description: See [Lifecycle settings](lifecycle-settings). required: - duration - end_date - initial_duration - notice_period - start_date - type additionalProperties: false nullable: true properties: duration: type: string format: duration nullable: true end_date: type: string format: date nullable: true initial_duration: type: string format: duration nullable: true notice_period: type: string format: duration nullable: true start_date: type: string format: date nullable: true type: type: string description: One of the contract [duration types](contract#duration-type). enum: - no_duration - single_period - recurring - recurring_two_periods - unknown lifecycle_state: type: object additionalProperties: false description: Lifecycle information of the contract. See [Lifecycle state](doc:contract#lifecycle-state). nullable: true required: - composite - contract_end_time - contract_start_time - cancel_time - has_ended_by_termination - has_passed_notice_period_start_time - is_canceled - is_recurring - lifecycle_state - lifecycle_state_updated_time - notice_period_start_time - period - period_end_time - period_start_time properties: composite: type: string description: One of the [lifecycle composites](contract#lifecycle-composite). enum: - awaiting - awaiting-recurring - active - active-recurring - active-canceled-recurring - ended - ended-terminated - ended-terminated-recurring contract_end_time: type: string format: datetime nullable: true contract_start_time: type: string format: datetime nullable: true cancel_time: type: string format: datetime nullable: true has_ended_by_termination: type: boolean has_passed_notice_period_start_time: type: boolean is_canceled: type: boolean is_recurring: type: boolean lifecycle_state: type: string description: One of the [lifecycle states](ccontract#lifecycle-states). enum: - awaiting - active - ended - unknown lifecycle_state_updated_time: type: string format: datetime notice_period_start_time: type: string format: datetime nullable: true period: type: integer nullable: true period_end_time: type: string format: datetime nullable: true period_start_time: type: string format: datetime nullable: true parties: type: array description: Total number of parties allowed per contract is 40. items: oneOf: - title: Individual description: An individual party, where a single participant is signing on behalf of him- or herself. See [Individual party](doc:party#individual) type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participant - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true participant: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `individual`. enum: - individual - title: Company description: The participants are signing on behalf of this company. See [Company party](doc:party#company). type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participants - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 participants: description: The maximum number of participants per contract across all parties is 40. type: array items: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `company`. enum: - company published_time: type: string format: datetime nullable: true sign_later: description: A flag to indicate if the contract signing is postponed. type: boolean sign_order: type: array description: Sign order of the participants. items: type: object additionalProperties: false required: - participant_id - order properties: participant_id: type: integer format: signed_integer_id description: participant ID order: type: integer minimum: 1 maximum: 40 description: Sign order signing_period_expiry_time: type: string format: datetime nullable: true state: type: string description: One of the [contract states](contract#contract-state). enum: - draft - pending - overdue - signed - declined - unknown state_updated_time: type: string format: datetime tags: type: array description: All tags associated with the contract. items: type: object additionalProperties: false required: - id - name properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 updated_time: type: string format: datetime nullable: true examples: contractsResponseExample: description: 'A sample list of contracts from an account:' value: _links: next: href: https://api.oneflow.com/v1/contracts?offset=2&limit=2 previous: href: null self: href: https://api.oneflow.com/v1/contracts?offset=0&limit=2 count: 5 data: - _integration_permissions: [] _links: comments: href: https://api.oneflow.com/v1/contracts/10001/comments data_fields: href: https://api.oneflow.com/v1/contracts/10001/data_fields events: href: https://api.oneflow.com/v1/contracts/10001/events files: href: https://api.oneflow.com/v1/contracts/10001/files parties: href: https://api.oneflow.com/v1/contracts/10001/parties publish: href: https://api.oneflow.com/v1/contracts/10001/publish self: href: https://api.oneflow.com/v1/contracts/10001 template: href: https://api.oneflow.com/v1/templates/170001 template_type: href: https://api.oneflow.com/v1/template_types/220001 workspace: href: https://api.oneflow.com/v1/workspaces/130001 _permissions: contract:delete: true contract:download:pdf: true contract:send: false _private: name: My First Contract signing_period_expiration: expire_date: '2023-05-11' type: fixed_date value: amount: '500.10' currency: SEK workspace_id: 130001 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' template_id: 170001 template_type_id: 220001 id: 10001 lifecycle_settings: null lifecycle_state: cancel_time: null composite: active-recurring contract_end_time: null contract_start_time: '2023-04-27T18:30:00+00:00' has_ended_by_termination: false has_passed_notice_period_start_time: true is_canceled: false is_recurring: true lifecycle_state: active lifecycle_state_updated_time: '2023-04-27T18:44:07+00:00' notice_period_start_time: '2024-01-27T18:30:00+00:00' period: 1 period_end_time: '2024-04-27T18:30:00+00:00' period_start_time: '2023-04-27T18:30:00+00:00' parties: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470001 identification_number: 11223344-5566 my_party: true name: Own Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: '2023-04-27T11:29:36+00:00' last_visited_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T18:44:07+00:00' visits: 1 delivery_channel: email delivery_status: success email: own@email.com id: 230001 identification_number: 10034544-0066 my_participant: true name: First Last organizer: false phone_number: '+111222333444' sign_method: unknown sign_state: signed sign_state_updated_time: '2023-04-27T18:44:07+00:00' signatory: true title: Sales Manager two_step_authentication_method: none type: company - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470002 identification_number: 11223344-5577 my_party: false name: Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_participant_1 first_visited_time: null last_visited_time: null updated_time: '2023-04-27T18:44:07+00:00' visits: 0 delivery_channel: email delivery_status: success email: mem@email.com id: 230002 identification_number: 10034544-0077 my_participant: false name: Firstname Lastname organizer: false phone_number: '+111222333555' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: company - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470003 identification_number: 10034544-0088 my_party: false name: Firstname2 Lastname2 participant: _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: null last_visited_time: null updated_time: '2023-04-27T18:44:07+00:00' visits: 0 delivery_channel: email delivery_status: success email: individual@email.com id: 230003 identification_number: 10034544-0088 my_participant: false name: Firstname2 Lastname2 organizer: false phone_number: '+111222333666' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: individual published_time: '2023-04-27T18:22:44+00:00' sign_later: false sign_order: - order: 1 participant_id: 230001 - order: 2 participant_id: 230002 - order: 3 participant_id: 230003 signing_period_expiry_time: '2023-05-12T00:00:00+00:00' state: signed state_updated_time: '2023-04-27T18:30:00+00:00' tags: - id: 380001 name: tag one - id: 380002 name: tag two updated_time: '2023-04-27T18:44:09+00:00' - _integration_permissions: [] _links: comments: href: https://api.oneflow.com/v1/contracts/10002/comments data_fields: href: https://api.oneflow.com/v1/contracts/10002/data_fields events: href: https://api.oneflow.com/v1/contracts/10002/events files: href: https://api.oneflow.com/v1/contracts/10002/files parties: href: https://api.oneflow.com/v1/contracts/10002/parties publish: href: https://api.oneflow.com/v1/contracts/10002/publish self: href: https://api.oneflow.com/v1/contracts/10002 template: href: https://api.oneflow.com/v1/templates/170002 template_type: href: null workspace: href: https://api.oneflow.com/v1/workspaces/130001 _permissions: contract:delete: true contract:download:pdf: true contract:send: true _private: name: My Second Contract signing_period_expiration: expire_days_after_publish: 14 type: days_after_publish value: amount: '420.00' currency: SEK workspace_id: 130001 _private_ownerside: created_time: '2023-04-28T10:14:44+00:00' template_id: 170002 template_type_id: null id: 10002 lifecycle_settings: null lifecycle_state: null parties: - _private_ownerside: created_time: '2023-04-28T10:14:44+00:00' updated_time: '2023-04-28T10:14:44+00:00' country_code: SE id: 470004 identification_number: 11223344-5566 my_party: true name: Own Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-28T10:14:44+00:00' custom_id: null first_visited_time: '2023-04-28T10:14:44+00:00' last_visited_time: '2023-04-28T10:14:44+00:00' updated_time: '2023-04-28T10:14:44+00:00' visits: 1 delivery_channel: email delivery_status: success email: own@email.com id: 230004 identification_number: 10034544-0066 my_participant: true name: First Last organizer: false phone_number: '+111222333444' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: Sales Manager two_step_authentication_method: none type: company - _private_ownerside: created_time: '2023-04-28T10:14:44+00:00' updated_time: '2023-04-28T10:14:44+00:00' country_code: SE id: 470005 identification_number: 11223344-5599 my_party: false name: Test Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-28T10:14:44+00:00' custom_id: null first_visited_time: null last_visited_time: null updated_time: '2023-04-28T10:14:44+00:00' visits: 0 delivery_channel: email delivery_status: success email: companymem@email.com id: 230005 identification_number: 10034544-0099 my_participant: false name: Member Name organizer: false phone_number: '+111222333777' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: company published_time: null sign_later: true sign_order: [] signing_period_expiry_time: null state: draft state_updated_time: '2023-04-28T10:14:44+00:00' tags: [] updated_time: '2023-04-28T10:15:44+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. /contracts/create: post: x-tag: Contract summary: Create a contract operationId: public_api.api.v1.contract_create.handler description: Use this endpoint to create a new contract based on the selected template. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: type: string format: email example: john.doe@oneflow.com requestBody: description: Request body parameters for creating a contract. required: true content: application/json: schema: type: object additionalProperties: false description: Request body for a create contract request. required: - workspace_id - template_id properties: workspace_id: description: The unique ID of the workspace. type: integer format: signed_integer_id example: 130001 template_id: description: The unique ID of the template. type: integer format: signed_integer_id example: 170001 data_fields: description: The data fields to be included in the contract. type: array items: type: object additionalProperties: false description: Data fields for the contract. required: - custom_id - value properties: custom_id: description: The unique name that was given to the data field when it was added to the template type. type: string minLength: 1 maxLength: 100 example: custom_id_first_name value: description: The value that will be displayed in the contract for the data field. nullable: true type: string maxLength: 1024 example: First Name my_party: description: Legal entity representing the party of the current user's Oneflow account (the owner side party). type: object additionalProperties: false required: - participants properties: _private_ownerside: type: object additionalProperties: false description: Contract party attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true country_code: description: The country of the contract party. type: string format: country_code creator_inherit_settings_from_template: description: Controls if the creator of the contract will inherit the contract roles and permissions from the template setting 'Default Creator Role' when the creator is explicitly included in the list of participants. If the creator is omitted from the list of participants then the roles and permissions are inherited from the template regardless of the value of this field. Note that when this setting is True then the role and permission fields (organizer, signatory and the 'contract:update' permission) are ignored on the creator participant type: boolean default: false identification_number: description: The unique organization number of the contract party. type: string minLength: 0 maxLength: 25 name: description: The name of the owner side party. type: string minLength: 1 maxLength: 100 participants: description: The list of participants in the owner side party. type: array items: type: object additionalProperties: false required: - email description: Represents a person in a contract, see [Participant](doc:participant). properties: _permissions: type: object additionalProperties: false description: Defines permissions for the participant on the contract. default: contract:update: false nullable: false required: - contract:update properties: contract:update: description: If set to true, the participant is allowed to update the contract. type: boolean default: false _private_ownerside: type: object additionalProperties: false description: Contract participant attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true email: description: The email of the contract participant. Note that the email must belong to an active user in your Oneflow account. type: string format: email example: own@email.com identification_number: description: The social security number of the participant. type: string minLength: 0 maxLength: 25 name: description: The name of the participant. type: string minLength: 1 maxLength: 100 organizer: description: If true, the participant is the organizer of the contract. type: boolean default: false phone_number: description: The phone number of the participant. type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign signatory: description: If true, the participant becomes the signatory of the contract. type: boolean default: false title: description: The title of the participant. type: string maxLength: 100 name: type: string minLength: 0 maxLength: 130 parties: type: array description: The list of parties in the contract, representing companies, organizations, government departments, etc. Each party object must follow the object representation of either the individual or the company type of party. minItems: 0 maxItems: 40 items: oneOf: - title: Individual description: The contract party of the individual type with a single participant who signs the contract on his or her own behalf. type: object additionalProperties: false required: - participant - type properties: _private_ownerside: type: object additionalProperties: false description: Contract party attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true country_code: description: The country code of the individual contract party. type: string format: country_code participant: type: object additionalProperties: false required: - delivery_channel - name description: The person who represents in a contract, see [Particant](doc:participant). properties: _permissions: type: object additionalProperties: false description: Defines permissions for the participant on the contract. default: contract:update: false nullable: false required: - contract:update properties: contract:update: description: If set to true, the participant is allowed to update the contract. type: boolean default: false _private_ownerside: type: object additionalProperties: false description: Contract participant attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown email: description: The participant's email. An email is required in case of an owner-side participant or if the delivery channel is `email`. type: string format: email identification_number: description: The social security number of the participant. type: string minLength: 0 maxLength: 25 name: description: The participant's name. type: string minLength: 1 maxLength: 100 example: Firstname Lastname phone_number: description: The participant's phone number. If the delivery channel is `phone number`, then the participant's phone number is required. type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign signatory: description: If true, the participant can sign the contract. type: boolean default: false title: description: The title of the participant. type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `individual`. enum: - individual - title: Company description: The contract party with the company type is a legal entity involved in the contract. More than one participant can sign a contract on behalf of the party with the company type. type: object additionalProperties: false required: - name - participants - type properties: _private_ownerside: type: object additionalProperties: false description: Contract party attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true country_code: description: The country code of the contract party. type: string format: country_code identification_number: description: The unique organization number of the contract party. type: string minLength: 0 maxLength: 25 name: description: The name of the contract party. type: string minLength: 1 maxLength: 100 example: Company AB participants: description: The list of the contract party participants. type: array minItems: 1 items: type: object additionalProperties: false required: - delivery_channel - name description: The person who represents in a contract, see [Particant](doc:participant). properties: _permissions: type: object additionalProperties: false description: Defines permissions for the participant on the contract. default: contract:update: false nullable: false required: - contract:update properties: contract:update: description: If set to true, the participant is allowed to update the contract. type: boolean default: false _private_ownerside: type: object additionalProperties: false description: Contract participant attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown email: description: The participant's email. An email is required in case of an owner-side participant or if the delivery channel is `email`. type: string format: email identification_number: description: The social security number of the participant. type: string minLength: 0 maxLength: 25 name: description: The participant's name. type: string minLength: 1 maxLength: 100 example: Firstname Lastname phone_number: description: The participant's phone number. If the delivery channel is `phone number`, then the participant's phone number is required. type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign signatory: description: If true, the participant can sign the contract. type: boolean default: false title: description: The title of the participant. type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `company`. enum: - company type: object discriminator: propertyName: type mapping: individual: contract_party_individual.yml company: contract_party_company.yml product_groups: description: The list of product groups (product tables) in the template or contract. It is possible to add products to multiple product groups if these product groups exist in the template. Ensure that the template for your contract contains at least one product table. Otherwise, the product_groups setting will fail. Note that if your template contains only one product table, it is not mandatory to include the product group id in the request. Note that by default, the limit for products per contract is 150 (includes all product tables). This can be increased for your account if desired by contacting Oneflow support. type: array items: additionalProperties: false description: A product group represents a product table in the contract, see [Product Group](doc:product-group). type: object properties: _private_ownerside: type: object additionalProperties: false description: Contract product group attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true configuration: type: object additionalProperties: false description: A contract product group configuration. properties: columns: type: array description: List of configuration of product group columns items: type: object additionalProperties: false required: - key description: Product group columns data. properties: enabled: description: If true, the column is enable. type: boolean default: true key: description: One of the product group column keys. type: string enum: - name - description - price_1 - price_2 - count label: description: The product group colum label. type: string maxLength: 130 counterpart_edit: type: boolean description: If true, the counterpart can edit products in the contract. hide_price_summation: type: boolean description: If true, the price summation will be hidden. default: false price_affixes: type: object additionalProperties: false description: Postfix and prefix of a contract product price. properties: postfix: description: The product price postfix. type: string maxLength: 30 prefix: description: The product price prefix. type: string maxLength: 30 id: type: integer format: signed_integer_id products: description: The array of products in this group. type: array items: type: object additionalProperties: false description: An individual product in a contract's product table. properties: _private_ownerside: type: object additionalProperties: false description: Contract product attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true counterparty_lock: type: boolean description: If true, the counterpart can edit products in the contract. default: false description: type: string description: The product description. minLength: 0 maxLength: 3000 id: type: integer description: The product ID. format: signed_integer_id name: type: string description: The product name. When creating a new product, it is mandatory to provide a product name. minLength: 1 maxLength: 80 price_1: description: The object holds all price-related information for an individual product. Note that base_amount must be larger than discount_amount, except if the base_amount is 0, which is an exception to allow negative prices. See [Products](doc:product-group#products). type: object additionalProperties: false nullable: true properties: base_amount: description: The base price of one item of this kind of product without considering discounts. type: object properties: amount: description: An amount specifying the base price. type: string format: amount nullable: true discount_amount: description: The discount on the base price. type: object properties: amount: description: An amount specifying the discount. type: string format: amount nullable: true discount_percent: description: The discount percentage is a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: The object holds all price-related information for an individual product. Note that base_amount must be larger than discount_amount, except if the base_amount is 0, which is an exception to allow negative prices. See [Products](doc:product-group#products). type: object additionalProperties: false nullable: true properties: base_amount: description: The base price of one item of this kind of product without considering discounts. type: object properties: amount: description: An amount specifying the base price. type: string format: amount nullable: true discount_amount: description: The discount on the base price. type: object properties: amount: description: An amount specifying the discount. type: string format: amount nullable: true discount_percent: description: The discount percentage is a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity tags: type: array description: List of tags for contract. items: type: object additionalProperties: false required: - id properties: id: type: integer format: signed_integer_id example: 380001 value: type: object description: The deal size of a contract as an amount of money. additionalProperties: false required: - amount nullable: true properties: amount: description: An amount specifying the total value. type: string format: amount example: '500.10' examples: contractCreateRequestExample: value: workspace_id: 130001 template_id: 170001 data_fields: - custom_id: custom_id_first_name value: Foo my_party: _private_ownerside: custom_id: custom_id_party_1 country_code: SE identification_number: 11223344-5566 name: Own Company AB participants: - _permissions: contract:update: true email: own@email.com identification_number: 10034544-0066 name: First Last organizer: false phone_number: '+111222333444' signatory: true sign_method: standard_esign title: Sales Manager name: My First Contract parties: - _private_ownerside: custom_id: custom_id_party_1 - country_code: SE identification_number: 11223344-5577 name: Company AB participants: - _permissions: contract:update: true _private_ownerside: custom_id: custom_id_participant_1 delivery_channel: email email: mem@email.com identification_number: 10034544-0077 name: Firstname Lastname phone_number: '+111222333555' sign_method: standard_esign signatory: true two_step_authentication_method: email type: company - country_code: SE participant: _permissions: contract:update: true delivery_channel: email email: individual@email.com identification_number: 10034544-0088 name: Firstname2 Lastname2 phone_number: '+111222333666' sign_method: standard_esign signatory: true two_step_authentication_method: email type: individual product_groups: - _private_ownerside: custom_id: custom_id_product_group_1 configuration: columns: - enabled: true key: name label: ProductX - enabled: true key: count label: ValueX counterpart_edit: false hide_price_summation: false price_affixes: prefix: Rs products: - _private_ownerside: custom_id: CUSTOM_ID_PRODUCT_1 counterparty_lock: false description: shiny shoes for sunny saunters name: shoes price_1: base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' quantity: amount: 1 type: multiple_choice tags: - id: 380001 - id: 380002 value: amount: '500.10' responses: '200': description: Returns the created [contract](contract). content: application/json: schema: type: object additionalProperties: false description: See [Contract](doc:contract). required: - _permissions - _private - _private_ownerside - attachment_file_groups - available_options - data_fields - id - lifecycle_settings - lifecycle_state - parties - pdf_file_groups - product_groups - published_time - sign_order - signing_period_expiry_time - state - state_updated_time - tags - updated_time properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for various operations possible on the contract. The format of the permission is 'contract:' followed by the specific operation, like 'contract:create.' required: - contract:delete - contract:download:pdf - contract:send properties: contract:delete: type: boolean contract:download:pdf: type: boolean contract:send: type: boolean _integration_permissions: type: array additionalProperties: false description: A list of integration specific permissions. This exists only for specific integration tokens items: type: object additionalProperties: false required: - key - value properties: key: type: string value: type: string _private: type: object description: See [Private](doc:contract#private) required: - date_format - value - folder - name - signing_period_expiration - workspace_id properties: date_format: description: The date format of the contract. type: string value: type: object description: See [Contract value](doc:contract#value). required: - amount - currency nullable: true properties: amount: type: string format: amount currency: type: string format: currency folder: additionalProperties: false required: - id - name - parent_id - path description: A folder. properties: id: description: Folder ID type: integer format: signed_integer_id name: description: Folder name. type: string parent_id: description: If exist any parent folder, its ID. type: integer format: signed_integer_id nullable: true path: description: An array of folder IDs representing the path from the top of the hierarchy to the current folder. type: array items: type: integer format: signed_integer_id name: description: The name of the contract. type: string minLength: 0 maxLength: 130 signing_period_expiration: discriminator: propertyName: type oneOf: - type: object additionalProperties: false description: The signing period for this contract never expires required: - type properties: type: type: string description: Can only be 'never'. enum: - never - type: object additionalProperties: false description: The signing period for this contract expires a given number of days after publishing. This setting can only be used when the contract is in the draft stage. Converts into a "fixed_date" after the contract is published. required: - type - expire_days_after_publish properties: type: type: string description: Can only be 'days_after_publish'. enum: - days_after_publish expire_days_after_publish: type: integer minimum: 1 - type: object additionalProperties: false description: The signing period for this contract expires on a set date. required: - type - expire_date properties: type: type: string description: Can only be 'fixed_date'. enum: - fixed_date expire_date: type: string format: date workspace_id: description: The unique id of this workspace. type: integer format: signed_integer_id nullable: true single_sign: description: State of the feature single sign type: boolean format: single_sign _private_ownerside: type: object description: Contract data that is private to the ownerside. nullable: true required: - created_time - template_id - template_type_id properties: created_time: type: string format: datetime template_id: type: integer format: signed_integer_id nullable: true template_type_id: type: integer format: signed_integer_id nullable: true attachment_file_groups: type: array description: A list of attachment type file groups in the contract. items: description: A file group represents an expanded PDF session or attachment session in the contract. type: object additionalProperties: false required: - _private_ownerside - files - id - type properties: _private_ownerside: type: object description: File group data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true files: type: array items: type: object additionalProperties: false description: A single file of the contract file group. required: - _private_ownerside - extension - id - name - size properties: _private_ownerside: type: object description: File data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true extension: description: The file extension. type: string nullable: true id: type: integer format: signed_integer_id name: description: The name of the file. type: string nullable: true size: description: The size of the file in bytes. type: integer nullable: true id: type: integer format: unsigned_integer_id type: type: string description: The file group type of the file group sections. There are only two types available, `attachment` and `pdf`. enum: - attachment - pdf available_options: type: object additionalProperties: false description: Available options in the contract. See [Available options](doc:contract#available-options). required: - can_receive_attachments - can_receive_expanded_pdf - can_receive_products - delivery_channels - sign_methods - two_step_authentication_methods properties: can_receive_attachments: type: boolean can_receive_expanded_pdf: type: boolean can_receive_products: type: boolean delivery_channels: type: array items: description: See [Delivery channel options](contract#delivery-channels). type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string sign_methods: type: array items: description: This attribute is only allowed for participants with the role signatory. For signatories it is required. Note that the participant role defaults to signatory. See [Contract sign methods](doc:contract#sign-methods). type: object additionalProperties: false required: - name - preferred properties: name: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown preferred: type: boolean two_step_authentication_methods: type: array items: description: See [Two-step authentication methods](doc:contract#two-step-authentication-methods) type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string data_fields: type: array description: The data fields that are part of the contract. items: type: object additionalProperties: false description: See [Data field](doc:data-field). required: - _private_ownerside - description - id - name - placeholder - value properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object additionalProperties: false description: Data field attributes that are private to the ownerside. required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true description: type: string minLength: 0 maxLength: 300 id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 placeholder: type: string minLength: 0 maxLength: 100 value: type: string minLength: 0 id: type: integer format: signed_integer_id lifecycle_settings: type: object description: See [Lifecycle settings](lifecycle-settings). required: - duration - end_date - initial_duration - notice_period - start_date - type additionalProperties: false nullable: true properties: duration: type: string format: duration nullable: true end_date: type: string format: date nullable: true initial_duration: type: string format: duration nullable: true notice_period: type: string format: duration nullable: true start_date: type: string format: date nullable: true type: type: string description: One of the contract [duration types](contract#duration-type). enum: - no_duration - single_period - recurring - recurring_two_periods - unknown lifecycle_state: type: object additionalProperties: false description: Lifecycle information of the contract. See [Lifecycle state](doc:contract#lifecycle-state). nullable: true required: - composite - contract_end_time - contract_start_time - cancel_time - has_ended_by_termination - has_passed_notice_period_start_time - is_canceled - is_recurring - lifecycle_state - lifecycle_state_updated_time - notice_period_start_time - period - period_end_time - period_start_time properties: composite: type: string description: One of the [lifecycle composites](contract#lifecycle-composite). enum: - awaiting - awaiting-recurring - active - active-recurring - active-canceled-recurring - ended - ended-terminated - ended-terminated-recurring contract_end_time: type: string format: datetime nullable: true contract_start_time: type: string format: datetime nullable: true cancel_time: type: string format: datetime nullable: true has_ended_by_termination: type: boolean has_passed_notice_period_start_time: type: boolean is_canceled: type: boolean is_recurring: type: boolean lifecycle_state: type: string description: One of the [lifecycle states](ccontract#lifecycle-states). enum: - awaiting - active - ended - unknown lifecycle_state_updated_time: type: string format: datetime notice_period_start_time: type: string format: datetime nullable: true period: type: integer nullable: true period_end_time: type: string format: datetime nullable: true period_start_time: type: string format: datetime nullable: true links: type: array description: All links on the contract. (links is only available in the Get a contract by ID response) items: oneOf: - description: Internal contract link. title: Internal type: object additionalProperties: false required: - id - linked_contract - type properties: id: type: integer format: signed_integer_id linked_contract: type: integer format: signed_integer_id type: type: string description: One of the [link types](contract#links). enum: - amends - amended_by - sub_contract - main_contract - replaced_by - replaces - relates_to - description: External contract link. title: External type: object additionalProperties: false required: - id - type - external_link - external_title properties: id: type: integer format: signed_integer_id type: description: Can only be `external` of the [link types](contract#links). type: string enum: - external external_link: type: string minLength: 1 maxLength: 1024 external_title: type: string minLength: 1 maxLength: 130 parties: type: array description: The parties involved in this contract. items: oneOf: - title: Individual description: An individual party, where a single participant is signing on behalf of him- or herself. See [Individual party](doc:party#individual) type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participant - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true participant: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `individual`. enum: - individual - title: Company description: The participants are signing on behalf of this company. See [Company party](doc:party#company). type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participants - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 participants: description: The maximum number of participants per contract across all parties is 40. type: array items: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `company`. enum: - company discriminator: propertyName: type mapping: individual: contract_party_individual.yml company: contract_party_company.yml pdf_file_groups: type: array description: A list of expanded pdf type file groups in the contract. items: description: A file group represents an expanded PDF session or attachment session in the contract. type: object additionalProperties: false required: - _private_ownerside - files - id - type properties: _private_ownerside: type: object description: File group data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true files: type: array items: type: object additionalProperties: false description: A single file of the contract file group. required: - _private_ownerside - extension - id - name - size properties: _private_ownerside: type: object description: File data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true extension: description: The file extension. type: string nullable: true id: type: integer format: signed_integer_id name: description: The name of the file. type: string nullable: true size: description: The size of the file in bytes. type: integer nullable: true id: type: integer format: unsigned_integer_id type: type: string description: The file group type of the file group sections. There are only two types available, `attachment` and `pdf`. enum: - attachment - pdf product_groups: description: A list of product groups. type: array items: description: A product group represents a product table in the contract, see [Product group](doc:product-group). type: object additionalProperties: false required: - _private_ownerside - configuration - enabled_columns - id - products properties: _private_ownerside: type: object description: Product group data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true configuration: type: object additionalProperties: false description: Updated product group configuration properties: columns: type: array items: type: object additionalProperties: false description: Product group columns data. required: - key properties: enabled: type: boolean key: description: One of the product group column keys. type: string enum: - name - description - price_1 - price_2 - count label: type: string counterpart_edit: type: boolean hide_price_summation: type: boolean price_affixes: type: object additionalProperties: false description: Postfix and prefix of a contract product price. properties: postfix: type: string prefix: type: string created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true enabled_columns: type: array items: type: object additionalProperties: false description: An individual product table columns enable information. required: - enabled - key properties: enabled: type: boolean key: type: string minLength: 0 maxLength: 80 id: type: integer format: unsigned_integer_id products: type: array items: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity published_time: type: string format: datetime nullable: true sign_later: description: A flag to indicate if the contract signing is postponed. type: boolean sign_order: type: array description: Sign order of the participants. items: type: object additionalProperties: false required: - participant_id - order properties: participant_id: type: integer format: signed_integer_id description: participant ID order: type: integer minimum: 1 maximum: 40 description: Sign order signing_period_expiry_time: type: string format: datetime nullable: true state: type: string description: One of the [contract states](contract#contract-state). enum: - draft - pending - overdue - signed - declined - unknown state_updated_time: type: string format: datetime tags: type: array description: All tags associated with the contract. items: type: object additionalProperties: false required: - id - name properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 updated_time: type: string format: datetime nullable: true examples: contractCreateResponseExample: description: 'A sample contract with parties and products:' value: _integration_permissions: [] _links: comments: href: https://api.oneflow.com/v1/contracts/10001/comments data_fields: href: https://api.oneflow.com/v1/contracts/10001/data_fields events: href: https://api.oneflow.com/v1/contracts/10001/events files: href: https://api.oneflow.com/v1/contracts/10001/files parties: href: https://api.oneflow.com/v1/contracts/10001/parties publish: href: https://api.oneflow.com/v1/contracts/10001/publish self: href: https://api.oneflow.com/v1/contracts/10001 template: href: https://api.oneflow.com/v1/templates/170001 template_type: href: https://api.oneflow.com/v1/template_types/220001 workspace: href: https://api.oneflow.com/v1/workspaces/130001 _permissions: contract:delete: true contract:download:pdf: true contract:send: true _private: name: My First Contract signing_period_expiration: expire_days_after_publish: 14 type: days_after_publish value: amount: '500.10' currency: SEK workspace_id: 130001 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' template_id: 170001 template_type_id: 220001 attachment_file_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' files: [] id: 920001 type: attachment available_options: can_receive_attachments: true can_receive_expanded_pdf: true can_receive_products: true delivery_channels: - name: email preferred: true required_participant_attributes: - email - name: none preferred: false required_participant_attributes: [] - name: same_device preferred: false required_participant_attributes: - sign_method - name: sms preferred: false required_participant_attributes: - phone_number sign_methods: - name: finnish_bankid preferred: false - name: sms preferred: false - name: standard_esign preferred: true - name: swedish_bankid preferred: false two_step_authentication_methods: - name: email preferred: false required_participant_attributes: - email - name: none preferred: true required_participant_attributes: [] - name: sms preferred: false required_participant_attributes: - phone_number data_fields: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_first_name updated_time: '2023-04-27T11:29:36+00:00' description: firstname of the person id: 140001 name: First Name placeholder: firstname placeholder value: Foo - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_last_name updated_time: '2023-04-27T11:29:36+00:00' description: lastname of the person id: 140002 name: Last Name placeholder: lastname placeholder value: '' id: 10001 lifecycle_settings: duration: 12m end_date: null initial_duration: null notice_period: 3m start_date: null type: recurring lifecycle_state: null parties: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470001 identification_number: 11223344-5566 my_party: true name: Own Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: '2023-04-27T11:29:36+00:00' last_visited_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' visits: 1 delivery_channel: email delivery_status: success email: own@email.com id: 230001 identification_number: 10034544-0066 my_participant: true name: First Last organizer: false phone_number: '+111222333444' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: Sales Manager two_step_authentication_method: none type: company - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470002 identification_number: 11223344-5577 my_party: false name: Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_participant_1 first_visited_time: null last_visited_time: null updated_time: '2023-04-27T11:29:36+00:00' visits: 0 delivery_channel: email delivery_status: success email: mem@email.com id: 230002 identification_number: 10034544-0077 my_participant: false name: Firstname Lastname organizer: false phone_number: '+111222333555' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: company - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470003 identification_number: 10034544-0088 my_party: false name: Firstname2 Lastname2 participant: _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: null last_visited_time: null updated_time: '2023-04-27T11:29:36+00:00' visits: 0 delivery_channel: email delivery_status: success email: individual@email.com id: 230003 identification_number: 10034544-0088 my_participant: false name: Firstname2 Lastname2 organizer: false phone_number: '+111222333666' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: individual pdf_file_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' files: [] id: 920002 type: pdf product_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_product_group_1 updated_time: '2023-04-27T11:29:36+00:00' configuration: columns: - enabled: true key: name label: ProductX - enabled: true key: description label: Description - enabled: true key: price_1 label: Price 1 - enabled: true key: price_2 label: Price 2 - enabled: true key: count label: ValueX counterpart_edit: false hide_price_summation: false price_affixes: postfix: '' prefix: Rs created_from: 85001 enabled_columns: - enabled: true key: name - enabled: true key: description - enabled: true key: price_1 - enabled: true key: price_2 - enabled: true key: count id: 85011 products: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: CUSTOM_ID_PRODUCT_1 updated_time: '2023-04-27T11:29:36+00:00' counterparty_lock: false created_from: null description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice published_time: null sign_order: [] signing_period_expiry_time: null state: draft state_updated_time: '2023-04-27T11:29:36+00:00' tags: - id: 380001 name: tag one - id: 380002 name: tag two updated_time: '2023-04-27T11:29:36+00:00' '400': description: Invalid format or content of the request. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /contracts/{contract_id}: get: x-tag: Contract summary: Get a contract by ID operationId: public_api.api.v1.contract_get.handler description: Use this endpoint to retrieve a specific contract by its ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 responses: '200': description: Returns the requested [contract](contract). content: application/json: schema: type: object additionalProperties: false description: See [Contract](doc:contract). required: - _permissions - _private - _private_ownerside - attachment_file_groups - available_options - data_fields - id - lifecycle_settings - lifecycle_state - parties - pdf_file_groups - product_groups - published_time - sign_order - signing_period_expiry_time - state - state_updated_time - tags - updated_time properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for various operations possible on the contract. The format of the permission is 'contract:' followed by the specific operation, like 'contract:create.' required: - contract:delete - contract:download:pdf - contract:send properties: contract:delete: type: boolean contract:download:pdf: type: boolean contract:send: type: boolean _integration_permissions: type: array additionalProperties: false description: A list of integration specific permissions. This exists only for specific integration tokens items: type: object additionalProperties: false required: - key - value properties: key: type: string value: type: string _private: type: object description: See [Private](doc:contract#private) required: - date_format - value - folder - name - signing_period_expiration - workspace_id properties: date_format: description: The date format of the contract. type: string value: type: object description: See [Contract value](doc:contract#value). required: - amount - currency nullable: true properties: amount: type: string format: amount currency: type: string format: currency folder: additionalProperties: false required: - id - name - parent_id - path description: A folder. properties: id: description: Folder ID type: integer format: signed_integer_id name: description: Folder name. type: string parent_id: description: If exist any parent folder, its ID. type: integer format: signed_integer_id nullable: true path: description: An array of folder IDs representing the path from the top of the hierarchy to the current folder. type: array items: type: integer format: signed_integer_id name: description: The name of the contract. type: string minLength: 0 maxLength: 130 signing_period_expiration: discriminator: propertyName: type oneOf: - type: object additionalProperties: false description: The signing period for this contract never expires required: - type properties: type: type: string description: Can only be 'never'. enum: - never - type: object additionalProperties: false description: The signing period for this contract expires a given number of days after publishing. This setting can only be used when the contract is in the draft stage. Converts into a "fixed_date" after the contract is published. required: - type - expire_days_after_publish properties: type: type: string description: Can only be 'days_after_publish'. enum: - days_after_publish expire_days_after_publish: type: integer minimum: 1 - type: object additionalProperties: false description: The signing period for this contract expires on a set date. required: - type - expire_date properties: type: type: string description: Can only be 'fixed_date'. enum: - fixed_date expire_date: type: string format: date workspace_id: description: The unique id of this workspace. type: integer format: signed_integer_id nullable: true single_sign: description: State of the feature single sign type: boolean format: single_sign _private_ownerside: type: object description: Contract data that is private to the ownerside. nullable: true required: - created_time - template_id - template_type_id properties: created_time: type: string format: datetime template_id: type: integer format: signed_integer_id nullable: true template_type_id: type: integer format: signed_integer_id nullable: true attachment_file_groups: type: array description: A list of attachment type file groups in the contract. items: description: A file group represents an expanded PDF session or attachment session in the contract. type: object additionalProperties: false required: - _private_ownerside - files - id - type properties: _private_ownerside: type: object description: File group data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true files: type: array items: type: object additionalProperties: false description: A single file of the contract file group. required: - _private_ownerside - extension - id - name - size properties: _private_ownerside: type: object description: File data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true extension: description: The file extension. type: string nullable: true id: type: integer format: signed_integer_id name: description: The name of the file. type: string nullable: true size: description: The size of the file in bytes. type: integer nullable: true id: type: integer format: unsigned_integer_id type: type: string description: The file group type of the file group sections. There are only two types available, `attachment` and `pdf`. enum: - attachment - pdf available_options: type: object additionalProperties: false description: Available options in the contract. See [Available options](doc:contract#available-options). required: - can_receive_attachments - can_receive_expanded_pdf - can_receive_products - delivery_channels - sign_methods - two_step_authentication_methods properties: can_receive_attachments: type: boolean can_receive_expanded_pdf: type: boolean can_receive_products: type: boolean delivery_channels: type: array items: description: See [Delivery channel options](contract#delivery-channels). type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string sign_methods: type: array items: description: This attribute is only allowed for participants with the role signatory. For signatories it is required. Note that the participant role defaults to signatory. See [Contract sign methods](doc:contract#sign-methods). type: object additionalProperties: false required: - name - preferred properties: name: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown preferred: type: boolean two_step_authentication_methods: type: array items: description: See [Two-step authentication methods](doc:contract#two-step-authentication-methods) type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string data_fields: type: array description: The data fields that are part of the contract. items: type: object additionalProperties: false description: See [Data field](doc:data-field). required: - _private_ownerside - description - id - name - placeholder - value properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object additionalProperties: false description: Data field attributes that are private to the ownerside. required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true description: type: string minLength: 0 maxLength: 300 id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 placeholder: type: string minLength: 0 maxLength: 100 value: type: string minLength: 0 id: type: integer format: signed_integer_id lifecycle_settings: type: object description: See [Lifecycle settings](lifecycle-settings). required: - duration - end_date - initial_duration - notice_period - start_date - type additionalProperties: false nullable: true properties: duration: type: string format: duration nullable: true end_date: type: string format: date nullable: true initial_duration: type: string format: duration nullable: true notice_period: type: string format: duration nullable: true start_date: type: string format: date nullable: true type: type: string description: One of the contract [duration types](contract#duration-type). enum: - no_duration - single_period - recurring - recurring_two_periods - unknown lifecycle_state: type: object additionalProperties: false description: Lifecycle information of the contract. See [Lifecycle state](doc:contract#lifecycle-state). nullable: true required: - composite - contract_end_time - contract_start_time - cancel_time - has_ended_by_termination - has_passed_notice_period_start_time - is_canceled - is_recurring - lifecycle_state - lifecycle_state_updated_time - notice_period_start_time - period - period_end_time - period_start_time properties: composite: type: string description: One of the [lifecycle composites](contract#lifecycle-composite). enum: - awaiting - awaiting-recurring - active - active-recurring - active-canceled-recurring - ended - ended-terminated - ended-terminated-recurring contract_end_time: type: string format: datetime nullable: true contract_start_time: type: string format: datetime nullable: true cancel_time: type: string format: datetime nullable: true has_ended_by_termination: type: boolean has_passed_notice_period_start_time: type: boolean is_canceled: type: boolean is_recurring: type: boolean lifecycle_state: type: string description: One of the [lifecycle states](ccontract#lifecycle-states). enum: - awaiting - active - ended - unknown lifecycle_state_updated_time: type: string format: datetime notice_period_start_time: type: string format: datetime nullable: true period: type: integer nullable: true period_end_time: type: string format: datetime nullable: true period_start_time: type: string format: datetime nullable: true links: type: array description: All links on the contract. (links is only available in the Get a contract by ID response) items: oneOf: - description: Internal contract link. title: Internal type: object additionalProperties: false required: - id - linked_contract - type properties: id: type: integer format: signed_integer_id linked_contract: type: integer format: signed_integer_id type: type: string description: One of the [link types](contract#links). enum: - amends - amended_by - sub_contract - main_contract - replaced_by - replaces - relates_to - description: External contract link. title: External type: object additionalProperties: false required: - id - type - external_link - external_title properties: id: type: integer format: signed_integer_id type: description: Can only be `external` of the [link types](contract#links). type: string enum: - external external_link: type: string minLength: 1 maxLength: 1024 external_title: type: string minLength: 1 maxLength: 130 parties: type: array description: The parties involved in this contract. items: oneOf: - title: Individual description: An individual party, where a single participant is signing on behalf of him- or herself. See [Individual party](doc:party#individual) type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participant - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true participant: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `individual`. enum: - individual - title: Company description: The participants are signing on behalf of this company. See [Company party](doc:party#company). type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participants - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 participants: description: The maximum number of participants per contract across all parties is 40. type: array items: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `company`. enum: - company discriminator: propertyName: type mapping: individual: contract_party_individual.yml company: contract_party_company.yml pdf_file_groups: type: array description: A list of expanded pdf type file groups in the contract. items: description: A file group represents an expanded PDF session or attachment session in the contract. type: object additionalProperties: false required: - _private_ownerside - files - id - type properties: _private_ownerside: type: object description: File group data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true files: type: array items: type: object additionalProperties: false description: A single file of the contract file group. required: - _private_ownerside - extension - id - name - size properties: _private_ownerside: type: object description: File data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true extension: description: The file extension. type: string nullable: true id: type: integer format: signed_integer_id name: description: The name of the file. type: string nullable: true size: description: The size of the file in bytes. type: integer nullable: true id: type: integer format: unsigned_integer_id type: type: string description: The file group type of the file group sections. There are only two types available, `attachment` and `pdf`. enum: - attachment - pdf product_groups: description: A list of product groups. type: array items: description: A product group represents a product table in the contract, see [Product group](doc:product-group). type: object additionalProperties: false required: - _private_ownerside - configuration - enabled_columns - id - products properties: _private_ownerside: type: object description: Product group data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true configuration: type: object additionalProperties: false description: Updated product group configuration properties: columns: type: array items: type: object additionalProperties: false description: Product group columns data. required: - key properties: enabled: type: boolean key: description: One of the product group column keys. type: string enum: - name - description - price_1 - price_2 - count label: type: string counterpart_edit: type: boolean hide_price_summation: type: boolean price_affixes: type: object additionalProperties: false description: Postfix and prefix of a contract product price. properties: postfix: type: string prefix: type: string created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true enabled_columns: type: array items: type: object additionalProperties: false description: An individual product table columns enable information. required: - enabled - key properties: enabled: type: boolean key: type: string minLength: 0 maxLength: 80 id: type: integer format: unsigned_integer_id products: type: array items: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity published_time: type: string format: datetime nullable: true sign_later: description: A flag to indicate if the contract signing is postponed. type: boolean sign_order: type: array description: Sign order of the participants. items: type: object additionalProperties: false required: - participant_id - order properties: participant_id: type: integer format: signed_integer_id description: participant ID order: type: integer minimum: 1 maximum: 40 description: Sign order signing_period_expiry_time: type: string format: datetime nullable: true state: type: string description: One of the [contract states](contract#contract-state). enum: - draft - pending - overdue - signed - declined - unknown state_updated_time: type: string format: datetime tags: type: array description: All tags associated with the contract. items: type: object additionalProperties: false required: - id - name properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 updated_time: type: string format: datetime nullable: true examples: contractResponseExample: description: 'A sample contract with parties and products:' value: _integration_permissions: [] _links: comments: href: https://api.oneflow.com/v1/contracts/10001/comments data_fields: href: https://api.oneflow.com/v1/contracts/10001/data_fields events: href: https://api.oneflow.com/v1/contracts/10001/events files: href: https://api.oneflow.com/v1/contracts/10001/files parties: href: https://api.oneflow.com/v1/contracts/10001/parties publish: href: https://api.oneflow.com/v1/contracts/10001/publish self: href: https://api.oneflow.com/v1/contracts/10001 template: href: https://api.oneflow.com/v1/templates/170001 template_type: href: https://api.oneflow.com/v1/template_types/220001 workspace: href: https://api.oneflow.com/v1/workspaces/130001 _permissions: contract:delete: true contract:download:pdf: true contract:send: false _private: name: My First Contract signing_period_expiration: expire_date: '2023-05-11' type: fixed_date value: amount: '500.10' currency: SEK workspace_id: 130001 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' template_id: 170001 template_type_id: 220001 attachment_file_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T17:59:12+00:00' files: - _private_ownerside: created_time: '2023-04-27T17:59:12+00:00' updated_time: '2023-04-27T17:59:20+00:00' extension: docx id: 1200001 name: attachment_sample_doc size: 4168 - _private_ownerside: created_time: '2023-04-27T17:59:12+00:00' updated_time: '2023-04-27T17:59:22+00:00' extension: pdf id: 1200002 name: attachment_sample_pdf size: 6586 id: 920001 type: attachment available_options: can_receive_attachments: false can_receive_expanded_pdf: false can_receive_products: false delivery_channels: - name: email preferred: true required_participant_attributes: - email - name: none preferred: false required_participant_attributes: [] - name: same_device preferred: false required_participant_attributes: - sign_method - name: sms preferred: false required_participant_attributes: - phone_number sign_methods: - name: finnish_bankid preferred: false - name: sms preferred: false - name: standard_esign preferred: true - name: swedish_bankid preferred: false two_step_authentication_methods: - name: email preferred: false required_participant_attributes: - email - name: none preferred: true required_participant_attributes: [] - name: sms preferred: false required_participant_attributes: - phone_number data_fields: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_first_name updated_time: '2023-04-27T11:29:36+00:00' description: firstname of the person id: 140001 name: First Name placeholder: firstname placeholder value: Foo - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_last_name updated_time: '2023-04-27T11:29:36+00:00' description: lastname of the person id: 140002 name: Last Name placeholder: lastname placeholder value: '' id: 10001 lifecycle_settings: duration: 12m end_date: null initial_duration: null notice_period: 3m start_date: null type: recurring lifecycle_state: cancel_time: null composite: active-recurring contract_end_time: null contract_start_time: '2023-04-27T18:30:00+00:00' has_ended_by_termination: false has_passed_notice_period_start_time: true is_canceled: false is_recurring: true lifecycle_state: active lifecycle_state_updated_time: '2023-04-27T18:44:07+00:00' notice_period_start_time: '2024-01-27T18:30:00+00:00' period: 1 period_end_time: '2024-04-27T18:30:00+00:00' period_start_time: '2023-04-27T18:30:00+00:00' links: - id: 1 linked_contract: 10010 type: relates_to - external_link: https://www.example.com external_title: example_title id: 2 type: external parties: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_party_1 updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470001 identification_number: 11223344-5566 my_party: true name: Own Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: '2023-04-27T11:29:36+00:00' last_visited_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T18:44:07+00:00' visits: 1 delivery_channel: email delivery_status: success email: own@email.com id: 230001 identification_number: 10034544-0066 my_participant: true name: First Last organizer: false phone_number: '+111222333444' sign_method: unknown sign_state: signed sign_state_updated_time: '2023-04-27T18:44:07+00:00' signatory: true title: Sales Manager two_step_authentication_method: none type: company - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_party_2 updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470002 identification_number: 11223344-5577 my_party: false name: Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_participant_1 first_visited_time: null last_visited_time: null updated_time: '2023-04-27T18:44:07+00:00' visits: 0 delivery_channel: email delivery_status: success email: mem@email.com id: 230002 identification_number: 10034544-0077 my_participant: false name: Firstname Lastname organizer: false phone_number: '+111222333555' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: company - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_party_3 updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470003 identification_number: 10034544-0088 my_party: false name: Firstname2 Lastname2 participant: _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: null last_visited_time: null updated_time: '2023-04-27T18:44:07+00:00' visits: 0 delivery_channel: email delivery_status: success email: individual@email.com id: 230003 identification_number: 10034544-0088 my_participant: false name: Firstname2 Lastname2 organizer: false phone_number: '+111222333666' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: individual pdf_file_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T17:59:12+00:00' files: - _private_ownerside: created_time: '2023-04-27T17:59:12+00:00' updated_time: '2023-04-27T17:59:18+00:00' extension: pdf id: 1200003 name: expanded_sample_pdf size: 6586 id: 920002 type: pdf product_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_product_group_1 updated_time: '2023-04-27T11:29:36+00:00' configuration: columns: - enabled: true key: name label: ProductX - enabled: true key: description label: Description - enabled: true key: price_1 label: Price 1 - enabled: true key: price_2 label: Price 2 - enabled: true key: count label: ValueX counterpart_edit: false hide_price_summation: false price_affixes: postfix: '' prefix: Rs enabled_columns: - enabled: true key: name - enabled: true key: description - enabled: true key: price_1 - enabled: true key: price_2 - enabled: true key: count id: 85011 products: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: CUSTOM_ID_PRODUCT_1 updated_time: '2023-04-27T11:29:36+00:00' counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice published_time: '2023-04-27T18:22:44+00:00' sign_later: false sign_order: - order: 1 participant_id: 230001 - order: 2 participant_id: 230002 - order: 3 participant_id: 230003 signing_period_expiry_time: '2023-05-12T00:00:00+00:00' state: signed state_updated_time: '2023-04-27T18:30:00+00:00' tags: - id: 380001 name: tag one - id: 380002 name: tag two updated_time: '2023-04-27T18:44:09+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. put: x-tag: Contract summary: Update a contract by ID operationId: public_api.api.v1.contract_put.handler description: Use this endpoint to update a specific contract by its ID. Note that many fields are only editable before the contract is signed. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 requestBody: description: Request body parameters for updating a contract. required: true content: application/json: schema: type: object additionalProperties: false description: Request body for an update contract request. properties: _private: type: object description: Attributes that are only visible to the party of the current user. See [Private](doc:contract#private) additionalProperties: false properties: name: description: The name of the contract. type: string minLength: 0 maxLength: 130 signing_period_expiration: discriminator: propertyName: type oneOf: - type: object title: never additionalProperties: false description: The signing period for this contract never expires. required: - type properties: type: type: string description: Can only be 'never'. example: never enum: - never default: never - type: object title: days_after_publish additionalProperties: false description: This contract expires after the specified number of days after publication. You can use this option only if the contract is in the draft stage. Once the contract is published, the system will convert this type to `fixed_date.` required: - type - expire_days_after_publish properties: type: type: string description: Can only be 'days_after_publish'. example: days_after_publish enum: - days_after_publish default: days_after_publish expire_days_after_publish: type: integer description: The number of days the contract is available for signing after it has been published. example: 14 minimum: 1 maximum: 36500 - type: object title: fixed_date additionalProperties: false description: The contract is available for signing until the specified date. required: - type - expire_date properties: type: type: string description: Can only be 'fixed_date'. example: fixed_date enum: - fixed_date default: fixed_date expire_date: type: string description: The final day the contract is valid for signing. example: '2025-01-23' format: date type: object single_sign: description: Enable or disable single sign on the contract. type: boolean value: type: object description: The deal size of a contract as an amount of money. additionalProperties: false required: - amount nullable: true properties: amount: description: An amount specifying the total value. type: string format: amount example: '500.10' sign_later: description: If set to true, the contract signing will postpone until the contract is ready. type: boolean sign_order: type: array description: Sign order of the participants. nullable: true items: type: object additionalProperties: false required: - participant_id - order properties: participant_id: type: integer format: signed_integer_id description: participant ID example: 180224 order: type: integer minimum: 1 maximum: 40 description: Sign order example: 2 tags: type: array description: list of objects of tag ids to be left in the contract items: type: object additionalProperties: false required: - id properties: id: type: integer format: signed_integer_id example: 380001 examples: contractUpdateRequestExample: value: _private: name: My First Contract Update signing_period_expiration: expire_days_after_publish: 14 type: days_after_publish value: amount: '500.10' sign_later: false sign_order: - order: 2 participant_id: 230002 - order: 1 participant_id: 230001 - order: 3 participant_id: 230003 tags: - id: 380001 - id: 380002 responses: '200': description: Returns the updated [contract](contract). content: application/json: schema: type: object additionalProperties: false description: See [Contract](doc:contract). required: - _permissions - _private - _private_ownerside - attachment_file_groups - available_options - data_fields - id - lifecycle_settings - lifecycle_state - parties - pdf_file_groups - product_groups - published_time - sign_order - signing_period_expiry_time - state - state_updated_time - tags - updated_time properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for various operations possible on the contract. The format of the permission is 'contract:' followed by the specific operation, like 'contract:create.' required: - contract:delete - contract:download:pdf - contract:send properties: contract:delete: type: boolean contract:download:pdf: type: boolean contract:send: type: boolean _integration_permissions: type: array additionalProperties: false description: A list of integration specific permissions. This exists only for specific integration tokens items: type: object additionalProperties: false required: - key - value properties: key: type: string value: type: string _private: type: object description: See [Private](doc:contract#private) required: - date_format - value - folder - name - signing_period_expiration - workspace_id properties: date_format: description: The date format of the contract. type: string value: type: object description: See [Contract value](doc:contract#value). required: - amount - currency nullable: true properties: amount: type: string format: amount currency: type: string format: currency folder: additionalProperties: false required: - id - name - parent_id - path description: A folder. properties: id: description: Folder ID type: integer format: signed_integer_id name: description: Folder name. type: string parent_id: description: If exist any parent folder, its ID. type: integer format: signed_integer_id nullable: true path: description: An array of folder IDs representing the path from the top of the hierarchy to the current folder. type: array items: type: integer format: signed_integer_id name: description: The name of the contract. type: string minLength: 0 maxLength: 130 signing_period_expiration: discriminator: propertyName: type oneOf: - type: object additionalProperties: false description: The signing period for this contract never expires required: - type properties: type: type: string description: Can only be 'never'. enum: - never - type: object additionalProperties: false description: The signing period for this contract expires a given number of days after publishing. This setting can only be used when the contract is in the draft stage. Converts into a "fixed_date" after the contract is published. required: - type - expire_days_after_publish properties: type: type: string description: Can only be 'days_after_publish'. enum: - days_after_publish expire_days_after_publish: type: integer minimum: 1 - type: object additionalProperties: false description: The signing period for this contract expires on a set date. required: - type - expire_date properties: type: type: string description: Can only be 'fixed_date'. enum: - fixed_date expire_date: type: string format: date workspace_id: description: The unique id of this workspace. type: integer format: signed_integer_id nullable: true single_sign: description: State of the feature single sign type: boolean format: single_sign _private_ownerside: type: object description: Contract data that is private to the ownerside. nullable: true required: - created_time - template_id - template_type_id properties: created_time: type: string format: datetime template_id: type: integer format: signed_integer_id nullable: true template_type_id: type: integer format: signed_integer_id nullable: true attachment_file_groups: type: array description: A list of attachment type file groups in the contract. items: description: A file group represents an expanded PDF session or attachment session in the contract. type: object additionalProperties: false required: - _private_ownerside - files - id - type properties: _private_ownerside: type: object description: File group data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true files: type: array items: type: object additionalProperties: false description: A single file of the contract file group. required: - _private_ownerside - extension - id - name - size properties: _private_ownerside: type: object description: File data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true extension: description: The file extension. type: string nullable: true id: type: integer format: signed_integer_id name: description: The name of the file. type: string nullable: true size: description: The size of the file in bytes. type: integer nullable: true id: type: integer format: unsigned_integer_id type: type: string description: The file group type of the file group sections. There are only two types available, `attachment` and `pdf`. enum: - attachment - pdf available_options: type: object additionalProperties: false description: Available options in the contract. See [Available options](doc:contract#available-options). required: - can_receive_attachments - can_receive_expanded_pdf - can_receive_products - delivery_channels - sign_methods - two_step_authentication_methods properties: can_receive_attachments: type: boolean can_receive_expanded_pdf: type: boolean can_receive_products: type: boolean delivery_channels: type: array items: description: See [Delivery channel options](contract#delivery-channels). type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string sign_methods: type: array items: description: This attribute is only allowed for participants with the role signatory. For signatories it is required. Note that the participant role defaults to signatory. See [Contract sign methods](doc:contract#sign-methods). type: object additionalProperties: false required: - name - preferred properties: name: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown preferred: type: boolean two_step_authentication_methods: type: array items: description: See [Two-step authentication methods](doc:contract#two-step-authentication-methods) type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string data_fields: type: array description: The data fields that are part of the contract. items: type: object additionalProperties: false description: See [Data field](doc:data-field). required: - _private_ownerside - description - id - name - placeholder - value properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object additionalProperties: false description: Data field attributes that are private to the ownerside. required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true description: type: string minLength: 0 maxLength: 300 id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 placeholder: type: string minLength: 0 maxLength: 100 value: type: string minLength: 0 id: type: integer format: signed_integer_id lifecycle_settings: type: object description: See [Lifecycle settings](lifecycle-settings). required: - duration - end_date - initial_duration - notice_period - start_date - type additionalProperties: false nullable: true properties: duration: type: string format: duration nullable: true end_date: type: string format: date nullable: true initial_duration: type: string format: duration nullable: true notice_period: type: string format: duration nullable: true start_date: type: string format: date nullable: true type: type: string description: One of the contract [duration types](contract#duration-type). enum: - no_duration - single_period - recurring - recurring_two_periods - unknown lifecycle_state: type: object additionalProperties: false description: Lifecycle information of the contract. See [Lifecycle state](doc:contract#lifecycle-state). nullable: true required: - composite - contract_end_time - contract_start_time - cancel_time - has_ended_by_termination - has_passed_notice_period_start_time - is_canceled - is_recurring - lifecycle_state - lifecycle_state_updated_time - notice_period_start_time - period - period_end_time - period_start_time properties: composite: type: string description: One of the [lifecycle composites](contract#lifecycle-composite). enum: - awaiting - awaiting-recurring - active - active-recurring - active-canceled-recurring - ended - ended-terminated - ended-terminated-recurring contract_end_time: type: string format: datetime nullable: true contract_start_time: type: string format: datetime nullable: true cancel_time: type: string format: datetime nullable: true has_ended_by_termination: type: boolean has_passed_notice_period_start_time: type: boolean is_canceled: type: boolean is_recurring: type: boolean lifecycle_state: type: string description: One of the [lifecycle states](ccontract#lifecycle-states). enum: - awaiting - active - ended - unknown lifecycle_state_updated_time: type: string format: datetime notice_period_start_time: type: string format: datetime nullable: true period: type: integer nullable: true period_end_time: type: string format: datetime nullable: true period_start_time: type: string format: datetime nullable: true links: type: array description: All links on the contract. (links is only available in the Get a contract by ID response) items: oneOf: - description: Internal contract link. title: Internal type: object additionalProperties: false required: - id - linked_contract - type properties: id: type: integer format: signed_integer_id linked_contract: type: integer format: signed_integer_id type: type: string description: One of the [link types](contract#links). enum: - amends - amended_by - sub_contract - main_contract - replaced_by - replaces - relates_to - description: External contract link. title: External type: object additionalProperties: false required: - id - type - external_link - external_title properties: id: type: integer format: signed_integer_id type: description: Can only be `external` of the [link types](contract#links). type: string enum: - external external_link: type: string minLength: 1 maxLength: 1024 external_title: type: string minLength: 1 maxLength: 130 parties: type: array description: The parties involved in this contract. items: oneOf: - title: Individual description: An individual party, where a single participant is signing on behalf of him- or herself. See [Individual party](doc:party#individual) type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participant - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true participant: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `individual`. enum: - individual - title: Company description: The participants are signing on behalf of this company. See [Company party](doc:party#company). type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participants - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 participants: description: The maximum number of participants per contract across all parties is 40. type: array items: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `company`. enum: - company discriminator: propertyName: type mapping: individual: contract_party_individual.yml company: contract_party_company.yml pdf_file_groups: type: array description: A list of expanded pdf type file groups in the contract. items: description: A file group represents an expanded PDF session or attachment session in the contract. type: object additionalProperties: false required: - _private_ownerside - files - id - type properties: _private_ownerside: type: object description: File group data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true files: type: array items: type: object additionalProperties: false description: A single file of the contract file group. required: - _private_ownerside - extension - id - name - size properties: _private_ownerside: type: object description: File data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true extension: description: The file extension. type: string nullable: true id: type: integer format: signed_integer_id name: description: The name of the file. type: string nullable: true size: description: The size of the file in bytes. type: integer nullable: true id: type: integer format: unsigned_integer_id type: type: string description: The file group type of the file group sections. There are only two types available, `attachment` and `pdf`. enum: - attachment - pdf product_groups: description: A list of product groups. type: array items: description: A product group represents a product table in the contract, see [Product group](doc:product-group). type: object additionalProperties: false required: - _private_ownerside - configuration - enabled_columns - id - products properties: _private_ownerside: type: object description: Product group data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true configuration: type: object additionalProperties: false description: Updated product group configuration properties: columns: type: array items: type: object additionalProperties: false description: Product group columns data. required: - key properties: enabled: type: boolean key: description: One of the product group column keys. type: string enum: - name - description - price_1 - price_2 - count label: type: string counterpart_edit: type: boolean hide_price_summation: type: boolean price_affixes: type: object additionalProperties: false description: Postfix and prefix of a contract product price. properties: postfix: type: string prefix: type: string created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true enabled_columns: type: array items: type: object additionalProperties: false description: An individual product table columns enable information. required: - enabled - key properties: enabled: type: boolean key: type: string minLength: 0 maxLength: 80 id: type: integer format: unsigned_integer_id products: type: array items: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity published_time: type: string format: datetime nullable: true sign_later: description: A flag to indicate if the contract signing is postponed. type: boolean sign_order: type: array description: Sign order of the participants. items: type: object additionalProperties: false required: - participant_id - order properties: participant_id: type: integer format: signed_integer_id description: participant ID order: type: integer minimum: 1 maximum: 40 description: Sign order signing_period_expiry_time: type: string format: datetime nullable: true state: type: string description: One of the [contract states](contract#contract-state). enum: - draft - pending - overdue - signed - declined - unknown state_updated_time: type: string format: datetime tags: type: array description: All tags associated with the contract. items: type: object additionalProperties: false required: - id - name properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 updated_time: type: string format: datetime nullable: true examples: contractUpdateResponseExample: description: 'A sample contract with parties and products:' value: _integration_permissions: [] _links: comments: href: https://api.oneflow.com/v1/contracts/10001/comments data_fields: href: https://api.oneflow.com/v1/contracts/10001/data_fields events: href: https://api.oneflow.com/v1/contracts/10001/events files: href: https://api.oneflow.com/v1/contracts/10001/files parties: href: https://api.oneflow.com/v1/contracts/10001/parties publish: href: https://api.oneflow.com/v1/contracts/10001/publish self: href: https://api.oneflow.com/v1/contracts/10001 template: href: https://api.oneflow.com/v1/templates/170001 template_type: href: https://api.oneflow.com/v1/template_types/220001 workspace: href: https://api.oneflow.com/v1/workspaces/130001 _permissions: contract:delete: true contract:download:pdf: true contract:send: true _private: name: My First Contract Update signing_period_expiration: expire_days_after_publish: 14 type: days_after_publish value: amount: '500.10' currency: SEK workspace_id: 130001 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' template_id: 170001 template_type_id: 220001 attachment_file_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' files: [] id: 920001 type: attachment available_options: can_receive_attachments: true can_receive_expanded_pdf: true can_receive_products: true delivery_channels: - name: email preferred: true required_participant_attributes: - email - name: none preferred: false required_participant_attributes: [] - name: same_device preferred: false required_participant_attributes: - sign_method - name: sms preferred: false required_participant_attributes: - phone_number sign_methods: - name: finnish_bankid preferred: false - name: sms preferred: false - name: standard_esign preferred: true - name: swedish_bankid preferred: false two_step_authentication_methods: - name: email preferred: false required_participant_attributes: - email - name: none preferred: true required_participant_attributes: [] - name: sms preferred: false required_participant_attributes: - phone_number data_fields: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_first_name updated_time: '2023-04-27T11:29:36+00:00' description: firstname of the person id: 140001 name: First Name placeholder: firstname placeholder value: Foo - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_last_name updated_time: '2023-04-27T11:29:36+00:00' description: lastname of the person id: 140002 name: Last Name placeholder: lastname placeholder value: '' id: 10001 lifecycle_settings: duration: 12m end_date: null initial_duration: null notice_period: 3m start_date: null type: recurring lifecycle_state: null parties: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470001 identification_number: 11223344-5566 my_party: true name: Own Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: '2023-04-27T11:29:36+00:00' last_visited_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' visits: 1 delivery_channel: email delivery_status: success email: own@email.com id: 230001 identification_number: 10034544-0066 my_participant: true name: First Last organizer: false phone_number: '+111222333444' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: Sales Manager two_step_authentication_method: none type: company - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470002 identification_number: 11223344-5577 my_party: false name: Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_participant_1 first_visited_time: null last_visited_time: null updated_time: '2023-04-27T11:29:36+00:00' visits: 0 delivery_channel: email delivery_status: success email: mem@email.com id: 230002 identification_number: 10034544-0077 my_participant: false name: Firstname Lastname organizer: false phone_number: '+111222333555' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: company - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470003 identification_number: 10034544-0088 my_party: false name: Firstname2 Lastname2 participant: _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: null last_visited_time: null updated_time: '2023-04-27T11:29:36+00:00' visits: 0 delivery_channel: email delivery_status: success email: individual@email.com id: 230003 identification_number: 10034544-0088 my_participant: false name: Firstname2 Lastname2 organizer: false phone_number: '+111222333666' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: individual pdf_file_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' files: [] id: 920002 type: pdf product_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_product_group_1 updated_time: '2023-04-27T11:29:36+00:00' configuration: columns: - enabled: true key: name label: ProductX - enabled: true key: description label: Description - enabled: true key: price_1 label: Price 1 - enabled: true key: price_2 label: Price 2 - enabled: true key: count label: ValueX counterpart_edit: false hide_price_summation: false price_affixes: postfix: '' prefix: Rs enabled_columns: - enabled: true key: name - enabled: true key: description - enabled: true key: price_1 - enabled: true key: price_2 - enabled: true key: count id: 85011 products: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: CUSTOM_ID_PRODUCT_1 updated_time: '2023-04-27T11:29:36+00:00' counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice published_time: null sign_later: false sign_order: - order: 1 participant_id: 230001 - order: 2 participant_id: 230002 - order: 3 participant_id: 230003 signing_period_expiry_time: null state: draft state_updated_time: '2023-04-27T11:29:36+00:00' tags: - id: 380001 name: tag one - id: 380002 name: tag two updated_time: '2023-04-27T18:20:00+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. delete: x-tag: Contract summary: Delete a contract by ID operationId: public_api.api.v1.contract_delete.handler description: Use this endpoint to delete a specific contract by its ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 responses: '200': description: The contract was deleted successfully. This response is also returned if the contract does not exist. '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. /contracts/{contract_id}/publish: post: x-tag: Contract summary: Publish a contract by ID operationId: public_api.api.v1.contract_publish.handler description: Use this endpoint to send contract to participants. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com requestBody: description: Request body parameters used for sending contract with message to participants. required: true content: application/json: schema: type: object additionalProperties: false description: Request body for contract publish. required: - subject - message properties: subject: description: Subject of the message for sending invitation for the contract. type: string minLength: 1 maxLength: 150 example: Contract subject message: description: Message to be sent along with the invitation for the contract. type: string minLength: 1 maxLength: 5000 example: Contract sample message, use this space to additional message with the contract. examples: contractPublishRequestExample: value: subject: Contract subject message: Contract sample message, use this space to additional message with the contract. responses: '200': description: Returns the [contract](contract). content: application/json: schema: type: object additionalProperties: false description: See [Contract](doc:contract). required: - _permissions - _private - _private_ownerside - attachment_file_groups - available_options - data_fields - id - lifecycle_settings - lifecycle_state - parties - pdf_file_groups - product_groups - published_time - sign_order - signing_period_expiry_time - state - state_updated_time - tags - updated_time properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for various operations possible on the contract. The format of the permission is 'contract:' followed by the specific operation, like 'contract:create.' required: - contract:delete - contract:download:pdf - contract:send properties: contract:delete: type: boolean contract:download:pdf: type: boolean contract:send: type: boolean _integration_permissions: type: array additionalProperties: false description: A list of integration specific permissions. This exists only for specific integration tokens items: type: object additionalProperties: false required: - key - value properties: key: type: string value: type: string _private: type: object description: See [Private](doc:contract#private) required: - date_format - value - folder - name - signing_period_expiration - workspace_id properties: date_format: description: The date format of the contract. type: string value: type: object description: See [Contract value](doc:contract#value). required: - amount - currency nullable: true properties: amount: type: string format: amount currency: type: string format: currency folder: additionalProperties: false required: - id - name - parent_id - path description: A folder. properties: id: description: Folder ID type: integer format: signed_integer_id name: description: Folder name. type: string parent_id: description: If exist any parent folder, its ID. type: integer format: signed_integer_id nullable: true path: description: An array of folder IDs representing the path from the top of the hierarchy to the current folder. type: array items: type: integer format: signed_integer_id name: description: The name of the contract. type: string minLength: 0 maxLength: 130 signing_period_expiration: discriminator: propertyName: type oneOf: - type: object additionalProperties: false description: The signing period for this contract never expires required: - type properties: type: type: string description: Can only be 'never'. enum: - never - type: object additionalProperties: false description: The signing period for this contract expires a given number of days after publishing. This setting can only be used when the contract is in the draft stage. Converts into a "fixed_date" after the contract is published. required: - type - expire_days_after_publish properties: type: type: string description: Can only be 'days_after_publish'. enum: - days_after_publish expire_days_after_publish: type: integer minimum: 1 - type: object additionalProperties: false description: The signing period for this contract expires on a set date. required: - type - expire_date properties: type: type: string description: Can only be 'fixed_date'. enum: - fixed_date expire_date: type: string format: date workspace_id: description: The unique id of this workspace. type: integer format: signed_integer_id nullable: true single_sign: description: State of the feature single sign type: boolean format: single_sign _private_ownerside: type: object description: Contract data that is private to the ownerside. nullable: true required: - created_time - template_id - template_type_id properties: created_time: type: string format: datetime template_id: type: integer format: signed_integer_id nullable: true template_type_id: type: integer format: signed_integer_id nullable: true attachment_file_groups: type: array description: A list of attachment type file groups in the contract. items: description: A file group represents an expanded PDF session or attachment session in the contract. type: object additionalProperties: false required: - _private_ownerside - files - id - type properties: _private_ownerside: type: object description: File group data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true files: type: array items: type: object additionalProperties: false description: A single file of the contract file group. required: - _private_ownerside - extension - id - name - size properties: _private_ownerside: type: object description: File data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true extension: description: The file extension. type: string nullable: true id: type: integer format: signed_integer_id name: description: The name of the file. type: string nullable: true size: description: The size of the file in bytes. type: integer nullable: true id: type: integer format: unsigned_integer_id type: type: string description: The file group type of the file group sections. There are only two types available, `attachment` and `pdf`. enum: - attachment - pdf available_options: type: object additionalProperties: false description: Available options in the contract. See [Available options](doc:contract#available-options). required: - can_receive_attachments - can_receive_expanded_pdf - can_receive_products - delivery_channels - sign_methods - two_step_authentication_methods properties: can_receive_attachments: type: boolean can_receive_expanded_pdf: type: boolean can_receive_products: type: boolean delivery_channels: type: array items: description: See [Delivery channel options](contract#delivery-channels). type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string sign_methods: type: array items: description: This attribute is only allowed for participants with the role signatory. For signatories it is required. Note that the participant role defaults to signatory. See [Contract sign methods](doc:contract#sign-methods). type: object additionalProperties: false required: - name - preferred properties: name: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown preferred: type: boolean two_step_authentication_methods: type: array items: description: See [Two-step authentication methods](doc:contract#two-step-authentication-methods) type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string data_fields: type: array description: The data fields that are part of the contract. items: type: object additionalProperties: false description: See [Data field](doc:data-field). required: - _private_ownerside - description - id - name - placeholder - value properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object additionalProperties: false description: Data field attributes that are private to the ownerside. required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true description: type: string minLength: 0 maxLength: 300 id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 placeholder: type: string minLength: 0 maxLength: 100 value: type: string minLength: 0 id: type: integer format: signed_integer_id lifecycle_settings: type: object description: See [Lifecycle settings](lifecycle-settings). required: - duration - end_date - initial_duration - notice_period - start_date - type additionalProperties: false nullable: true properties: duration: type: string format: duration nullable: true end_date: type: string format: date nullable: true initial_duration: type: string format: duration nullable: true notice_period: type: string format: duration nullable: true start_date: type: string format: date nullable: true type: type: string description: One of the contract [duration types](contract#duration-type). enum: - no_duration - single_period - recurring - recurring_two_periods - unknown lifecycle_state: type: object additionalProperties: false description: Lifecycle information of the contract. See [Lifecycle state](doc:contract#lifecycle-state). nullable: true required: - composite - contract_end_time - contract_start_time - cancel_time - has_ended_by_termination - has_passed_notice_period_start_time - is_canceled - is_recurring - lifecycle_state - lifecycle_state_updated_time - notice_period_start_time - period - period_end_time - period_start_time properties: composite: type: string description: One of the [lifecycle composites](contract#lifecycle-composite). enum: - awaiting - awaiting-recurring - active - active-recurring - active-canceled-recurring - ended - ended-terminated - ended-terminated-recurring contract_end_time: type: string format: datetime nullable: true contract_start_time: type: string format: datetime nullable: true cancel_time: type: string format: datetime nullable: true has_ended_by_termination: type: boolean has_passed_notice_period_start_time: type: boolean is_canceled: type: boolean is_recurring: type: boolean lifecycle_state: type: string description: One of the [lifecycle states](ccontract#lifecycle-states). enum: - awaiting - active - ended - unknown lifecycle_state_updated_time: type: string format: datetime notice_period_start_time: type: string format: datetime nullable: true period: type: integer nullable: true period_end_time: type: string format: datetime nullable: true period_start_time: type: string format: datetime nullable: true links: type: array description: All links on the contract. (links is only available in the Get a contract by ID response) items: oneOf: - description: Internal contract link. title: Internal type: object additionalProperties: false required: - id - linked_contract - type properties: id: type: integer format: signed_integer_id linked_contract: type: integer format: signed_integer_id type: type: string description: One of the [link types](contract#links). enum: - amends - amended_by - sub_contract - main_contract - replaced_by - replaces - relates_to - description: External contract link. title: External type: object additionalProperties: false required: - id - type - external_link - external_title properties: id: type: integer format: signed_integer_id type: description: Can only be `external` of the [link types](contract#links). type: string enum: - external external_link: type: string minLength: 1 maxLength: 1024 external_title: type: string minLength: 1 maxLength: 130 parties: type: array description: The parties involved in this contract. items: oneOf: - title: Individual description: An individual party, where a single participant is signing on behalf of him- or herself. See [Individual party](doc:party#individual) type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participant - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true participant: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `individual`. enum: - individual - title: Company description: The participants are signing on behalf of this company. See [Company party](doc:party#company). type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participants - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 participants: description: The maximum number of participants per contract across all parties is 40. type: array items: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `company`. enum: - company discriminator: propertyName: type mapping: individual: contract_party_individual.yml company: contract_party_company.yml pdf_file_groups: type: array description: A list of expanded pdf type file groups in the contract. items: description: A file group represents an expanded PDF session or attachment session in the contract. type: object additionalProperties: false required: - _private_ownerside - files - id - type properties: _private_ownerside: type: object description: File group data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true files: type: array items: type: object additionalProperties: false description: A single file of the contract file group. required: - _private_ownerside - extension - id - name - size properties: _private_ownerside: type: object description: File data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true extension: description: The file extension. type: string nullable: true id: type: integer format: signed_integer_id name: description: The name of the file. type: string nullable: true size: description: The size of the file in bytes. type: integer nullable: true id: type: integer format: unsigned_integer_id type: type: string description: The file group type of the file group sections. There are only two types available, `attachment` and `pdf`. enum: - attachment - pdf product_groups: description: A list of product groups. type: array items: description: A product group represents a product table in the contract, see [Product group](doc:product-group). type: object additionalProperties: false required: - _private_ownerside - configuration - enabled_columns - id - products properties: _private_ownerside: type: object description: Product group data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true configuration: type: object additionalProperties: false description: Updated product group configuration properties: columns: type: array items: type: object additionalProperties: false description: Product group columns data. required: - key properties: enabled: type: boolean key: description: One of the product group column keys. type: string enum: - name - description - price_1 - price_2 - count label: type: string counterpart_edit: type: boolean hide_price_summation: type: boolean price_affixes: type: object additionalProperties: false description: Postfix and prefix of a contract product price. properties: postfix: type: string prefix: type: string created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true enabled_columns: type: array items: type: object additionalProperties: false description: An individual product table columns enable information. required: - enabled - key properties: enabled: type: boolean key: type: string minLength: 0 maxLength: 80 id: type: integer format: unsigned_integer_id products: type: array items: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity published_time: type: string format: datetime nullable: true sign_later: description: A flag to indicate if the contract signing is postponed. type: boolean sign_order: type: array description: Sign order of the participants. items: type: object additionalProperties: false required: - participant_id - order properties: participant_id: type: integer format: signed_integer_id description: participant ID order: type: integer minimum: 1 maximum: 40 description: Sign order signing_period_expiry_time: type: string format: datetime nullable: true state: type: string description: One of the [contract states](contract#contract-state). enum: - draft - pending - overdue - signed - declined - unknown state_updated_time: type: string format: datetime tags: type: array description: All tags associated with the contract. items: type: object additionalProperties: false required: - id - name properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 updated_time: type: string format: datetime nullable: true examples: contractPublishResponseExample: description: 'A sample contract with parties and products:' value: _integration_permissions: [] _links: comments: href: https://api.oneflow.com/v1/contracts/10001/comments data_fields: href: https://api.oneflow.com/v1/contracts/10001/data_fields events: href: https://api.oneflow.com/v1/contracts/10001/events files: href: https://api.oneflow.com/v1/contracts/10001/files parties: href: https://api.oneflow.com/v1/contracts/10001/parties publish: href: https://api.oneflow.com/v1/contracts/10001/publish self: href: https://api.oneflow.com/v1/contracts/10001 template: href: https://api.oneflow.com/v1/templates/170001 template_type: href: https://api.oneflow.com/v1/template_types/220001 workspace: href: https://api.oneflow.com/v1/workspaces/130001 _permissions: contract:delete: true contract:download:pdf: true contract:send: false _private: name: My First Contract signing_period_expiration: expire_date: '2023-05-11' type: fixed_date value: amount: '500.10' currency: SEK workspace_id: 130001 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' template_id: 170001 template_type_id: 220001 attachment_file_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' files: [] id: 920001 type: attachment available_options: can_receive_attachments: true can_receive_expanded_pdf: true can_receive_products: true delivery_channels: - name: email preferred: true required_participant_attributes: - email - name: none preferred: false required_participant_attributes: [] - name: same_device preferred: false required_participant_attributes: - sign_method - name: sms preferred: false required_participant_attributes: - phone_number sign_methods: - name: finnish_bankid preferred: false - name: sms preferred: false - name: standard_esign preferred: true - name: swedish_bankid preferred: false two_step_authentication_methods: - name: email preferred: false required_participant_attributes: - email - name: none preferred: true required_participant_attributes: [] - name: sms preferred: false required_participant_attributes: - phone_number data_fields: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_first_name updated_time: '2023-04-27T11:29:36+00:00' description: firstname of the person id: 140001 name: First Name placeholder: firstname placeholder value: Foo - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_last_name updated_time: '2023-04-27T11:29:36+00:00' description: lastname of the person id: 140002 name: Last Name placeholder: lastname placeholder value: '' id: 10001 lifecycle_settings: duration: 12m end_date: null initial_duration: null notice_period: 3m start_date: null type: recurring lifecycle_state: null parties: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470001 identification_number: 11223344-5566 my_party: true name: Own Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: '2023-04-27T11:29:36+00:00' last_visited_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' visits: 1 delivery_channel: email delivery_status: success email: own@email.com id: 230001 identification_number: 10034544-0066 my_participant: true name: First Last organizer: false phone_number: '+111222333444' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: Sales Manager two_step_authentication_method: none type: company - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470002 identification_number: 11223344-5577 my_party: false name: Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_participant_1 first_visited_time: null last_visited_time: null updated_time: '2023-04-27T11:29:36+00:00' visits: 0 delivery_channel: email delivery_status: success email: mem@email.com id: 230002 identification_number: 10034544-0077 my_participant: false name: Firstname Lastname organizer: false phone_number: '+111222333555' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: company - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470003 identification_number: 10034544-0088 my_party: false name: Firstname2 Lastname2 participant: _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: null last_visited_time: null updated_time: '2023-04-27T11:29:36+00:00' visits: 0 delivery_channel: email delivery_status: success email: individual@email.com id: 230003 identification_number: 10034544-0088 my_participant: false name: Firstname2 Lastname2 organizer: false phone_number: '+111222333666' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: individual pdf_file_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' files: [] id: 920002 type: pdf product_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_product_group_1 updated_time: '2023-04-27T11:29:36+00:00' configuration: columns: - enabled: true key: name label: ProductX - enabled: true key: description label: Description - enabled: true key: price_1 label: Price 1 - enabled: true key: price_2 label: Price 2 - enabled: true key: count label: ValueX counterpart_edit: false hide_price_summation: false price_affixes: postfix: '' prefix: Rs enabled_columns: - enabled: true key: name - enabled: true key: description - enabled: true key: price_1 - enabled: true key: price_2 - enabled: true key: count id: 85011 products: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: CUSTOM_ID_PRODUCT_1 updated_time: '2023-04-27T11:29:36+00:00' counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice published_time: '2023-04-27T18:22:44+00:00' sign_later: false sign_order: - order: 1 participant_id: 230001 - order: 2 participant_id: 230002 - order: 3 participant_id: 230003 signing_period_expiry_time: '2023-05-12T00:00:00+00:00' state: pending state_updated_time: '2023-04-27T18:22:44+00:00' tags: - id: 380001 name: tag one - id: 380002 name: tag two updated_time: '2023-04-27T18:22:44+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /contracts/{contract_id}/files/: get: x-tag: Contract - Files summary: Get contract files operationId: public_api.api.v1.contract_file_list.handler description: Use this endpoint to retrieve the list of all files available for the specified contract ID, which includes the contract itself, contract verification, attachments, and PDF documents. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: offset in: query required: false schema: type: integer minimum: 0 maximum: 19900 default: 0 example: 0 - name: limit in: query required: false description: The resource limit (minimum 1, maximum 100). Set limit = all to get all resources at once. schema: type: string format: limit default: '100' example: 100 - name: sort description: "A comma-separated list of columns by which results are sorted. Valid columns:\n * id\n * type\n * extension\n * name\n" in: query required: false schema: type: string example: -type,name responses: '200': description: Returns the requested contract files. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A collection of contract files. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true count: type: integer data: type: array items: type: object additionalProperties: false description: Contract file. required: - extension - id - name - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object additionalProperties: false description: File data that is private to the ownerside. nullable: true required: - created_time properties: created_time: type: string format: datetime nullable: true extension: description: The file extension nullable: true type: string minLength: 1 maxLength: 20 id: type: integer format: signed_integer_id name: description: The name of the file. nullable: true type: string minLength: 0 maxLength: 255 type: type: string description: One of the contract [file types](doc:contract-file#contract-file-types). enum: - contract - verification - attachment - pdf - unknown examples: contractFilesResponseExample: description: 'A sample response with a list containing metadata for files inside a contract:' value: _links: next: href: null previous: href: null self: href: https://api.oneflow.com/v1/contracts/10001/files?limit=100&offset=0 count: 5 data: - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/files/1 _private_ownerside: created_time: null extension: pdf id: 1 name: Contract type: contract - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/files/2 _private_ownerside: created_time: null extension: pdf id: 2 name: Verification type: verification - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/files/1200001 _private_ownerside: created_time: '2023-04-27T17:59:12+00:00' extension: docx id: 1200001 name: attachment_sample_doc type: attachment - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/files/1200002 _private_ownerside: created_time: '2023-04-27T17:59:12+00:00' extension: pdf id: 1200002 name: attachment_sample_pdf type: attachment - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/files/1200003 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' extension: pdf id: 1200003 name: expanded_sample_pdf type: pdf '400': description: Invalid format or content of the request. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /contracts/{contract_id}/files: post: x-tag: Contract - Files summary: Upload files operationId: public_api.api.v1.contract_files_create.handler description: Use this endpoint to add multiple attachments or a single PDF document to a contract. See [here](doc:create-a-contract-with-a-pdf) for more information. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com requestBody: description: Request body parameters used for adding multiple attachments or a single PDF document to the specified contract. required: true content: multipart/form-data: schema: type: object additionalProperties: false description: Request body for create contract files request. required: - file - upload_as properties: file: description: Encoded file data, e.g., the list of files to be uploaded to the contract in binary or base64 format. type: array items: type: string format: binary upload_as: description: 'The file type of the file to be imported. There are only two types available: `attachment` and `expanded_pdf`.' type: string enum: - attachment - expanded_pdf examples: contractFilesUploadRequestExample: value: file: - attachment_sample_doc.xlsx - attachment_sample_pdf.pdf upload_as: attachment responses: '200': description: Returns the uploaded contract files. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A collection of uploaded contract files. properties: count: type: integer data: type: array items: type: object additionalProperties: false description: Uploaded contract file. required: - id properties: id: type: integer format: signed_integer_id examples: contractFilesUploadResponseExample: description: 'A sample response with a list containing metadata of the uploaded files:' value: count: 2 data: - id: 1200001 - id: 1200002 '400': description: Invalid format or content of the request. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /contracts/{contract_id}/files/{file_id}: get: x-tag: Contract - Files summary: Get a contract file by ID operationId: public_api.api.v1.contract_file_get.handler description: Use this endpoint to retrieve a specific contract file by its ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: file_id in: path required: true description: The ID of a file. schema: type: integer format: signed_integer_id example: 1 - name: download in: query required: false description: If set to true, the file will be downloaded. The default value is false; in this case, only the file metadata will be returned. schema: type: boolean example: false - name: download_as in: query required: false description: If specified, the downloaded file will have this name. This parameter supports unicode. schema: type: string minLength: 1 maxLength: 255 example: "Sales_Contract_S\xF6dert\xE4lje.pdf" - name: direct_download in: query required: false x-oneflow-internal: true description: If set to true, the file will be downloaded by Public API and file will be returned in binary format. The default value is false; in this case, redirect user to the file. schema: type: boolean example: true responses: '200': description: Returns the requested contract file. content: application/json: schema: type: object additionalProperties: false description: Contract file. required: - extension - id - name - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object additionalProperties: false description: File data that is private to the ownerside. nullable: true required: - created_time properties: created_time: type: string format: datetime nullable: true extension: description: The file extension nullable: true type: string minLength: 1 maxLength: 20 id: type: integer format: signed_integer_id name: description: The name of the file. nullable: true type: string minLength: 0 maxLength: 255 type: type: string description: One of the contract [file types](doc:contract-file#contract-file-types). enum: - contract - verification - attachment - pdf - unknown examples: contractFileResponseExample: description: 'A sample response containing metadata for a specific file inside a contract:' value: _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/files/1 _private_ownerside: created_time: null extension: pdf id: 1 name: Contract type: contract '302': description: A redirect to the requested contract file. '400': description: Invalid format or content of the request. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /contracts/{contract_id}/comments: get: x-tag: Contract - Comments summary: List contract comments. operationId: public_api.api.v1.contract_comments_list.handler description: Use this endpoint to retrieve the list of comments available for the specified contract ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com responses: '200': description: Returns the contract comments. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A collection of contract comments. properties: count: type: integer data: type: array items: type: object additionalProperties: false description: Contract comment. required: - body - created_time - id - private properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true body: description: The actual message of a comment. type: string minLength: 1 maxLength: 5000 created_time: description: The time when the comment was created. type: string format: datetime id: description: The id of a comment. type: integer format: signed_integer_id parent_id: description: The id of the parent comment. It should not be an id of a reply comment. type: integer format: signed_integer_id nullable: true participants: description: An object containing the participants' information that the comment should notify. type: object additionalProperties: false nullable: true properties: sender: description: Contract comment related participant details. type: object additionalProperties: false required: - participant_id - participant_name - party_id - party_name properties: participant_id: type: integer format: signed_integer_id participant_name: type: string party_id: type: integer format: signed_integer_id party_name: type: string recipients: description: The list of recipients for particular comment. type: array items: description: Contract comment related participant details. type: object additionalProperties: false required: - participant_id - participant_name - party_id - party_name properties: participant_id: type: integer format: signed_integer_id participant_name: type: string party_id: type: integer format: signed_integer_id party_name: type: string private: description: Indicates this comment is private or not. type: boolean updated_time: description: The time when the comment was updated. type: string format: datetime nullable: true examples: contractCommentsResponseExample: description: 'A sample response with a list of different type of comments inside a contract:' value: count: 3 data: - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/comments/110001 body: This is the 1st comment. created_time: '2023-04-27T15:00:00+00:00' id: 110001 parent_id: null participants: recipients: - participant_id: 230004 participant_name: Ownerside Participant party_id: 470001 party_name: Own Company AB sender: participant_id: 230001 participant_name: First Last party_id: 470001 party_name: Own Company AB private: true updated_time: '2023-04-27T15:00:00+00:00' - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/comments/110002 body: This is the 2nd comment. created_time: '2023-04-27T15:10:00+00:00' id: 110002 parent_id: null participants: recipients: - participant_id: 230004 participant_name: Ownerside Participant party_id: 470001 party_name: Own Company AB - participant_id: 230002 participant_name: Firstname Lastname party_id: 470002 party_name: Company AB - participant_id: 230003 participant_name: Firstname2 Lastname2 party_id: 470003 party_name: Firstname2 Lastname2 sender: participant_id: 230001 participant_name: First Last party_id: 470001 party_name: Own Company AB private: false updated_time: '2023-04-27T15:10:00+00:00' - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/comments/110003 body: Reply to the 2nd comment. created_time: '2023-04-27T15:20:00+00:00' id: 110003 parent_id: 110002 participants: recipients: - participant_id: 230002 participant_name: Firstname Lastname party_id: 470002 party_name: Company AB - participant_id: 230003 participant_name: Firstname2 Lastname2 party_id: 470003 party_name: Firstname2 Lastname2 sender: participant_id: 230001 participant_name: First Last party_id: 470001 party_name: Own Company AB private: false updated_time: '2023-04-27T15:20:00+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. post: x-tag: Contract - Comments summary: Create a comment. operationId: public_api.api.v1.contract_comment_create.handler description: Use this endpoint to add a comment to a specific contract. See [Comment](doc:comment) for more information. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: type: string format: email example: john.doe@oneflow.com requestBody: description: Request body parameters for creating a comment. required: true content: application/json: schema: type: object additionalProperties: false required: - body description: An individual comment in a specific contract. properties: body: description: The actual message of a comment. type: string minLength: 1 maxLength: 5000 example: This is the first comment. parent_id: description: The id of the parent comment. It should not be an id of a reply comment. type: integer format: signed_integer_id nullable: true participants: description: A list containing the participant IDs that the comment should notify. type: array items: type: object additionalProperties: false required: - participant_id properties: participant_id: type: integer format: signed_integer_id example: 230001 private: description: Indicates this comment is private or not. type: boolean examples: contractCommentCreateRequestExample: value: body: This is the 1st comment. parent_id: null participants: - participant_id: 230001 - participant_id: 230004 private: true responses: '200': description: Returns the created comment. content: application/json: schema: type: object additionalProperties: false description: Contract comment. required: - body - created_time - id - private properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true body: description: The actual message of a comment. type: string minLength: 1 maxLength: 5000 created_time: description: The time when the comment was created. type: string format: datetime id: description: The id of a comment. type: integer format: signed_integer_id parent_id: description: The id of the parent comment. It should not be an id of a reply comment. type: integer format: signed_integer_id nullable: true participants: description: An object containing the participants' information that the comment should notify. type: object additionalProperties: false nullable: true properties: sender: description: Contract comment related participant details. type: object additionalProperties: false required: - participant_id - participant_name - party_id - party_name properties: participant_id: type: integer format: signed_integer_id participant_name: type: string party_id: type: integer format: signed_integer_id party_name: type: string recipients: description: The list of recipients for particular comment. type: array items: description: Contract comment related participant details. type: object additionalProperties: false required: - participant_id - participant_name - party_id - party_name properties: participant_id: type: integer format: signed_integer_id participant_name: type: string party_id: type: integer format: signed_integer_id party_name: type: string private: description: Indicates this comment is private or not. type: boolean updated_time: description: The time when the comment was updated. type: string format: datetime nullable: true examples: contractCommentCreateResponseExample: description: 'A sample response of a comment inside a contract:' value: _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/comments/110001 body: This is the 1st comment. created_time: '2023-04-27T15:00:00+00:00' id: 110001 parent_id: null participants: recipients: - participant_id: 230004 participant_name: Ownerside Participant party_id: 470001 party_name: Own Company AB sender: participant_id: 230001 participant_name: First Last party_id: 470001 party_name: Own Company AB private: true updated_time: '2023-04-27T15:00:00+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /contracts/{contract_id}/comments/{comment_id}: get: x-tag: Contract - Comments summary: Get a contract comment by ID. operationId: public_api.api.v1.contract_comment_get.handler description: Use this endpoint to retrieve a specified contract comment by its ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: comment_id in: path required: true description: The unique ID of the contract comment. schema: type: integer format: signed_integer_id example: 110001 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com responses: '200': description: Returns the requested contract comment. content: application/json: schema: type: object additionalProperties: false description: Contract comment. required: - body - created_time - id - private properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true body: description: The actual message of a comment. type: string minLength: 1 maxLength: 5000 created_time: description: The time when the comment was created. type: string format: datetime id: description: The id of a comment. type: integer format: signed_integer_id parent_id: description: The id of the parent comment. It should not be an id of a reply comment. type: integer format: signed_integer_id nullable: true participants: description: An object containing the participants' information that the comment should notify. type: object additionalProperties: false nullable: true properties: sender: description: Contract comment related participant details. type: object additionalProperties: false required: - participant_id - participant_name - party_id - party_name properties: participant_id: type: integer format: signed_integer_id participant_name: type: string party_id: type: integer format: signed_integer_id party_name: type: string recipients: description: The list of recipients for particular comment. type: array items: description: Contract comment related participant details. type: object additionalProperties: false required: - participant_id - participant_name - party_id - party_name properties: participant_id: type: integer format: signed_integer_id participant_name: type: string party_id: type: integer format: signed_integer_id party_name: type: string private: description: Indicates this comment is private or not. type: boolean updated_time: description: The time when the comment was updated. type: string format: datetime nullable: true examples: contractCommentResponseExample: description: 'A sample response of a comment inside a contract:' value: _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/comments/110001 body: This is the 1st comment. created_time: '2023-04-27T15:00:00+00:00' id: 110001 parent_id: null participants: recipients: - participant_id: 230004 participant_name: Ownerside Participant party_id: 470001 party_name: Own Company AB sender: participant_id: 230001 participant_name: First Last party_id: 470001 party_name: Own Company AB private: true updated_time: '2023-04-27T15:00:00+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. /contracts/{contract_id}/data_fields: get: x-tag: Contract - Data fields summary: Get contract data fields operationId: public_api.api.v1.contract_data_fields_list.handler description: Use this endpoint to retrieve the list of data fields for the specified contract ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: offset in: query required: false schema: type: integer minimum: 0 maximum: 19900 default: 0 example: 0 - name: limit in: query required: false description: The resource limit (minimum 1, maximum 100). Set limit = all to get all resources at once. schema: type: string format: limit default: '100' example: 100 responses: '200': description: Returns the list of data fields in a contract. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A collection of datafields in a contract. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true count: type: integer data: type: array items: type: object additionalProperties: false description: See [Data field](doc:data-field). required: - _private_ownerside - description - id - name - placeholder - value properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object additionalProperties: false description: Data field attributes that are private to the ownerside. required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true description: type: string minLength: 0 maxLength: 300 id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 placeholder: type: string minLength: 0 maxLength: 100 value: type: string minLength: 0 examples: contractDatafieldsResponseExample: description: 'A sample response with a list of data fields:' value: _links: next: href: null previous: href: null self: href: https://api.oneflow.com/v1/contracts/10001/data_fields?limit=100&offset=0 count: 3 data: - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/data_fields/140001 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_first_name updated_time: '2023-04-27T15:29:36+00:00' description: firstname of the person id: 140001 name: First Name placeholder: firstname placeholder value: Foo - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/data_fields/140002 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_last_name updated_time: '2023-04-27T15:29:36+00:00' description: lastname of the person id: 140002 name: Last Name placeholder: lastname placeholder value: '' - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/data_fields/140003 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_position updated_time: '2023-04-27T15:29:36+00:00' description: position of the person in company id: 140003 name: Position placeholder: position value: Manager '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. put: x-tag: Contract - Data fields summary: Update contract data field values operationId: public_api.api.v1.contract_data_fields_put.handler description: Use this endpoint to update one or multiple data field values in the specified contract. See [Data field](data-field) for more information. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 requestBody: description: Request body details for updating data field values. required: true content: application/json: schema: type: object additionalProperties: false description: An array of the data fields to update. required: - data_fields properties: data_fields: type: array minLength: 0 maxLength: 150 items: type: object additionalProperties: false description: See [Data field](doc:data-field). properties: _private_ownerside: type: object additionalProperties: false description: Data field attributes that are private to the ownerside. required: - custom_id properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true example: custom_id_first_name id: type: integer format: signed_integer_id example: 140001 value: type: string nullable: true minLength: 0 maxLength: 1024 example: Foo examples: contractDatafieldsUpdateRequestExample: value: data_fields: - _private_ownerside: custom_id: custom_id_first_name id: 140001 value: Foo - _private_ownerside: custom_id: custom_id_last_name value: '' - id: 140003 value: Manager responses: '200': description: Returns the updated [data field](data-field)s information. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A collection of datafields in a contract. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true count: type: integer data: type: array items: type: object additionalProperties: false description: See [Data field](doc:data-field). required: - _private_ownerside - description - id - name - placeholder - value properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object additionalProperties: false description: Data field attributes that are private to the ownerside. required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true description: type: string minLength: 0 maxLength: 300 id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 placeholder: type: string minLength: 0 maxLength: 100 value: type: string minLength: 0 examples: contractDatafieldsUpdateResponseExample: description: 'A sample response with a list of data fields:' value: _links: next: href: null previous: href: null self: href: https://api.oneflow.com/v1/contracts/10001/data_fields?limit=100&offset=0 count: 3 data: - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/data_fields/140001 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_first_name updated_time: '2023-04-27T15:29:36+00:00' description: firstname of the person id: 140001 name: First Name placeholder: firstname placeholder value: Foo - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/data_fields/140002 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_last_name updated_time: '2023-04-27T15:29:36+00:00' description: lastname of the person id: 140002 name: Last Name placeholder: lastname placeholder value: '' - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/data_fields/140003 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_position updated_time: '2023-04-27T15:29:36+00:00' description: position of the person in company id: 140003 name: Position placeholder: position value: Manager '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /contracts/{contract_id}/data_fields/{data_field_id}: get: x-tag: Contract - Data fields summary: Get a contract data field by ID operationId: public_api.api.v1.contract_data_field_get.handler description: Use this endpoint to retrieve a specific contract data field by its ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: data_field_id in: path required: true description: The unique ID of the data field in contract. schema: type: integer format: signed_integer_id example: 140001 responses: '200': description: Returns the requested contract data field. content: application/json: schema: type: object additionalProperties: false description: See [Data field](doc:data-field). required: - _private_ownerside - description - id - name - placeholder - value properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object additionalProperties: false description: Data field attributes that are private to the ownerside. required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true description: type: string minLength: 0 maxLength: 300 id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 placeholder: type: string minLength: 0 maxLength: 100 value: type: string minLength: 0 examples: contractDatafieldResponseExample: description: 'A sample contract data field:' value: _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/data_fields/140001 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_first_name updated_time: '2023-04-27T15:29:36+00:00' description: firstname of the person id: 140001 name: First Name placeholder: firstname placeholder value: Foo '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. put: x-tag: Contract - Data fields summary: Update a contract data field value operationId: public_api.api.v1.contract_data_field_put.handler description: Use this endpoint to update the specified data field value in the specified contract. See [Data field](data-field) for more information. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: data_field_id in: path required: true description: The unique ID or custom ID of the data field in contract. schema: type: string pattern: ^(([0-9]+)|(c::[-_a-zA-Z0-9]+))$ example: 140001 requestBody: description: Request body details for updating a data field value. required: true content: application/json: schema: type: object additionalProperties: false description: See [Data field](doc:data-field). properties: _private_ownerside: type: object additionalProperties: false description: Data field attributes that are private to the ownerside. required: - custom_id properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true example: custom_id_first_name id: type: integer format: signed_integer_id example: 140001 value: type: string nullable: true minLength: 0 maxLength: 1024 example: Foo examples: contractDatafieldUpdateRequestExample: value: _private_ownerside: custom_id: custom_id_first_name id: 140001 value: Foo responses: '200': description: Returns the updated [data field](data-field) information. content: application/json: schema: type: object additionalProperties: false description: See [Data field](doc:data-field). required: - _private_ownerside - description - id - name - placeholder - value properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object additionalProperties: false description: Data field attributes that are private to the ownerside. required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true description: type: string minLength: 0 maxLength: 300 id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 placeholder: type: string minLength: 0 maxLength: 100 value: type: string minLength: 0 examples: contractDatafieldUpdateResponseExample: description: 'A sample contract data field:' value: _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/data_fields/140001 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_first_name updated_time: '2023-04-27T15:29:36+00:00' description: firstname of the person id: 140001 name: First Name placeholder: firstname placeholder value: Foo '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /contracts/{contract_id}/events: get: x-oneflow-internal: true x-tag: Contract - Events summary: Get contract events operationId: public_api.api.v1.contract_events_list.handler description: Use this endpoint to retrieve the list of events available for the specified contract ID. parameters: - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: offset in: query required: false schema: type: integer minimum: 0 maximum: 19900 default: 0 example: 0 - name: limit in: query required: false description: The resource limit (minimum 1, maximum 100). Set limit = all to get all resources at once. schema: type: string format: limit default: '100' example: 100 - name: sort description: "A comma-separated list of columns by which results are sorted. Valid columns:\n * id\n * type\n * created_time\n" in: query required: false schema: type: string example: -created_time responses: '200': description: Returns the requested [contract event](contract-event)s. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A collection of contract events. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true count: type: integer data: type: array items: type: object description: Contract event schema additionalProperties: false required: - actor - created_time - data - id - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true actor: type: object description: Participant that triggers the event additionalProperties: false nullable: true properties: id: description: Participant ID type: integer format: signed_integer_id name: description: Participant name type: string minLength: 1 maxLength: 100 party: description: The participant's party type: object nullable: true properties: id: description: Party ID of the participant type: integer format: signed_integer_id name: description: Party name of the participant type: string minLength: 1 maxLength: 100 created_time: type: string format: datetime data: type: object additionalProperties: false required: - subject - changes properties: subject: description: Primary object this event acts on anyOf: - type: object description: Event subject representing contract object additionalProperties: false required: - id properties: id: description: Contract ID type: integer format: signed_integer_id - type: object description: Event subject representing participant object additionalProperties: false required: - id - name - party properties: id: description: Participant ID type: integer format: signed_integer_id name: description: Participant name type: string minLength: 1 maxLength: 100 party: type: object description: Event subject representing a party object additionalProperties: false required: - id - name nullable: true properties: id: description: Party ID type: integer format: signed_integer_id name: description: Party name type: string minLength: 1 maxLength: 100 - type: object description: Event subject representing a party object additionalProperties: false required: - id - name nullable: true properties: id: description: Party ID type: integer format: signed_integer_id name: description: Party name type: string minLength: 1 maxLength: 100 - type: object description: Event subject representing a product object additionalProperties: false required: - id - name properties: id: description: Product data ID type: integer format: signed_integer_id name: description: Product name type: string minLength: 0 maxLength: 100 - type: object description: Event subject representing a data_field object additionalProperties: false required: - contract_id - custom_id - id - name properties: contract_id: description: Unique ID of the contract type: integer format: signed_integer_id custom_id: description: The unique name that was given to the data field type: string minLength: 1 maxLength: 100 id: description: Unique ID of the data field type: integer format: signed_integer_id name: description: Data field name type: string minLength: 1 maxLength: 100 - type: object description: Event subject representing a comment object additionalProperties: false required: - contract_id - id properties: contract_id: description: Contract ID type: integer format: signed_integer_id id: description: Comment ID type: integer format: signed_integer_id discriminator: propertyName: type mapping: contract:content_update: contract_event_subject_contract.yml contract:decline: contract_event_subject_contract.yml contract:delete: contract_event_subject_contract.yml contract:lifecycle_state:cancel: contract_event_subject_contract.yml contract:lifecycle_state:end: contract_event_subject_contract.yml contract:lifecycle_state:new_period: contract_event_subject_contract.yml contract:lifecycle_state:start: contract_event_subject_contract.yml contract:lifecycle_state:terminate: contract_event_subject_contract.yml contract:publish: contract_event_subject_contract.yml contract:sign: contract_event_subject_contract.yml comment:create: contract_event_subject_comment.yml contract:signature_reset: contract_event_subject_contract.yml contract:signing_period_expire: contract_event_subject_contract.yml contract:signing_period_revive: contract_event_subject_contract.yml participant:create: contract_event_subject_participant.yml participant:decline: contract_event_subject_participant.yml participant:delegate: contract_event_subject_participant.yml participant:delete: contract_event_subject_participant.yml participant:delivery_failure: contract_event_subject_participant.yml participant:first_visit: contract_event_subject_participant.yml participant:publish: contract_event_subject_participant.yml participant:sign: contract_event_subject_participant.yml participant:update: contract_event_subject_participant.yml participant:signature_reset: contract_event_subject_participant.yml party:create: contract_event_subject_party.yml party:delete: contract_event_subject_party.yml party:update: contract_event_subject_party.yml product:create: contract_event_subject_product.yml product:update: contract_event_subject_product.yml product:delete: contract_event_subject_product.yml data_field:update: contract_event_subject_data_field.yml changes: description: For update events, this will contain a list of applied changes. type: array items: type: object additionalProperties: false properties: attribute: description: Attribute name of the subject type: string from: description: Value before update type: string nullable: true to: description: Value after update type: string nullable: true id: type: integer format: signed_integer_id type: type: string description: One of the [contract event types](contract-event#contract-event-type). enum: - contract:content_update - contract:decline - contract:delete - contract:lifecycle_state:cancel - contract:lifecycle_state:end - contract:lifecycle_state:new_period - contract:lifecycle_state:start - contract:lifecycle_state:terminate - contract:publish - contract:sign - contract:signature_reset - contract:signing_period_expire - contract:signing_period_revive - comment:create - participant:create - participant:decline - participant:delegate - participant:delete - participant:delivery_failure - participant:first_visit - participant:publish - participant:sign - participant:signature_reset - participant:update - party:create - party:delete - party:update - product:create - product:delete - product:update - data_field:update examples: contractEventsResponseExample: description: 'A sample of the contract events list:' value: _links: next: href: null previous: href: null self: href: https://api.api.oneflow.com/v1/contracts/10001/events?limit=100&offset=0 count: 2 data: - _links: contract: href: https://api.api.oneflow.com/v1/contracts/10001 self: href: https://api.api.oneflow.com/v1/contracts/10001/events/160001 actor: id: 230001 name: First Last party: id: 470001 name: Own Company AB created_time: '2023-04-27T18:22:44+00:00' data: changes: [] subject: id: 10001 id: 160001 type: contract:publish - _links: contract: href: https://api.api.oneflow.com/v1/contracts/10001 self: href: https://api.api.oneflow.com/v1/contracts/10001/events/160002 actor: id: 230001 name: First Last party: id: 470001 name: Own Company AB created_time: '2023-04-27T18:30:00+00:00' data: changes: - attribute: name from: shoes to: shoes updated subject: id: 150011 name: shoes updated id: 160002 type: product:update '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. /contracts/{contract_id}/events/{event_id}: get: x-tag: Contract - Events summary: Get a contract event by ID operationId: public_api.api.v1.contract_event_get.handler description: Use this endpoint to retrieve a specific contract event by its ID. parameters: - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: event_id in: path required: true description: The unique ID of the event. schema: type: integer format: signed_integer_id example: 160001 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com responses: '200': description: Returns the requested [contract event](contract-event). content: application/json: schema: type: object description: Contract event schema additionalProperties: false required: - actor - created_time - data - id - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true actor: type: object description: Participant that triggers the event additionalProperties: false nullable: true properties: id: description: Participant ID type: integer format: signed_integer_id name: description: Participant name type: string minLength: 1 maxLength: 100 party: description: The participant's party type: object nullable: true properties: id: description: Party ID of the participant type: integer format: signed_integer_id name: description: Party name of the participant type: string minLength: 1 maxLength: 100 created_time: type: string format: datetime data: type: object additionalProperties: false required: - subject - changes properties: subject: description: Primary object this event acts on anyOf: - type: object description: Event subject representing contract object additionalProperties: false required: - id properties: id: description: Contract ID type: integer format: signed_integer_id - type: object description: Event subject representing participant object additionalProperties: false required: - id - name - party properties: id: description: Participant ID type: integer format: signed_integer_id name: description: Participant name type: string minLength: 1 maxLength: 100 party: type: object description: Event subject representing a party object additionalProperties: false required: - id - name nullable: true properties: id: description: Party ID type: integer format: signed_integer_id name: description: Party name type: string minLength: 1 maxLength: 100 - type: object description: Event subject representing a party object additionalProperties: false required: - id - name nullable: true properties: id: description: Party ID type: integer format: signed_integer_id name: description: Party name type: string minLength: 1 maxLength: 100 - type: object description: Event subject representing a product object additionalProperties: false required: - id - name properties: id: description: Product data ID type: integer format: signed_integer_id name: description: Product name type: string minLength: 0 maxLength: 100 - type: object description: Event subject representing a data_field object additionalProperties: false required: - contract_id - custom_id - id - name properties: contract_id: description: Unique ID of the contract type: integer format: signed_integer_id custom_id: description: The unique name that was given to the data field type: string minLength: 1 maxLength: 100 id: description: Unique ID of the data field type: integer format: signed_integer_id name: description: Data field name type: string minLength: 1 maxLength: 100 - type: object description: Event subject representing a comment object additionalProperties: false required: - contract_id - id properties: contract_id: description: Contract ID type: integer format: signed_integer_id id: description: Comment ID type: integer format: signed_integer_id discriminator: propertyName: type mapping: contract:content_update: contract_event_subject_contract.yml contract:decline: contract_event_subject_contract.yml contract:delete: contract_event_subject_contract.yml contract:lifecycle_state:cancel: contract_event_subject_contract.yml contract:lifecycle_state:end: contract_event_subject_contract.yml contract:lifecycle_state:new_period: contract_event_subject_contract.yml contract:lifecycle_state:start: contract_event_subject_contract.yml contract:lifecycle_state:terminate: contract_event_subject_contract.yml contract:publish: contract_event_subject_contract.yml contract:sign: contract_event_subject_contract.yml comment:create: contract_event_subject_comment.yml contract:signature_reset: contract_event_subject_contract.yml contract:signing_period_expire: contract_event_subject_contract.yml contract:signing_period_revive: contract_event_subject_contract.yml participant:create: contract_event_subject_participant.yml participant:decline: contract_event_subject_participant.yml participant:delegate: contract_event_subject_participant.yml participant:delete: contract_event_subject_participant.yml participant:delivery_failure: contract_event_subject_participant.yml participant:first_visit: contract_event_subject_participant.yml participant:publish: contract_event_subject_participant.yml participant:sign: contract_event_subject_participant.yml participant:update: contract_event_subject_participant.yml participant:signature_reset: contract_event_subject_participant.yml party:create: contract_event_subject_party.yml party:delete: contract_event_subject_party.yml party:update: contract_event_subject_party.yml product:create: contract_event_subject_product.yml product:update: contract_event_subject_product.yml product:delete: contract_event_subject_product.yml data_field:update: contract_event_subject_data_field.yml changes: description: For update events, this will contain a list of applied changes. type: array items: type: object additionalProperties: false properties: attribute: description: Attribute name of the subject type: string from: description: Value before update type: string nullable: true to: description: Value after update type: string nullable: true id: type: integer format: signed_integer_id type: type: string description: One of the [contract event types](contract-event#contract-event-type). enum: - contract:content_update - contract:decline - contract:delete - contract:lifecycle_state:cancel - contract:lifecycle_state:end - contract:lifecycle_state:new_period - contract:lifecycle_state:start - contract:lifecycle_state:terminate - contract:publish - contract:sign - contract:signature_reset - contract:signing_period_expire - contract:signing_period_revive - comment:create - participant:create - participant:decline - participant:delegate - participant:delete - participant:delivery_failure - participant:first_visit - participant:publish - participant:sign - participant:signature_reset - participant:update - party:create - party:delete - party:update - product:create - product:delete - product:update - data_field:update examples: contractEventResponseExample: description: 'A sample of the contract:publish event:' value: _links: contract: href: https://api.api.oneflow.com/v1/contracts/10001 self: href: https://api.api.oneflow.com/v1/contracts/10001/events/160001 actor: id: 230001 name: First Last party: id: 470001 name: Own Company AB created_time: '2023-04-27T18:22:44+00:00' data: changes: [] subject: id: 10001 id: 160001 type: contract:publish '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. /contracts/{contract_id}/links: post: x-tag: Contract - Links summary: Create a link operationId: public_api.api.v1.contract_link_create.handler description: Use this endpoint to create a link between contracts. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 requestBody: description: Request body parameters for creating a link. required: true content: application/json: schema: oneOf: - description: Create an internal contract link. title: Internal type: object additionalProperties: false required: - linked_contract - type properties: linked_contract: type: integer format: signed_integer_id type: type: string description: One of the [link types](contract#links). enum: - amends - amended_by - sub_contract - main_contract - replaced_by - replaces - relates_to - description: Create an external contract link. title: External type: object additionalProperties: false required: - type - external_link - external_title properties: type: description: Can only be `external` of the [link types](contract#links). type: string enum: - external external_link: type: string minLength: 1 maxLength: 1024 example: https://www.example.com external_title: type: string minLength: 1 maxLength: 130 example: example_title examples: contractLinkCreateInternalRequestExample: value: linked_contract: 10010 type: relates_to contractLinkCreateExternalRequestExample: value: external_link: https://www.example.com external_title: example_title type: external responses: '200': description: Returns the created contract link. content: application/json: schema: oneOf: - description: Internal contract link. title: Internal type: object additionalProperties: false required: - id - linked_contract - type properties: id: type: integer format: signed_integer_id linked_contract: type: integer format: signed_integer_id type: type: string description: One of the [link types](contract#links). enum: - amends - amended_by - sub_contract - main_contract - replaced_by - replaces - relates_to - description: External contract link. title: External type: object additionalProperties: false required: - id - type - external_link - external_title properties: id: type: integer format: signed_integer_id type: description: Can only be `external` of the [link types](contract#links). type: string enum: - external external_link: type: string minLength: 1 maxLength: 1024 external_title: type: string minLength: 1 maxLength: 130 examples: contractLinkCreateInternalResponseExample: value: id: 1 linked_contract: 10010 type: relates_to contractLinkCreateExternalResponseExample: value: external_link: https://www.example.com external_title: example_title id: 2 type: external '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. /contracts/{contract_id}/links/{link_id}: delete: x-tag: Contract - Links summary: Delete a contract link by link ID operationId: public_api.api.v1.contract_link_delete.handler description: Use this endpoint to delete a link between two contracts by link's ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: link_id in: path required: true description: The unique ID of the contract link. schema: type: integer format: signed_integer_id example: 1 responses: '200': description: The link between two contracts was deleted successfully. '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. /contracts/{contract_id}/parties: get: x-tag: Contract - Parties and Participants summary: Get parties operationId: public_api.api.v1.contract_parties_list.handler description: Use this endpoint to retrieve the list of parties for the specified contract ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: offset in: query required: false schema: type: integer minimum: 0 maximum: 19900 default: 0 example: 0 - name: limit in: query required: false description: The resource limit (minimum 1, maximum 100). Set limit = all to get all resources at once. schema: type: string format: limit default: '100' example: 100 responses: '200': description: Returns the list of parties in a contract. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A collection of parties in a contract. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true count: type: integer data: type: array description: Total number of parties allowed per contract is 40. items: oneOf: - title: Individual description: An individual party, where a single participant is signing on behalf of him- or herself. See [Individual party](doc:party#individual) type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participant - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true participant: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `individual`. enum: - individual - title: Company description: The participants are signing on behalf of this company. See [Company party](doc:party#company). type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participants - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 participants: description: The maximum number of participants per contract across all parties is 40. type: array items: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `company`. enum: - company examples: contractPartiesResponseExample: description: 'A sample response with a list of parties in a contract:' value: _links: next: href: null previous: href: null self: href: https://api.oneflow.com/v1/contracts/10001/parties?offset=0&limit=100 count: 3 data: - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/parties/470001 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470001 identification_number: 11223344-5566 my_party: true name: Own Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: '2023-04-27T11:29:36+00:00' last_visited_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T18:44:07+00:00' visits: 1 delivery_channel: email delivery_status: success email: own@email.com id: 230001 identification_number: 10034544-0066 my_participant: true name: First Last organizer: false phone_number: '+111222333444' sign_method: unknown sign_state: signed sign_state_updated_time: '2023-04-27T18:44:07+00:00' signatory: true title: Sales Manager two_step_authentication_method: none type: company - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/parties/470002 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470002 identification_number: 11223344-5577 my_party: false name: Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_participant_1 first_visited_time: null last_visited_time: null updated_time: '2023-04-27T18:44:07+00:00' visits: 0 delivery_channel: email delivery_status: success email: mem@email.com id: 230002 identification_number: 10034544-0077 my_participant: false name: Firstname Lastname organizer: false phone_number: '+111222333555' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: Sales Manager two_step_authentication_method: email type: company - _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/parties/470003 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470003 identification_number: 10034544-0088 my_party: false name: Firstname2 Lastname2 participant: _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: null last_visited_time: null updated_time: '2023-04-27T18:44:07+00:00' visits: 0 delivery_channel: email delivery_status: success email: individual@email.com id: 230003 identification_number: 10034544-0088 my_participant: false name: Firstname2 Lastname2 organizer: false phone_number: '+111222333666' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: Sales Manager two_step_authentication_method: email type: individual '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. post: x-tag: Contract - Parties and Participants summary: Create a party operationId: public_api.api.v1.contract_parties_create.handler description: Use this endpoint to create a counterparty in a contract. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 requestBody: description: Request body parameters for creating a party. required: true content: application/json: schema: oneOf: - title: Company description: The contract party with the company type is a legal entity involved in the contract. More than one participant can sign a contract on behalf of the party with the company type. type: object additionalProperties: false required: - name - participants - type properties: _private_ownerside: type: object additionalProperties: false description: Contract party attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true country_code: description: The country code of the contract party. type: string format: country_code identification_number: description: The unique organization number of the contract party. type: string minLength: 0 maxLength: 25 name: description: The name of the contract party. type: string minLength: 1 maxLength: 100 example: Company AB participants: description: The list of the contract party participants. type: array minItems: 1 items: type: object additionalProperties: false required: - delivery_channel - name description: The person who represents in a contract, see [Particant](doc:participant). properties: _permissions: type: object additionalProperties: false description: Defines permissions for the participant on the contract. default: contract:update: false nullable: false required: - contract:update properties: contract:update: description: If set to true, the participant is allowed to update the contract. type: boolean default: false _private_ownerside: type: object additionalProperties: false description: Contract participant attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown email: description: The participant's email. An email is required in case of an owner-side participant or if the delivery channel is `email`. type: string format: email identification_number: description: The social security number of the participant. type: string minLength: 0 maxLength: 25 name: description: The participant's name. type: string minLength: 1 maxLength: 100 example: Firstname Lastname phone_number: description: The participant's phone number. If the delivery channel is `phone number`, then the participant's phone number is required. type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign signatory: description: If true, the participant can sign the contract. type: boolean default: false title: description: The title of the participant. type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `company`. enum: - company - title: Individual description: The contract party of the individual type with a single participant who signs the contract on his or her own behalf. type: object additionalProperties: false required: - participant - type properties: _private_ownerside: type: object additionalProperties: false description: Contract party attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true country_code: description: The country code of the individual contract party. type: string format: country_code participant: type: object additionalProperties: false required: - delivery_channel - name description: The person who represents in a contract, see [Particant](doc:participant). properties: _permissions: type: object additionalProperties: false description: Defines permissions for the participant on the contract. default: contract:update: false nullable: false required: - contract:update properties: contract:update: description: If set to true, the participant is allowed to update the contract. type: boolean default: false _private_ownerside: type: object additionalProperties: false description: Contract participant attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown email: description: The participant's email. An email is required in case of an owner-side participant or if the delivery channel is `email`. type: string format: email identification_number: description: The social security number of the participant. type: string minLength: 0 maxLength: 25 name: description: The participant's name. type: string minLength: 1 maxLength: 100 example: Firstname Lastname phone_number: description: The participant's phone number. If the delivery channel is `phone number`, then the participant's phone number is required. type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign signatory: description: If true, the participant can sign the contract. type: boolean default: false title: description: The title of the participant. type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `individual`. enum: - individual discriminator: propertyName: type mapping: company: contract_party_company.yml individual: contract_party_individual.yml examples: contractPartyCreateCompanyRequestExample: value: _private_ownerside: custom_id: custom_id_party_1 country_code: SE identification_number: 11223344-5577 name: Company AB participants: - _permissions: contract:update: true _private_ownerside: custom_id: custom_id_participant_1 delivery_channel: email email: mem@email.com identification_number: 10034544-0077 name: Firstname Lastname phone_number: '+111222333555' sign_method: standard_esign signatory: true title: Sales Manager two_step_authentication_method: email type: company contractPartyCreateIndividualRequestExample: value: country_code: SE participant: _permissions: contract:update: true _private_ownerside: custom_id: null delivery_channel: email email: individual@email.com identification_number: 10034544-0088 name: Firstname2 Lastname2 phone_number: '+111222333666' sign_method: standard_esign signatory: true title: Sales Manager two_step_authentication_method: email type: individual responses: '200': description: Returns the created [party](party). content: application/json: schema: oneOf: - title: Company description: The participants are signing on behalf of this company. See [Company party](doc:party#company). type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participants - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 participants: description: The maximum number of participants per contract across all parties is 40. type: array items: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `company`. enum: - company - title: Individual description: An individual party, where a single participant is signing on behalf of him- or herself. See [Individual party](doc:party#individual) type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participant - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true participant: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `individual`. enum: - individual examples: contractPartyCreateCompanyResponseExample: description: 'A sample response with a created company party in a contract:' value: _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/parties/470002 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_party_1 updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470002 identification_number: 11223344-5577 my_party: false name: Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_participant_1 first_visited_time: null last_visited_time: null updated_time: '2023-04-27T11:29:36+00:00' visits: 0 delivery_channel: email delivery_status: success email: mem@email.com id: 230002 identification_number: 10034544-0077 my_participant: false name: Firstname Lastname organizer: false phone_number: '+111222333555' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: Sales Manager two_step_authentication_method: email type: company contractPartyCreateIndividualResponseExample: description: 'A sample response with a created party in a contract:' value: _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/parties/470003 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_party_1 updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470003 identification_number: 10034544-0088 my_party: false name: Firstname2 Lastname2 participant: _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: null last_visited_time: null updated_time: '2023-04-27T11:29:36+00:00' visits: 0 delivery_channel: email delivery_status: success email: individual@email.com id: 230003 identification_number: 10034544-0088 my_participant: false name: Firstname2 Lastname2 organizer: false phone_number: '+111222333666' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: Sales Manager two_step_authentication_method: email type: individual '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /contracts/{contract_id}/parties/{party_id}: get: x-tag: Contract - Parties and Participants summary: Get a party by ID operationId: public_api.api.v1.contract_party_get.handler description: Use this endpoint to retrieve a party from a contract. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: party_id in: path required: true description: The ID of a party in a contract. schema: type: integer format: signed_integer_id example: 470002 responses: '200': description: Returns the requested party. content: application/json: schema: oneOf: - title: Company description: The participants are signing on behalf of this company. See [Company party](doc:party#company). type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participants - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 participants: description: The maximum number of participants per contract across all parties is 40. type: array items: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `company`. enum: - company - title: Individual description: An individual party, where a single participant is signing on behalf of him- or herself. See [Individual party](doc:party#individual) type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participant - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true participant: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `individual`. enum: - individual examples: contractPartyResponseExample: description: 'A sample response with a party from a contract:' value: _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/parties/470002 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_party_1 updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470002 identification_number: 11223344-5577 my_party: false name: Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_participant_1 first_visited_time: null last_visited_time: null updated_time: '2023-04-27T18:44:07+00:00' visits: 0 delivery_channel: email delivery_status: success email: mem@email.com id: 230002 identification_number: 10034544-0077 my_participant: false name: Firstname Lastname organizer: false phone_number: '+111222333555' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: Sales Manager two_step_authentication_method: email type: company '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. put: x-tag: Contract - Parties and Participants summary: Update a party by ID operationId: public_api.api.v1.contract_party_put.handler description: Use this endpoint to update a party in a contract. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: party_id in: path required: true description: The ID of a party in a contract. schema: type: integer format: signed_integer_id example: 470002 requestBody: description: Request body parameters for updating a party. required: true content: application/json: schema: title: Party description: These are the parameters allowed when updating a party in a contract. type: object additionalProperties: false properties: _private_ownerside: type: object additionalProperties: false description: Contract party attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true country_code: description: The country code of the contract party. type: string format: country_code identification_number: description: The unique organization number of the contract company party. type: string minLength: 0 maxLength: 25 name: description: The name of the contract company party. type: string minLength: 1 maxLength: 100 examples: contractPartyUpdateCompanyRequestExample: value: _private_ownerside: custom_id: custom_id_party_1 country_code: SE identification_number: 11223344-5577 name: Company AB contractPartyUpdateIndividualRequestExample: value: country_code: SE responses: '200': description: Returns the updated party content: application/json: schema: oneOf: - title: Company description: The participants are signing on behalf of this company. See [Company party](doc:party#company). type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participants - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 participants: description: The maximum number of participants per contract across all parties is 40. type: array items: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `company`. enum: - company - title: Individual description: An individual party, where a single participant is signing on behalf of him- or herself. See [Individual party](doc:party#individual) type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participant - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true participant: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `individual`. enum: - individual examples: contractPartyUpdateResponseExample: description: 'A sample response with a party from a contract:' value: _links: contract: href: https://api.oneflow.com/v1/contracts/10001 self: href: https://api.oneflow.com/v1/contracts/10001/parties/470002 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_party_1 updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470002 identification_number: 11223344-5577 my_party: false name: Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_participant_1 first_visited_time: null last_visited_time: null updated_time: '2023-04-27T18:44:07+00:00' visits: 0 delivery_channel: email delivery_status: success email: mem@email.com id: 230002 identification_number: 10034544-0077 my_participant: false name: Firstname Lastname organizer: false phone_number: '+111222333555' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: Sales Manager two_step_authentication_method: email type: company '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. delete: x-tag: Contract - Parties and Participants summary: Delete a party by ID operationId: public_api.api.v1.contract_party_delete.handler description: Use this endpoint to delete a specific contract party by its ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: party_id in: path required: true description: The ID of a party in a contract. schema: type: integer format: signed_integer_id example: 470002 responses: '200': description: The contract party was deleted successfully. '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /contracts/{contract_id}/parties/{party_id}/participants: post: x-tag: Contract - Parties and Participants summary: Create a participant operationId: public_api.api.v1.contract_participant_create.handler description: Use this endpoint to add a new participant to an existing contract party. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: party_id in: path required: true description: The ID of a party in a contract. schema: type: integer format: signed_integer_id example: 470002 requestBody: description: Request body parameters for creating a participant. required: true content: application/json: schema: type: object additionalProperties: false required: - delivery_channel - name description: The person who represents in a contract, see [Particant](doc:participant). properties: _options: type: object additionalProperties: false description: Defines options for the participant on the contract. See [Options](doc:participant#options). nullable: false properties: invite: description: Whether send an invitation to the participant or not. type: boolean message: type: object additionalProperties: false description: Defines the subject and body of the invitation. If this object is `null` and the `invite` is `true`, then the default subject and message will be sent. nullable: true required: - body - subject properties: body: description: Body of the message to be sent along with the invitation. type: string minLength: 1 maxLength: 5000 example: Your colleague John Doe needs help with a draft before sending it to the counterparty. subject: description: Subject of the message when sending the invitation to the participant. type: string minLength: 1 maxLength: 150 example: John Doe invited you to a document _permissions: type: object additionalProperties: false description: Defines permissions for the participant on the contract. default: contract:update: false nullable: false required: - contract:update properties: contract:update: description: If set to true, the participant is allowed to update the contract. type: boolean default: false _private_ownerside: type: object additionalProperties: false description: Contract participant attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown email: description: The participant's email. An email is required in case of an owner-side participant or if the delivery channel is `email`. type: string format: email identification_number: description: The social security number of the participant. type: string minLength: 0 maxLength: 25 name: description: The participant's name. type: string minLength: 1 maxLength: 100 example: Firstname Lastname organizer: description: If true, the participant is the organizer of the contract(organizer should be an owner-side participant). type: boolean default: false phone_number: description: The participant's phone number. If the delivery channel is `phone number`, then the participant's phone number is required. type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign signatory: description: If true, the participant can sign the contract. type: boolean default: false title: description: The title of the participant. type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown examples: contractParticipantCreateRequestExample: value: _permissions: contract:update: true _private_ownerside: custom_id: custom_id_participant_1 delivery_channel: email email: mem@email.com identification_number: 10034544-0077 name: Firstname Lastname phone_number: '+111222333555' sign_method: standard_esign signatory: true title: Sales Manager two_step_authentication_method: email responses: '200': description: Returns the created participant content: application/json: schema: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown examples: contractParticipantCreateResponseExample: description: 'A sample response with a participant from a party in a contract:' value: _links: contract: href: https://api.oneflow.com/v1/contracts/10001 party: href: https://api.oneflow.com/v1/contracts/10001/parties/470002 self: href: https://api.oneflow.com/v1/contracts/10001/parties/470002/participants/230002 _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_participant_1 first_visited_time: null last_visited_time: null updated_time: '2023-04-27T11:29:36+00:00' visits: 0 delivery_channel: email delivery_status: success email: mem@email.com id: 230002 identification_number: 10034544-0077 my_participant: false name: Firstname Lastname organizer: false phone_number: '+111222333555' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: Sales Manager two_step_authentication_method: email '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /contracts/{contract_id}/parties/{party_id}/participants/{participant_id}: get: x-tag: Contract - Parties and Participants summary: Get a participant by ID operationId: public_api.api.v1.contract_participant_get.handler description: Use this endpoint to retrieve a specific participant from a contract party by its ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: party_id in: path required: true description: The ID of a party in a contract. schema: type: integer format: signed_integer_id example: 470002 - name: participant_id in: path required: true description: The ID of a participant in a contract. schema: type: integer format: signed_integer_id example: 230002 responses: '200': description: Returns the requested participant content: application/json: schema: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown examples: contractParticipantResponseExample: description: 'A sample response with a participant from a party in a contract:' value: _links: contract: href: https://api.oneflow.com/v1/contracts/10001 party: href: https://api.oneflow.com/v1/contracts/10001/parties/470002 self: href: https://api.oneflow.com/v1/contracts/10001/parties/470002/participants/230002 _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_participant_1 first_visited_time: null last_visited_time: null updated_time: '2023-04-27T18:44:07+00:00' visits: 0 delivery_channel: email delivery_status: success email: mem@email.com id: 230002 identification_number: 10034544-0077 my_participant: false name: Firstname Lastname organizer: false phone_number: '+111222333555' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: Sales Manager two_step_authentication_method: email '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. put: x-tag: Contract - Parties and Participants summary: Update a participant by ID operationId: public_api.api.v1.contract_participant_put.handler description: Use this endpoint to update a participant in a contract. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: party_id in: path required: true description: The ID of a party in a contract. schema: type: integer format: signed_integer_id example: 470002 - name: participant_id in: path required: true description: The ID of a participant in a contract. schema: type: integer format: signed_integer_id example: 230002 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com requestBody: description: Request body parameters for updating a participant. required: true content: application/json: schema: type: object additionalProperties: false description: The person who represents in a contract, see [Particant](doc:participant). properties: _permissions: type: object additionalProperties: false description: Defines permissions for the participant on the contract. default: contract:update: false nullable: false required: - contract:update properties: contract:update: description: If set to true, the participant is allowed to update the contract. type: boolean default: false _private_ownerside: type: object additionalProperties: false description: Contract participant attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown email: description: The participant's email. An email is required in case of an owner-side participant or if the delivery channel is `email`. type: string format: email identification_number: description: The social security number of the participant. type: string minLength: 0 maxLength: 25 name: description: The participant's name. type: string minLength: 1 maxLength: 100 organizer: description: If true, the participant is the organizer of the contract(organizer should be an owner-side participant). type: boolean default: false phone_number: description: The participant's phone number. If the delivery channel is `phone number`, then the participant's phone number is required. type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign signatory: description: If true, the participant can sign the contract. type: boolean default: false title: description: The title of the participant. type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown examples: contractParticipantUpdateRequestExample: value: _permissions: contract:update: true delivery_channel: email email: mem@email.com identification_number: 10034544-0077 name: Firstname Lastname phone_number: '+111222333555' sign_method: standard_esign signatory: true title: Sales Manager two_step_authentication_method: email responses: '200': description: Returns the updated participant content: application/json: schema: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown examples: contractParticipantUpdateResponseExample: description: 'A sample response with a participant from a party in a contract:' value: _links: contract: href: https://api.oneflow.com/v1/contracts/10001 party: href: https://api.oneflow.com/v1/contracts/10001/parties/470002 self: href: https://api.oneflow.com/v1/contracts/10001/parties/470002/participants/230002 _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_participant_1 first_visited_time: null last_visited_time: null updated_time: '2023-04-27T18:44:07+00:00' visits: 0 delivery_channel: email delivery_status: success email: mem@email.com id: 230002 identification_number: 10034544-0077 my_participant: false name: Firstname Lastname organizer: false phone_number: '+111222333555' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: Sales Manager two_step_authentication_method: email '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. delete: x-tag: Contract - Parties and Participants summary: Delete a participant by ID operationId: public_api.api.v1.contract_participant_delete.handler description: Use this endpoint to delete a specific contract participant by its ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: party_id in: path required: true description: The ID of a party in a contract. schema: type: integer format: signed_integer_id example: 470002 - name: participant_id in: path required: true description: The ID of a participant in a contract. schema: type: integer format: signed_integer_id example: 230002 responses: '200': description: The contract party was deleted successfully. '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /contracts/{contract_id}/participants/{participant_id}/access_link: post: x-tag: Contract - Parties and Participants summary: Create an access link operationId: public_api.api.v1.contract_participant_access_link_create.handler description: Use this endpoint to create an access link to a contract for a specific participant. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: participant_id in: path required: true description: The ID of a participant in a contract. schema: type: integer format: signed_integer_id example: 230002 responses: '200': description: The requested access link to a contract for a specific participant. content: application/json: schema: type: object additionalProperties: false description: An access link to a contract for a specific participant. required: - access_link properties: access_link: type: string minLength: 1 maxLength: 2000 examples: contractParticipantAccessLinkResponseExample: description: 'An access link example for to a contract for a specific participant:' value: access_link: https://app.oneflow.com/contracts/10001/at/eb5c66c70789424bbe4433ad01ab6b6dc5864934 '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. /contracts/{contract_id}/products: get: x-tag: Contract - Products summary: Get products in a contract operationId: public_api.api.v1.contract_product_list.handler description: Use this endpoint to get products in a contract. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 responses: '200': description: Returns the list of products. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A list of products for given contract. properties: count: type: integer data: type: array items: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity examples: contractProductsResponseExample: value: count: 1 data: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: CUSTOM_ID_PRODUCT_1 updated_time: '2023-04-27T11:29:36+00:00' counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. /contracts/{contract_id}/products/{product_id}: get: x-tag: Contract - Products summary: Get a product by ID operationId: public_api.api.v1.contract_product_get.handler description: Use this endpoint to get a specific product within a specific contract by product ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: product_id in: path required: true description: The unique ID of the product. schema: type: integer format: signed_integer_id example: 150011 responses: '200': description: Returns the specified product. content: application/json: schema: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity examples: contractProductResponseExample: value: _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: CUSTOM_ID_PRODUCT_1 updated_time: '2023-04-27T11:29:36+00:00' counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. put: x-tag: Contract - Products summary: Update a product by ID operationId: public_api.api.v1.contract_product_put.handler description: Use this endpoint to update a specific product in a specific contract by the product ID. See [Products](doc:product-group#products) for more information. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: product_id in: path required: true description: The unique ID of the product. schema: type: integer format: signed_integer_id example: 150011 requestBody: description: Request body parameters used for updating a product in a contract. required: true content: application/json: schema: type: object additionalProperties: false description: An individual product in a contract's product table. properties: _private_ownerside: type: object additionalProperties: false description: Contract product attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true counterparty_lock: type: boolean description: If true, the counterpart can edit products in the contract. default: false description: type: string description: The product description. minLength: 0 maxLength: 3000 id: type: integer description: The product ID. format: signed_integer_id name: type: string description: The product name. When creating a new product, it is mandatory to provide a product name. minLength: 1 maxLength: 80 price_1: description: The object holds all price-related information for an individual product. Note that base_amount must be larger than discount_amount, except if the base_amount is 0, which is an exception to allow negative prices. See [Products](doc:product-group#products). type: object additionalProperties: false nullable: true properties: base_amount: description: The base price of one item of this kind of product without considering discounts. type: object properties: amount: description: An amount specifying the base price. type: string format: amount nullable: true discount_amount: description: The discount on the base price. type: object properties: amount: description: An amount specifying the discount. type: string format: amount nullable: true discount_percent: description: The discount percentage is a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: The object holds all price-related information for an individual product. Note that base_amount must be larger than discount_amount, except if the base_amount is 0, which is an exception to allow negative prices. See [Products](doc:product-group#products). type: object additionalProperties: false nullable: true properties: base_amount: description: The base price of one item of this kind of product without considering discounts. type: object properties: amount: description: An amount specifying the base price. type: string format: amount nullable: true discount_amount: description: The discount on the base price. type: object properties: amount: description: An amount specifying the discount. type: string format: amount nullable: true discount_percent: description: The discount percentage is a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity examples: contractProductUpdateRequestExample: value: _private_ownerside: custom_id: CUSTOM_ID_PRODUCT_1 counterparty_lock: false description: shiny shoes for sunny saunters name: shoes price_1: base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice responses: '200': description: Returns the newly updated product. content: application/json: schema: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity examples: contractProductUpdateResponseExample: value: _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: CUSTOM_ID_PRODUCT_1 updated_time: '2023-04-27T11:29:36+00:00' counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice '400': description: Invalid format or content of the request. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /contracts/{contract_id}/product_groups: put: x-tag: Contract - Products summary: Update a list of product groups operationId: public_api.api.v1.contract_product_groups_put.handler description: Use this endpoint to update the products and configurations of a list of product groups in a contract. See [Product Group](doc:product-group) for more information. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 requestBody: description: Request body parameters for updating a list of product groups. required: true content: application/json: schema: type: object additionalProperties: false description: An array of the product groups to update. required: - product_groups properties: product_groups: type: array minLength: 0 items: additionalProperties: false description: A product group represents a product table in the contract, see [Product Group](doc:product-group). type: object properties: _private_ownerside: type: object additionalProperties: false description: Contract product group attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true configuration: type: object additionalProperties: false description: A contract product group configuration. properties: columns: type: array description: List of configuration of product group columns items: type: object additionalProperties: false required: - key description: Product group columns data. properties: enabled: description: If true, the column is enable. type: boolean default: true key: description: One of the product group column keys. type: string enum: - name - description - price_1 - price_2 - count label: description: The product group colum label. type: string maxLength: 130 counterpart_edit: type: boolean description: If true, the counterpart can edit products in the contract. hide_price_summation: type: boolean description: If true, the price summation will be hidden. default: false price_affixes: type: object additionalProperties: false description: Postfix and prefix of a contract product price. properties: postfix: description: The product price postfix. type: string maxLength: 30 prefix: description: The product price prefix. type: string maxLength: 30 id: type: integer format: signed_integer_id products: description: The array of products in this group. type: array items: type: object additionalProperties: false description: An individual product in a contract's product table. properties: _private_ownerside: type: object additionalProperties: false description: Contract product attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true counterparty_lock: type: boolean description: If true, the counterpart can edit products in the contract. default: false description: type: string description: The product description. minLength: 0 maxLength: 3000 id: type: integer description: The product ID. format: signed_integer_id name: type: string description: The product name. When creating a new product, it is mandatory to provide a product name. minLength: 1 maxLength: 80 price_1: description: The object holds all price-related information for an individual product. Note that base_amount must be larger than discount_amount, except if the base_amount is 0, which is an exception to allow negative prices. See [Products](doc:product-group#products). type: object additionalProperties: false nullable: true properties: base_amount: description: The base price of one item of this kind of product without considering discounts. type: object properties: amount: description: An amount specifying the base price. type: string format: amount nullable: true discount_amount: description: The discount on the base price. type: object properties: amount: description: An amount specifying the discount. type: string format: amount nullable: true discount_percent: description: The discount percentage is a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: The object holds all price-related information for an individual product. Note that base_amount must be larger than discount_amount, except if the base_amount is 0, which is an exception to allow negative prices. See [Products](doc:product-group#products). type: object additionalProperties: false nullable: true properties: base_amount: description: The base price of one item of this kind of product without considering discounts. type: object properties: amount: description: An amount specifying the base price. type: string format: amount nullable: true discount_amount: description: The discount on the base price. type: object properties: amount: description: An amount specifying the discount. type: string format: amount nullable: true discount_percent: description: The discount percentage is a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity examples: contractProductGroupsUpdateRequestExample: description: Product groups list with products and configurations value: product_groups: - _private_ownerside: custom_id: custom_id_product_group_1 configuration: columns: - enabled: true key: name label: ProductX - enabled: true key: count label: ValueX counterpart_edit: false hide_price_summation: false price_affixes: postfix: '' prefix: Rs id: 85011 products: - _private_ownerside: custom_id: CUSTOM_ID_PRODUCT_1 counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' quantity: amount: 1 type: multiple_choice - _private_ownerside: custom_id: CUSTOM_ID_PRODUCT_2 counterparty_lock: false description: fresh tulips name: tulips price_1: base_amount: amount: '200.00' discount_amount: amount: '0.00' discount_percent: '20.000' quantity: amount: 1 type: multiple_choice responses: '200': description: Returns the updated list of product groups. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A collection of product groups in a contract with count. properties: count: type: integer data: type: array items: description: A product group represents a product table in the contract, see [Product group](doc:product-group). type: object additionalProperties: false required: - _private_ownerside - configuration - enabled_columns - id - products properties: _private_ownerside: type: object description: Product group data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true configuration: type: object additionalProperties: false description: Updated product group configuration properties: columns: type: array items: type: object additionalProperties: false description: Product group columns data. required: - key properties: enabled: type: boolean key: description: One of the product group column keys. type: string enum: - name - description - price_1 - price_2 - count label: type: string counterpart_edit: type: boolean hide_price_summation: type: boolean price_affixes: type: object additionalProperties: false description: Postfix and prefix of a contract product price. properties: postfix: type: string prefix: type: string created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true enabled_columns: type: array items: type: object additionalProperties: false description: An individual product table columns enable information. required: - enabled - key properties: enabled: type: boolean key: type: string minLength: 0 maxLength: 80 id: type: integer format: unsigned_integer_id products: type: array items: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity examples: contractProductGroupsUpdateResponseExample: description: Product groups list with products and configurations with count value: count: 1 data: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_product_group_1 updated_time: '2023-04-27T15:30:36+00:00' configuration: columns: - enabled: true key: name label: ProductX - enabled: true key: description label: Description - enabled: true key: price_1 label: Price 1 - enabled: true key: price_2 label: Price 2 - enabled: true key: count label: ValueX counterpart_edit: false hide_price_summation: false price_affixes: postfix: '' prefix: Rs enabled_columns: - enabled: true key: name - enabled: true key: description - enabled: true key: price_1 - enabled: true key: price_2 - enabled: true key: count id: 85011 products: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: CUSTOM_ID_PRODUCT_1 updated_time: '2023-04-27T15:30:36+00:00' counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice - _private_ownerside: created_time: '2023-04-27T15:30:36+00:00' custom_id: CUSTOM_ID_PRODUCT_2 updated_time: '2023-04-27T15:30:36+00:00' counterparty_lock: false description: fresh tulips id: 150012 name: tulips price_1: amount: amount: '160.00' base_amount: amount: '200.00' discount_amount: amount: '0.00' discount_percent: '20.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. get: x-tag: Contract - Products summary: Get product groups in a contract operationId: public_api.api.v1.contract_product_groups_list.handler description: Use this endpoint to get product groups in a contract. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 responses: '200': description: Returns the list of product groups. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A collection of product groups in a contract with count. properties: count: type: integer data: type: array items: description: A product group represents a product table in the contract, see [Product group](doc:product-group). type: object additionalProperties: false required: - _private_ownerside - configuration - enabled_columns - id - products properties: _private_ownerside: type: object description: Product group data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true configuration: type: object additionalProperties: false description: Updated product group configuration properties: columns: type: array items: type: object additionalProperties: false description: Product group columns data. required: - key properties: enabled: type: boolean key: description: One of the product group column keys. type: string enum: - name - description - price_1 - price_2 - count label: type: string counterpart_edit: type: boolean hide_price_summation: type: boolean price_affixes: type: object additionalProperties: false description: Postfix and prefix of a contract product price. properties: postfix: type: string prefix: type: string created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true enabled_columns: type: array items: type: object additionalProperties: false description: An individual product table columns enable information. required: - enabled - key properties: enabled: type: boolean key: type: string minLength: 0 maxLength: 80 id: type: integer format: unsigned_integer_id products: type: array items: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity examples: contractProductGroupsResponseExample: description: Product groups list with products and configurations with count value: count: 1 data: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_product_group_1 updated_time: '2023-04-27T15:30:36+00:00' configuration: columns: - enabled: true key: name label: ProductX - enabled: true key: description label: Description - enabled: true key: price_1 label: Price 1 - enabled: true key: price_2 label: Price 2 - enabled: true key: count label: ValueX counterpart_edit: false hide_price_summation: false price_affixes: postfix: '' prefix: Rs enabled_columns: - enabled: true key: name - enabled: true key: description - enabled: true key: price_1 - enabled: true key: price_2 - enabled: true key: count id: 85011 products: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: CUSTOM_ID_PRODUCT_1 updated_time: '2023-04-27T15:30:36+00:00' counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice - _private_ownerside: created_time: '2023-04-27T15:30:36+00:00' custom_id: CUSTOM_ID_PRODUCT_2 updated_time: '2023-04-27T15:30:36+00:00' counterparty_lock: false description: fresh tulips id: 150012 name: tulips price_1: amount: amount: '160.00' base_amount: amount: '200.00' discount_amount: amount: '0.00' discount_percent: '20.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. /contracts/{contract_id}/product_groups/{product_group_id}: get: x-tag: Contract - Products summary: Get a product group by ID operationId: public_api.api.v1.contract_product_group_get.handler description: Use this endpoint to get the products and configuration of a product group in a contract. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: product_group_id in: path required: true description: The unique ID of the product group. schema: type: integer format: signed_integer_id example: 85011 responses: '200': description: Returns the relevant product group. content: application/json: schema: description: A product group represents a product table in the contract, see [Product group](doc:product-group). type: object additionalProperties: false required: - _private_ownerside - configuration - enabled_columns - id - products properties: _private_ownerside: type: object description: Product group data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true configuration: type: object additionalProperties: false description: Updated product group configuration properties: columns: type: array items: type: object additionalProperties: false description: Product group columns data. required: - key properties: enabled: type: boolean key: description: One of the product group column keys. type: string enum: - name - description - price_1 - price_2 - count label: type: string counterpart_edit: type: boolean hide_price_summation: type: boolean price_affixes: type: object additionalProperties: false description: Postfix and prefix of a contract product price. properties: postfix: type: string prefix: type: string created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true enabled_columns: type: array items: type: object additionalProperties: false description: An individual product table columns enable information. required: - enabled - key properties: enabled: type: boolean key: type: string minLength: 0 maxLength: 80 id: type: integer format: unsigned_integer_id products: type: array items: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity examples: contractProductGroupResponseExample: description: 'A product group with products and configurations:' value: _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_product_group_1 updated_time: '2023-04-27T15:30:36+00:00' configuration: columns: - enabled: true key: name label: ProductX - enabled: true key: description label: Description - enabled: true key: price_1 label: Price 1 - enabled: true key: price_2 label: Price 2 - enabled: true key: count label: ValueX counterpart_edit: false hide_price_summation: false price_affixes: postfix: '' prefix: Rs enabled_columns: - enabled: true key: name - enabled: true key: description - enabled: true key: price_1 - enabled: true key: price_2 - enabled: true key: count id: 85011 products: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: CUSTOM_ID_PRODUCT_1 updated_time: '2023-04-27T15:30:36+00:00' counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice - _private_ownerside: created_time: '2023-04-27T15:30:36+00:00' custom_id: CUSTOM_ID_PRODUCT_2 updated_time: '2023-04-27T15:30:36+00:00' counterparty_lock: false description: fresh tulips id: 150012 name: tulips price_1: amount: amount: '160.00' base_amount: amount: '200.00' discount_amount: amount: '0.00' discount_percent: '20.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. put: x-tag: Contract - Products summary: Update a product group by ID operationId: public_api.api.v1.contract_product_group_put.handler description: Use this endpoint to update the products and configuration of a product group in a contract. See [Product Group](doc:product-group) for more information. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: product_group_id in: path required: true description: The unique ID of the product group. schema: type: integer format: signed_integer_id example: 85011 requestBody: description: Request body parameters for updating a product group. required: true content: application/json: schema: additionalProperties: false description: A product group represents a product table in the contract, see [Product Group](doc:product-group). type: object properties: _private_ownerside: type: object additionalProperties: false description: Contract product group attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true configuration: type: object additionalProperties: false description: A contract product group configuration. properties: columns: type: array description: List of configuration of product group columns items: type: object additionalProperties: false required: - key description: Product group columns data. properties: enabled: description: If true, the column is enable. type: boolean default: true key: description: One of the product group column keys. type: string enum: - name - description - price_1 - price_2 - count label: description: The product group colum label. type: string maxLength: 130 counterpart_edit: type: boolean description: If true, the counterpart can edit products in the contract. hide_price_summation: type: boolean description: If true, the price summation will be hidden. default: false price_affixes: type: object additionalProperties: false description: Postfix and prefix of a contract product price. properties: postfix: description: The product price postfix. type: string maxLength: 30 prefix: description: The product price prefix. type: string maxLength: 30 id: type: integer format: signed_integer_id products: description: The array of products in this group. type: array items: type: object additionalProperties: false description: An individual product in a contract's product table. properties: _private_ownerside: type: object additionalProperties: false description: Contract product attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true counterparty_lock: type: boolean description: If true, the counterpart can edit products in the contract. default: false description: type: string description: The product description. minLength: 0 maxLength: 3000 id: type: integer description: The product ID. format: signed_integer_id name: type: string description: The product name. When creating a new product, it is mandatory to provide a product name. minLength: 1 maxLength: 80 price_1: description: The object holds all price-related information for an individual product. Note that base_amount must be larger than discount_amount, except if the base_amount is 0, which is an exception to allow negative prices. See [Products](doc:product-group#products). type: object additionalProperties: false nullable: true properties: base_amount: description: The base price of one item of this kind of product without considering discounts. type: object properties: amount: description: An amount specifying the base price. type: string format: amount nullable: true discount_amount: description: The discount on the base price. type: object properties: amount: description: An amount specifying the discount. type: string format: amount nullable: true discount_percent: description: The discount percentage is a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: The object holds all price-related information for an individual product. Note that base_amount must be larger than discount_amount, except if the base_amount is 0, which is an exception to allow negative prices. See [Products](doc:product-group#products). type: object additionalProperties: false nullable: true properties: base_amount: description: The base price of one item of this kind of product without considering discounts. type: object properties: amount: description: An amount specifying the base price. type: string format: amount nullable: true discount_amount: description: The discount on the base price. type: object properties: amount: description: An amount specifying the discount. type: string format: amount nullable: true discount_percent: description: The discount percentage is a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity examples: contractProductGroupUpdateRequestExample: value: _private_ownerside: custom_id: custom_id_product_group_1 configuration: columns: - enabled: true key: name label: ProductX - enabled: true key: count label: ValueX counterpart_edit: false hide_price_summation: false price_affixes: postfix: '' prefix: Rs products: - _private_ownerside: custom_id: CUSTOM_ID_PRODUCT_1 counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' quantity: amount: 1 type: multiple_choice - _private_ownerside: custom_id: CUSTOM_ID_PRODUCT_2 counterparty_lock: false description: fresh tulips id: 150012 name: tulips price_1: base_amount: amount: '200.00' discount_amount: amount: '0.00' discount_percent: '20.000' quantity: amount: 1 type: multiple_choice responses: '200': description: Returns the updated product group. content: application/json: schema: description: A product group represents a product table in the contract, see [Product group](doc:product-group). type: object additionalProperties: false required: - _private_ownerside - configuration - enabled_columns - id - products properties: _private_ownerside: type: object description: Product group data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true configuration: type: object additionalProperties: false description: Updated product group configuration properties: columns: type: array items: type: object additionalProperties: false description: Product group columns data. required: - key properties: enabled: type: boolean key: description: One of the product group column keys. type: string enum: - name - description - price_1 - price_2 - count label: type: string counterpart_edit: type: boolean hide_price_summation: type: boolean price_affixes: type: object additionalProperties: false description: Postfix and prefix of a contract product price. properties: postfix: type: string prefix: type: string created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true enabled_columns: type: array items: type: object additionalProperties: false description: An individual product table columns enable information. required: - enabled - key properties: enabled: type: boolean key: type: string minLength: 0 maxLength: 80 id: type: integer format: unsigned_integer_id products: type: array items: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity examples: contractProductGroupUpdateResponseExample: description: 'A product group with products and configurations:' value: _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_product_group_1 updated_time: '2023-04-27T15:30:36+00:00' configuration: columns: - enabled: true key: name label: ProductX - enabled: true key: description label: Description - enabled: true key: price_1 label: Price 1 - enabled: true key: price_2 label: Price 2 - enabled: true key: count label: ValueX counterpart_edit: false hide_price_summation: false price_affixes: postfix: '' prefix: Rs enabled_columns: - enabled: true key: name - enabled: true key: description - enabled: true key: price_1 - enabled: true key: price_2 - enabled: true key: count id: 85011 products: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: CUSTOM_ID_PRODUCT_1 updated_time: '2023-04-27T15:30:36+00:00' counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice - _private_ownerside: created_time: '2023-04-27T15:30:36+00:00' custom_id: CUSTOM_ID_PRODUCT_2 updated_time: '2023-04-27T15:30:36+00:00' counterparty_lock: false description: fresh tulips id: 150012 name: tulips price_1: amount: amount: '160.00' base_amount: amount: '200.00' discount_amount: amount: '0.00' discount_percent: '20.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. /contracts/{contract_id}/product_groups/{product_group_id}/products: post: x-tag: Contract - Products summary: Add a product to a product group operationId: public_api.api.v1.contract_product_create.handler description: Use this endpoint to add a product to a specific product group in a contract. See [Products](doc:product-group#products) for more information. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: product_group_id in: path required: true description: The unique ID of the product group. schema: type: integer format: signed_integer_id example: 85011 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com requestBody: description: Request body parameters used for adding a product to a product group in a contract. required: true content: application/json: schema: type: object additionalProperties: false description: An individual product in a contract's product table. properties: _private_ownerside: type: object additionalProperties: false description: Contract product attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true counterparty_lock: type: boolean description: If true, the counterpart can edit products in the contract. default: false description: type: string description: The product description. minLength: 0 maxLength: 3000 id: type: integer description: The product ID. format: signed_integer_id name: type: string description: The product name. When creating a new product, it is mandatory to provide a product name. minLength: 1 maxLength: 80 price_1: description: The object holds all price-related information for an individual product. Note that base_amount must be larger than discount_amount, except if the base_amount is 0, which is an exception to allow negative prices. See [Products](doc:product-group#products). type: object additionalProperties: false nullable: true properties: base_amount: description: The base price of one item of this kind of product without considering discounts. type: object properties: amount: description: An amount specifying the base price. type: string format: amount nullable: true discount_amount: description: The discount on the base price. type: object properties: amount: description: An amount specifying the discount. type: string format: amount nullable: true discount_percent: description: The discount percentage is a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: The object holds all price-related information for an individual product. Note that base_amount must be larger than discount_amount, except if the base_amount is 0, which is an exception to allow negative prices. See [Products](doc:product-group#products). type: object additionalProperties: false nullable: true properties: base_amount: description: The base price of one item of this kind of product without considering discounts. type: object properties: amount: description: An amount specifying the base price. type: string format: amount nullable: true discount_amount: description: The discount on the base price. type: object properties: amount: description: An amount specifying the discount. type: string format: amount nullable: true discount_percent: description: The discount percentage is a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity examples: contractProductAddRequestExample: value: _private_ownerside: custom_id: CUSTOM_ID_PRODUCT_1 counterparty_lock: false description: shiny shoes for sunny saunters name: shoes price_1: base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice responses: '200': description: Returns the created product. content: application/json: schema: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity examples: contractProductAddResponseExample: value: _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: CUSTOM_ID_PRODUCT_1 updated_time: '2023-04-27T11:29:36+00:00' counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice '400': description: Invalid format or content of the request. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /contracts/{contract_id}/product_groups/{product_group_id}/products/{product_id}: get: x-tag: Contract - Products summary: Get a product in a product group operationId: public_api.api.v1.contract_product_group_product_get.handler description: Use this endpoint to get a specific product within a specific product group in the contract. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: product_group_id in: path required: true description: The unique ID of the product group. schema: type: integer format: signed_integer_id example: 85011 - name: product_id in: path required: true description: The unique ID of the product. schema: type: integer format: signed_integer_id example: 150011 responses: '200': description: Returns the specified product. content: application/json: schema: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity examples: contractProductResponseExample: value: _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: CUSTOM_ID_PRODUCT_1 updated_time: '2023-04-27T11:29:36+00:00' counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. put: x-tag: Contract - Products summary: Update a product in a product group operationId: public_api.api.v1.contract_product_group_product_put.handler description: Use this endpoint to update a specific product within a specific product group in the contract. See [Products](doc:product-group#products) for more information. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: product_group_id in: path required: true description: The unique ID of the product group. schema: type: integer format: signed_integer_id example: 85011 - name: product_id in: path required: true description: The unique ID of the product. schema: type: integer format: signed_integer_id example: 150011 requestBody: description: Request body parameters used for updating a product to a product group in a contract. required: true content: application/json: schema: type: object additionalProperties: false description: An individual product in a contract's product table. properties: _private_ownerside: type: object additionalProperties: false description: Contract product attributes that are private to the ownerside. properties: custom_id: type: string minLength: 1 maxLength: 100 nullable: true counterparty_lock: type: boolean description: If true, the counterpart can edit products in the contract. default: false description: type: string description: The product description. minLength: 0 maxLength: 3000 id: type: integer description: The product ID. format: signed_integer_id name: type: string description: The product name. When creating a new product, it is mandatory to provide a product name. minLength: 1 maxLength: 80 price_1: description: The object holds all price-related information for an individual product. Note that base_amount must be larger than discount_amount, except if the base_amount is 0, which is an exception to allow negative prices. See [Products](doc:product-group#products). type: object additionalProperties: false nullable: true properties: base_amount: description: The base price of one item of this kind of product without considering discounts. type: object properties: amount: description: An amount specifying the base price. type: string format: amount nullable: true discount_amount: description: The discount on the base price. type: object properties: amount: description: An amount specifying the discount. type: string format: amount nullable: true discount_percent: description: The discount percentage is a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: The object holds all price-related information for an individual product. Note that base_amount must be larger than discount_amount, except if the base_amount is 0, which is an exception to allow negative prices. See [Products](doc:product-group#products). type: object additionalProperties: false nullable: true properties: base_amount: description: The base price of one item of this kind of product without considering discounts. type: object properties: amount: description: An amount specifying the base price. type: string format: amount nullable: true discount_amount: description: The discount on the base price. type: object properties: amount: description: An amount specifying the discount. type: string format: amount nullable: true discount_percent: description: The discount percentage is a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity examples: contractProductUpdateRequestExample: value: _private_ownerside: custom_id: CUSTOM_ID_PRODUCT_1 counterparty_lock: false description: shiny shoes for sunny saunters name: shoes price_1: base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice responses: '200': description: Returns the newly updated product. content: application/json: schema: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity examples: contractProductUpdateResponseExample: value: _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: CUSTOM_ID_PRODUCT_1 updated_time: '2023-04-27T11:29:36+00:00' counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice '400': description: Invalid format or content of the request. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. delete: x-tag: Contract - Products summary: Delete a product in a product group operationId: public_api.api.v1.contract_product_group_product_delete.handler description: Use this endpoint to delete a specific product from a specific product group in the contract. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: product_group_id in: path required: true description: The unique ID of the product group. schema: type: integer format: signed_integer_id example: 85011 - name: product_id in: path required: true description: The unique ID of the product. schema: type: integer format: signed_integer_id example: 150011 responses: '200': description: The product deleted successfully. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. /contracts/{contract_id}/reminders: get: x-tag: Contract - Reminders summary: Get reminders operationId: public_api.api.v1.contract_reminder_list.handler description: Use this endpoint to get reminders on the contract. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: offset in: query required: false schema: type: integer minimum: 0 maximum: 19900 default: 0 example: 0 - name: limit in: query required: false schema: type: integer minimum: 1 maximum: 100 default: 100 example: 100 responses: '200': description: Returns the list of reminders. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A list of reminders for given contract. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true count: type: integer data: type: array items: type: object additionalProperties: false description: Contract reminder. required: - contract_id - date_time - id - message - subject - users properties: contract_id: description: The id of the contract. type: integer format: signed_integer_id date_time: description: The date and time the reminder should send. type: string format: datetime id: description: The id of the reminder. type: integer format: signed_integer_id message: description: The message of the reminder. type: string minLength: 1 maxLength: 5000 subject: description: The subject of the reminder. type: string minLength: 1 maxLength: 150 users: description: An object containing users of a reminder. type: object additionalProperties: false required: - created_by - recipients properties: created_by: type: object additionalProperties: false required: - email - id - name properties: email: type: string format: email id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 1024 recipients: description: The list of recipients for a particular reminder. type: array items: type: object additionalProperties: false required: - email - id - name properties: email: type: string format: email id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 1024 examples: contractRemindersResponseExample: value: _links: next: href: null previous: href: null self: href: https://api.oneflow.com/v1/contracts/10001/reminders?offset=0&limit=100 count: 1 data: - contract_id: 10001 date_time: '2023-05-10T06:30:00+00:00' id: 400001 message: sample reminder message subject: sample reminder subject users: created_by: email: oliver.queen@qc.com id: 190001 name: Oliver Queen recipients: - email: oliver.queen@qc.com id: 190001 name: Oliver Queen - email: john.diggel@qc.com id: 190002 name: John Diggle - email: wally.west@qc.com id: 190003 name: Wally West '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. post: x-tag: Contract - Reminders summary: Create a reminder operationId: public_api.api.v1.contract_reminder_create.handler description: Use this endpoint to create a internal reminder to the owner side participants on the contract. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 requestBody: description: Request body parameters for creating a reminder. required: true content: application/json: schema: type: object additionalProperties: false required: - date_time - message - subject - reminder_recipients properties: date_time: description: The date and time the reminder should send. It should be a future date and time. type: string format: datetime example: '2023-05-10T12:00:00+05:30' message: description: The message of the reminder. type: string minLength: 1 maxLength: 5000 example: sample reminder message subject: description: The subject of the reminder. type: string minLength: 1 maxLength: 150 example: sample reminder subject reminder_recipients: description: Users of the account who are owner side participants of the contract to be reminded. type: array items: type: object additionalProperties: false required: - id properties: id: description: The user ID of a owner side participant. type: integer format: signed_integer_id example: 190001 examples: contractReminderCreateRequestExample: value: date_time: '2023-05-10T12:00:00+05:30' message: sample reminder message subject: sample reminder subject reminder_recipients: - id: 190001 - id: 190002 - id: 190003 responses: '200': description: Reminder is created successfully. '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. /contracts/{contract_id}/reminders/{reminder_id}: get: x-tag: Contract - Reminders summary: Get a reminder by ID operationId: public_api.api.v1.contract_reminder_get.handler description: Use this endpoint to get a reminder on the contract. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: reminder_id in: path required: true description: The unique ID of the contract reminder. schema: type: integer format: signed_integer_id example: 400001 responses: '200': description: Return a reminder. content: application/json: schema: type: object additionalProperties: false description: Contract reminder. required: - contract_id - date_time - id - message - subject - users properties: contract_id: description: The id of the contract. type: integer format: signed_integer_id date_time: description: The date and time the reminder should send. type: string format: datetime id: description: The id of the reminder. type: integer format: signed_integer_id message: description: The message of the reminder. type: string minLength: 1 maxLength: 5000 subject: description: The subject of the reminder. type: string minLength: 1 maxLength: 150 users: description: An object containing users of a reminder. type: object additionalProperties: false required: - created_by - recipients properties: created_by: type: object additionalProperties: false required: - email - id - name properties: email: type: string format: email id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 1024 recipients: description: The list of recipients for a particular reminder. type: array items: type: object additionalProperties: false required: - email - id - name properties: email: type: string format: email id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 1024 examples: contractReminderResponseExample: value: contract_id: 10001 date_time: '2023-05-10T06:30:00+00:00' id: 400001 message: sample reminder message subject: sample reminder subject users: created_by: email: oliver.queen@qc.com id: 190001 name: Oliver Queen recipients: - email: oliver.queen@qc.com id: 190001 name: Oliver Queen - email: john.diggel@qc.com id: 190002 name: John Diggle - email: wally.west@qc.com id: 190003 name: Wally West '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. put: x-tag: Contract - Reminders summary: Update a reminder by ID operationId: public_api.api.v1.contract_reminder_put.handler description: Use this endpoint to update an internal reminder which is already existing on a contract. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: reminder_id in: path required: true description: The unique ID of the contract reminder. schema: type: integer format: signed_integer_id example: 400001 requestBody: description: Request body parameters for updating a reminder. required: true content: application/json: schema: type: object additionalProperties: false properties: date_time: description: The date and time the reminder should send. It should be a future date and time. type: string format: datetime message: description: The message of the reminder. type: string minLength: 1 maxLength: 5000 subject: description: The subject of the reminder. type: string minLength: 1 maxLength: 150 reminder_recipients: description: Users of the account who are owner side participants of the contract to be reminded. type: array items: type: object additionalProperties: false required: - id properties: id: description: The user ID of a owner side participant. type: integer format: signed_integer_id example: 190001 examples: contractReminderUpdateRequestExample: value: date_time: '2023-05-10T12:00:00+05:30' message: sample reminder message subject: sample reminder subject reminder_recipients: - id: 190001 - id: 190002 - id: 190003 responses: '200': description: Returned a updated reminder. content: application/json: schema: type: object additionalProperties: false description: Contract reminder. required: - contract_id - date_time - id - message - subject - users properties: contract_id: description: The id of the contract. type: integer format: signed_integer_id date_time: description: The date and time the reminder should send. type: string format: datetime id: description: The id of the reminder. type: integer format: signed_integer_id message: description: The message of the reminder. type: string minLength: 1 maxLength: 5000 subject: description: The subject of the reminder. type: string minLength: 1 maxLength: 150 users: description: An object containing users of a reminder. type: object additionalProperties: false required: - created_by - recipients properties: created_by: type: object additionalProperties: false required: - email - id - name properties: email: type: string format: email id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 1024 recipients: description: The list of recipients for a particular reminder. type: array items: type: object additionalProperties: false required: - email - id - name properties: email: type: string format: email id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 1024 examples: contractReminderUpdateResponseExample: value: contract_id: 10001 date_time: '2023-05-10T06:30:00+00:00' id: 400001 message: sample reminder message subject: sample reminder subject users: created_by: email: oliver.queen@qc.com id: 190001 name: Oliver Queen recipients: - email: oliver.queen@qc.com id: 190001 name: Oliver Queen - email: john.diggel@qc.com id: 190002 name: John Diggle - email: wally.west@qc.com id: 190003 name: Wally West '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. delete: x-tag: Contract - Reminders summary: Delete a reminder by ID operationId: public_api.api.v1.contract_reminder_delete.handler description: Use this endpoint to delete a reminder on the contract. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: reminder_id in: path required: true description: The unique ID of the contract reminder. schema: type: integer format: signed_integer_id example: 400001 responses: '200': description: Reminder is deleted successfully. '401': description: The API token or the user email is invalid. '402': description: The feature is not available for your current subscription plan. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /folders/{folder_id}: put: x-tag: Folder summary: Update a folder by ID operationId: public_api.api.v1.folder_update.handler description: Use this endpoint to upadate a specific folder by ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com - name: folder_id in: path required: true description: The unique ID of the folder. schema: type: integer format: signed_integer_id example: 1005 requestBody: description: Request body parameters for updating a folder. required: true content: application/json: schema: type: object additionalProperties: false description: Request body to update a folder. required: - name properties: name: description: The folder's name. type: string minLength: 1 maxLength: 130 examples: folderUpdateRequestExample: value: name: Update Folder responses: '200': description: Returned an updated folder. content: application/json: schema: additionalProperties: false required: - _permissions - id - name - parent_id - path - workspace_id description: A folder. properties: _permissions: type: object additionalProperties: false description: This attribute contains the permissions for various operations possible on the folders. required: - folder:contract - folder:delete - folder:sub_folder:create - folder:update properties: folder:contract: type: boolean folder:delete: type: boolean folder:sub_folder:create: type: boolean folder:update: type: boolean id: description: Folder ID type: integer format: signed_integer_id name: description: Folder name. type: string parent_id: description: If exist any parent folder, its ID. type: integer format: signed_integer_id nullable: true path: description: An array of folder IDs representing the path from the top of the hierarchy to the current folder. type: array items: type: integer format: signed_integer_id workspace_id: description: workspace ID type: integer format: signed_integer_id examples: folderUpdateResponseExample: value: _permissions: folder:contract: true folder:delete: true folder:sub_folder:create: true folder:update: true id: 380001 name: Update Folder parent_id: null path: - 380001 workspace_id: 130001 '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. delete: x-tag: Folder summary: Delete a folder by ID operationId: public_api.api.v1.folder_delete.handler description: Use this endpoint to delete a specific folder by ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com - name: folder_id in: path required: true description: The unique ID of the folder. schema: type: integer format: signed_integer_id example: 1005 responses: '200': description: The folder was deleted successfully. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /helpers/contract_create_data: get: x-tag: Helpers summary: Get data to create a contract operationId: public_api.api.v1.contract_create_data.handler description: Use this endpoint to retrieve the workspaces with their templates. This data is essential for creating a contract. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: type: string format: email example: john.doe@oneflow.com - name: extension_type in: query required: false description: Cross-account way of finding template groups used by specific integration extensions. Set by Oneflow when the extension is created. schema: type: string pattern: ^[a-zA-Z0-9_]+$ minLength: 1 maxLength: 100 example: hubspot - name: template_type_id in: query required: false description: The unique ID of the template type. schema: type: integer format: signed_integer_id example: 220001 responses: '200': description: Returns the workspaces with embedded templates for creating a contract. content: application/json: schema: type: array items: type: object additionalProperties: false required: - id - name - templates description: A list of Oneflow workspaces with templates for creating a contract. properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 50 templates: type: array items: type: object additionalProperties: false required: - available_options - created_time - id - name - tags - template_type - updated_time description: A template for a contract. See [Template](doc:template) for more information. properties: available_options: type: object additionalProperties: false description: Available options in the contract. See [Available options](doc:contract#available-options). required: - can_receive_attachments - can_receive_expanded_pdf - can_receive_products - delivery_channels - sign_methods - two_step_authentication_methods properties: can_receive_attachments: type: boolean can_receive_expanded_pdf: type: boolean can_receive_products: type: boolean delivery_channels: type: array items: description: See [Delivery channel options](contract#delivery-channels). type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string sign_methods: type: array items: description: This attribute is only allowed for participants with the role signatory. For signatories it is required. Note that the participant role defaults to signatory. See [Contract sign methods](doc:contract#sign-methods). type: object additionalProperties: false required: - name - preferred properties: name: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown preferred: type: boolean two_step_authentication_methods: type: array items: description: See [Two-step authentication methods](doc:contract#two-step-authentication-methods) type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string created_time: type: string format: datetime id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 130 tags: type: array description: All tags associated with the template. items: type: object additionalProperties: false required: - id - name properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 template_active: type: boolean template_type: type: object additionalProperties: false description: An optional type for the template meaning it supports a specific set of template variables. See [Template type](doc:template-type). nullable: true required: - created_time - description - extension_type - id - name - updated_time properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true created_time: type: string nullable: true format: datetime description: type: string minLength: 0 maxLength: 300 extension_type: type: string nullable: true id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 updated_time: type: string nullable: true format: datetime updated_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true examples: contractCreateDataResponseExample: description: 'A sample returned data with workspaces and templates:' value: - id: 130001 name: Best Workspace templates: - available_options: can_receive_attachments: false can_receive_expanded_pdf: false can_receive_products: true delivery_channels: - name: email preferred: true required_participant_attributes: - email - name: none preferred: false required_participant_attributes: [] - name: same_device preferred: false required_participant_attributes: - sign_method - name: sms preferred: false required_participant_attributes: - phone_number sign_methods: - name: sms preferred: false - name: standard_esign preferred: true two_step_authentication_methods: - name: email preferred: false required_participant_attributes: - email - name: none preferred: true required_participant_attributes: [] - name: sms preferred: false required_participant_attributes: - phone_number created_time: '2023-04-20T11:49:44+00:00' id: 170001 name: Sales Proposal template tags: [] template_active: true template_type: created_time: '2021-07-05T07:28:26+00:00' description: Hubspot data fields extension_type: hubspot id: 220001 name: Hubspot Template updated_time: '2023-04-03T12:41:41+00:00' updated_time: '2023-04-20T11:50:20+00:00' - available_options: can_receive_attachments: false can_receive_expanded_pdf: false can_receive_products: false delivery_channels: - name: email preferred: true required_participant_attributes: - email - name: none preferred: false required_participant_attributes: [] - name: same_device preferred: false required_participant_attributes: - sign_method - name: sms preferred: false required_participant_attributes: - phone_number sign_methods: - name: sms preferred: false - name: standard_esign preferred: true two_step_authentication_methods: - name: email preferred: false required_participant_attributes: - email - name: none preferred: true required_participant_attributes: [] - name: sms preferred: false required_participant_attributes: - phone_number created_time: '2023-04-26T06:50:39+00:00' id: 170002 name: Test template tags: - id: 380001 name: tag one template_active: true template_type: null updated_time: '2023-04-26T06:52:30+00:00' '400': description: Invalid format or content of the request. '403': description: The request is not authorized by the server. /helpers/template_types/{template_type_id}/data_fields: get: x-tag: Helpers summary: Get template type data fields operationId: public_api.api.v1.template_type_data_fields_list.handler description: Use this endpoint to return the data fields of the specified template type. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: template_type_id in: path required: true description: The unique ID of the template type. schema: type: integer format: signed_integer_id example: 220001 responses: '200': description: Returns [data field](data-field)s of the specified template type. content: application/json: schema: type: object additionalProperties: false description: An array of the current data fields in the template type. required: - data_fields properties: data_fields: type: array items: type: object additionalProperties: false description: Attributes of a data field in a template type. required: - active - custom_id - description - id - name - placeholder - source - value properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true active: type: boolean custom_id: type: string minLength: 1 maxLength: 100 nullable: true description: type: string minLength: 0 maxLength: 300 id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 placeholder: type: string nullable: true maxLength: 100 source: type: string description: One of the (sources)(data-field#source) of the data field. enum: - system - user value: type: string nullable: true maxLength: 1024 examples: templateTypeDatafieldsResponseExample: description: 'A sample response with a list of data fields in a template type:' value: data_fields: - _links: template_type: href: https://api.oneflow.com/v1/template_types/220001 active: true custom_id: custom_id_participant_last_name description: The last name of a participant in a contract. id: 3001 name: Participant Last Name placeholder: Last Name source: system value: Smith - _links: template_type: href: https://api.oneflow.com/v1/template_types/220001 active: true custom_id: custom_id_company_address description: '' id: 3002 name: Company address placeholder: null source: system value: 1234 Main Street - _links: template_type: href: https://api.oneflow.com/v1/template_types/220001 active: true custom_id: custom_id_participant_position description: '' id: 3003 name: Participant's position in company. placeholder: null source: user value: null '400': description: Invalid format or content of the request. '404': description: A required entity is missing. /tags: get: x-tag: Tag summary: Get tags operationId: public_api.api.v1.tags_list.handler description: Use this endpoint to retrieve the list of all tags for the given account. See [Tag](doc:tag-1) for more information. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com - name: offset in: query required: false schema: type: integer minimum: 0 maximum: 19900 default: 0 example: 0 - name: limit in: query required: false schema: type: integer minimum: 1 maximum: 100 default: 100 example: 100 - name: sort description: "A comma-separated list of columns by which results are sorted. Valid columns:\n * name\n * id\n" in: query required: false schema: type: string example: -name,id - name: filter description: An object containing key-value pairs to filter results. in: query required: false style: deepObject explode: true schema: type: object additionalProperties: false properties: name: description: Filter tags by the tag name. type: string maxLength: 30 responses: '200': description: Returns the list of tags in an account. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A list of tags in an account. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true count: type: integer data: type: array items: type: object additionalProperties: false required: - created_time - id - is_global - name - shared_workspaces - system - updated_time properties: created_time: type: string format: datetime nullable: true id: type: integer format: signed_integer_id is_global: type: boolean name: type: string minLength: 1 shared_workspaces: type: array items: type: object additionalProperties: false required: - id - name properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 50 system: type: boolean updated_time: type: string format: datetime nullable: true examples: tagsResponseExample: description: 'A sample list of tags from an account:' value: _links: next: href: null previous: href: null self: href: https://api.oneflow.com/v1/tags?limit=100&offset=0 count: 2 data: - created_time: '2019-01-02T09:25:00+00:00' id: 1 is_global: true name: __system_import shared_workspaces: [] system: true updated_time: '2019-01-02T09:25:00+00:00' - created_time: '2021-05-18T11:00:00+00:00' id: 380001 is_global: true name: tag one shared_workspaces: [] system: false updated_time: '2021-05-18T11:00:00+00:00' - created_time: '2021-05-18T15:00:00+00:00' id: 380002 is_global: true name: tag two shared_workspaces: [] system: false updated_time: '2021-05-18T15:00:00+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. post: x-tag: Tag summary: Create a tag operationId: public_api.api.v1.tag_create.handler description: Use this endpoint to create a tag for the given account. See [Tag](doc:tag-1) for more information. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com requestBody: description: Request body parameters for creating a tag. required: true content: application/json: schema: type: object additionalProperties: false description: Request body for a create tag. required: - name properties: name: description: The tag's name. type: string minLength: 1 maxLength: 30 example: tag one examples: tagCreateRequestExample: value: name: tag one responses: '200': description: Returns the created tag. content: application/json: schema: type: object additionalProperties: false required: - created_time - id - is_global - name - shared_workspaces - system - updated_time properties: created_time: type: string format: datetime nullable: true id: type: integer format: signed_integer_id is_global: type: boolean name: type: string minLength: 1 shared_workspaces: type: array items: type: object additionalProperties: false required: - id - name properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 50 system: type: boolean updated_time: type: string format: datetime nullable: true examples: tagCreateResponseExample: description: 'A sample response of a Tag:' value: created_time: '2021-05-18T11:00:00+00:00' id: 380001 is_global: true name: tag one shared_workspaces: [] system: false updated_time: '2021-05-18T11:00:00+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '409': description: A conflict occurred with the current state of the target resource. /tags/{tag_id}: delete: x-tag: Tag summary: Delete a tag by ID operationId: public_api.api.v1.tag_delete.handler description: Use this endpoint to delete a specific tag by ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com - name: tag_id in: path required: true description: The unique ID of the tag. schema: type: integer format: signed_integer_id example: 380001 responses: '200': description: The tag was deleted successfully. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. put: x-tag: Tag summary: Update a tag by ID operationId: public_api.api.v1.tag_put.handler description: Use this endpoint to update a specific tag by ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com - name: tag_id in: path required: true description: The unique ID of the tag. schema: type: integer format: signed_integer_id example: 380001 requestBody: description: Request body parameters for update a tag. required: true content: application/json: schema: type: object additionalProperties: false description: Request body for a create tag. required: - name properties: name: description: The tag's name. type: string minLength: 1 maxLength: 30 example: tag one examples: tagUpdateRequestBodyExample: value: name: tag one responses: '200': description: Returns the updated tag. content: application/json: schema: type: object additionalProperties: false required: - created_time - id - is_global - name - shared_workspaces - system - updated_time properties: created_time: type: string format: datetime nullable: true id: type: integer format: signed_integer_id is_global: type: boolean name: type: string minLength: 1 shared_workspaces: type: array items: type: object additionalProperties: false required: - id - name properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 50 system: type: boolean updated_time: type: string format: datetime nullable: true examples: tagResponseExample: description: 'A sample response of a Tag:' value: created_time: '2021-05-18T11:00:00+00:00' id: 380001 is_global: true name: tag one shared_workspaces: [] system: false updated_time: '2021-05-18T11:00:00+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. get: x-tag: Tag summary: Get a tag by ID operationId: public_api.api.v1.tag_get.handler description: Use this endpoint to get a specific tag by ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com - name: tag_id in: path required: true description: The unique ID of the tag. schema: type: integer format: signed_integer_id example: 380001 responses: '200': description: Returns the specific tag. content: application/json: schema: type: object additionalProperties: false required: - created_time - id - is_global - name - shared_workspaces - system - updated_time properties: created_time: type: string format: datetime nullable: true id: type: integer format: signed_integer_id is_global: type: boolean name: type: string minLength: 1 shared_workspaces: type: array items: type: object additionalProperties: false required: - id - name properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 50 system: type: boolean updated_time: type: string format: datetime nullable: true examples: tagResponseExample: description: 'A sample response of a Tag:' value: created_time: '2021-05-18T11:00:00+00:00' id: 380001 is_global: true name: tag one shared_workspaces: [] system: false updated_time: '2021-05-18T11:00:00+00:00' '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. /templates: get: x-tag: Templates summary: Get templates operationId: public_api.api.v1.templates_list.handler description: Use this endpoint to retrieve the list of templates available for the specified user. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com - name: offset in: query required: false schema: type: integer minimum: 0 maximum: 19900 default: 0 example: 0 - name: limit in: query required: false schema: type: integer minimum: 1 maximum: 100 default: 100 example: 100 - name: filter description: An object containing key-value pairs to filter results. in: query required: false style: deepObject explode: true schema: type: object additionalProperties: false properties: workspace_ids: description: Filter templates from workspaces that are in the specified comma-separated list of workspace IDs. type: string maxLength: 100 active: description: Filter templates whether they are active or inactive. type: string enum: - 'true' - 'false' - '' default: 'true' - name: extension_type in: query required: false description: Cross-account way of finding template groups used by specific integration extensions. Set by Oneflow when the extension is created. schema: type: string pattern: ^[a-zA-Z0-9_]+$ minLength: 1 maxLength: 100 example: hubspot - name: template_type_id in: query required: false description: The unique ID of the template type. schema: type: integer format: signed_integer_id example: 220001 - name: sort description: "A comma-separated list of columns by which results are sorted. Valid columns:\n * name\n" in: query required: false schema: type: string example: name responses: '200': description: Returns the list of [template](template)s. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A collection of templates. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true count: type: integer data: type: array items: type: object additionalProperties: false required: - available_options - created_time - configuration - id - name - tags - template_type - updated_time - workspaces description: A template for a contract. See [Template](doc:template) for more information. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true available_options: type: object additionalProperties: false description: Available options in the contract. See [Available options](doc:contract#available-options). required: - can_receive_attachments - can_receive_expanded_pdf - can_receive_products - delivery_channels - sign_methods - two_step_authentication_methods properties: can_receive_attachments: type: boolean can_receive_expanded_pdf: type: boolean can_receive_products: type: boolean delivery_channels: type: array items: description: See [Delivery channel options](contract#delivery-channels). type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string sign_methods: type: array items: description: This attribute is only allowed for participants with the role signatory. For signatories it is required. Note that the participant role defaults to signatory. See [Contract sign methods](doc:contract#sign-methods). type: object additionalProperties: false required: - name - preferred properties: name: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown preferred: type: boolean two_step_authentication_methods: type: array items: description: See [Two-step authentication methods](doc:contract#two-step-authentication-methods) type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string created_time: type: string format: datetime configuration: type: object additionalProperties: false required: - default_creator_roles description: Default configuration details of a template nullable: true properties: default_creator_roles: type: object additionalProperties: false required: - _permissions - organizer - signatory description: Roles of a default contract creator who creates contracts using a specific template. properties: _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean organizer: description: A flag to indicate that the default contract creator functions as an organizer. type: boolean signatory: description: A flag to indicate that the default contract creator functions as a signatory. type: boolean id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 130 tags: type: array description: All tags associated with the template. items: type: object additionalProperties: false required: - id - name properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 template_active: type: boolean template_type: type: object additionalProperties: false description: An optional type for the template meaning it supports a specific set of template variables. See [Template type](doc:template-type). nullable: true required: - created_time - description - extension_type - id - name - updated_time properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true created_time: type: string nullable: true format: datetime description: type: string minLength: 0 maxLength: 300 extension_type: type: string nullable: true id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 updated_time: type: string nullable: true format: datetime updated_time: type: string format: datetime nullable: true workspaces: type: array description: All workspaces associated with the template. items: type: object additionalProperties: false description: A workspace to which the template belongs or is shared required: - id - name properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 nullable: true examples: templatesResponseExample: description: 'A sample response with a list of templates:' value: _links: next: href: null previous: href: null self: href: https://api.oneflow.com/v1/templates?limit=100&offset=0 count: 2 data: - _links: self: href: https://api.oneflow.com/v1/templates/170001 template_type: href: https://api.oneflow.com/v1/template_types/220001 available_options: can_receive_attachments: false can_receive_expanded_pdf: false can_receive_products: true delivery_channels: - name: email preferred: true required_participant_attributes: - email - name: none preferred: false required_participant_attributes: [] - name: same_device preferred: false required_participant_attributes: - sign_method - name: sms preferred: false required_participant_attributes: - phone_number sign_methods: - name: sms preferred: false - name: standard_esign preferred: true two_step_authentication_methods: - name: email preferred: false required_participant_attributes: - email - name: none preferred: true required_participant_attributes: [] - name: sms preferred: false required_participant_attributes: - phone_number configuration: default_creator_roles: _permissions: contract:update: true organizer: false signatory: true created_time: '2023-04-20T11:49:44+00:00' id: 170001 name: Sales Proposal template tags: [] template_active: true template_type: created_time: '2021-07-05T07:28:26+00:00' description: Hubspot data fields extension_type: hubspot id: 220001 name: Hubspot Template updated_time: '2023-04-03T12:41:41+00:00' updated_time: '2023-04-20T11:50:20+00:00' workspaces: - id: 398200 name: oneflow-collection - id: 398201 name: Test-workspace - _links: self: href: https://api.oneflow.com/v1/templates/170002 template_type: href: null available_options: can_receive_attachments: false can_receive_expanded_pdf: false can_receive_products: false delivery_channels: - name: email preferred: true required_participant_attributes: - email - name: none preferred: false required_participant_attributes: [] - name: same_device preferred: false required_participant_attributes: - sign_method - name: sms preferred: false required_participant_attributes: - phone_number sign_methods: - name: sms preferred: false - name: standard_esign preferred: true two_step_authentication_methods: - name: email preferred: false required_participant_attributes: - email - name: none preferred: true required_participant_attributes: [] - name: sms preferred: false required_participant_attributes: - phone_number configuration: default_creator_roles: _permissions: contract:update: true organizer: true signatory: false created_time: '2023-04-26T06:50:39+00:00' id: 170002 name: Test template tags: - id: 380001 name: tag one template_active: true template_type: null updated_time: '2023-04-26T06:52:30+00:00' workspaces: - id: 398200 name: oneflow-collection '400': description: Invalid format or content of the request. /templates/{template_id}: get: x-tag: Templates summary: Get a template by ID operationId: public_api.api.v1.template_get.handler description: Use this endpoint to retrieve a specific template by its ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com - name: template_id in: path required: true description: The unique ID of the template. schema: type: integer format: signed_integer_id example: 170001 responses: '200': description: Returns the requested [template](template). content: application/json: schema: type: object additionalProperties: false required: - available_options - attachment_file_groups - configuration - created_time - id - name - parties - pdf_file_groups - product_groups - tags - template_type - updated_time - workspaces description: A template for a contract. See [Template](doc:template) for more information properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true available_options: type: object additionalProperties: false description: Available options in the contract. See [Available options](doc:contract#available-options). required: - can_receive_attachments - can_receive_expanded_pdf - can_receive_products - delivery_channels - sign_methods - two_step_authentication_methods properties: can_receive_attachments: type: boolean can_receive_expanded_pdf: type: boolean can_receive_products: type: boolean delivery_channels: type: array items: description: See [Delivery channel options](contract#delivery-channels). type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string sign_methods: type: array items: description: This attribute is only allowed for participants with the role signatory. For signatories it is required. Note that the participant role defaults to signatory. See [Contract sign methods](doc:contract#sign-methods). type: object additionalProperties: false required: - name - preferred properties: name: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown preferred: type: boolean two_step_authentication_methods: type: array items: description: See [Two-step authentication methods](doc:contract#two-step-authentication-methods) type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string attachment_file_groups: type: array description: A list of attachment type file groups in the contract. items: description: A file group represents an expanded PDF session or attachment session in the contract. type: object additionalProperties: false required: - _private_ownerside - files - id - type properties: _private_ownerside: type: object description: File group data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true files: type: array items: type: object additionalProperties: false description: A single file of the contract file group. required: - _private_ownerside - extension - id - name - size properties: _private_ownerside: type: object description: File data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true extension: description: The file extension. type: string nullable: true id: type: integer format: signed_integer_id name: description: The name of the file. type: string nullable: true size: description: The size of the file in bytes. type: integer nullable: true id: type: integer format: unsigned_integer_id type: type: string description: The file group type of the file group sections. There are only two types available, `attachment` and `pdf`. enum: - attachment - pdf configuration: type: object additionalProperties: false required: - default_creator_roles description: Default configuration details of a template nullable: true properties: default_creator_roles: type: object additionalProperties: false required: - _permissions - organizer - signatory description: Roles of a default contract creator who creates contracts using a specific template. properties: _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean organizer: description: A flag to indicate that the default contract creator functions as an organizer. type: boolean signatory: description: A flag to indicate that the default contract creator functions as a signatory. type: boolean created_time: type: string format: datetime id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 130 parties: type: array description: The parties involved in this template. items: oneOf: - title: Individual description: An individual party, where a single participant is signing on behalf of him- or herself. See [Individual party](doc:party#individual) type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participant - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true participant: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `individual`. enum: - individual - title: Company description: The participants are signing on behalf of this company. See [Company party](doc:party#company). type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participants - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 participants: description: The maximum number of participants per contract across all parties is 40. type: array items: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `company`. enum: - company discriminator: propertyName: type mapping: individual: contract_party_individual.yml company: contract_party_company.yml pdf_file_groups: type: array description: A list of expanded pdf type file groups in the contract. items: description: A file group represents an expanded PDF session or attachment session in the contract. type: object additionalProperties: false required: - _private_ownerside - files - id - type properties: _private_ownerside: type: object description: File group data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true files: type: array items: type: object additionalProperties: false description: A single file of the contract file group. required: - _private_ownerside - extension - id - name - size properties: _private_ownerside: type: object description: File data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true extension: description: The file extension. type: string nullable: true id: type: integer format: signed_integer_id name: description: The name of the file. type: string nullable: true size: description: The size of the file in bytes. type: integer nullable: true id: type: integer format: unsigned_integer_id type: type: string description: The file group type of the file group sections. There are only two types available, `attachment` and `pdf`. enum: - attachment - pdf product_groups: description: A list of product groups. type: array items: description: A product group represents a product table in the contract, see [Product group](doc:product-group). type: object additionalProperties: false required: - _private_ownerside - configuration - enabled_columns - id - products properties: _private_ownerside: type: object description: Product group data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true configuration: type: object additionalProperties: false description: Updated product group configuration properties: columns: type: array items: type: object additionalProperties: false description: Product group columns data. required: - key properties: enabled: type: boolean key: description: One of the product group column keys. type: string enum: - name - description - price_1 - price_2 - count label: type: string counterpart_edit: type: boolean hide_price_summation: type: boolean price_affixes: type: object additionalProperties: false description: Postfix and prefix of a contract product price. properties: postfix: type: string prefix: type: string created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true enabled_columns: type: array items: type: object additionalProperties: false description: An individual product table columns enable information. required: - enabled - key properties: enabled: type: boolean key: type: string minLength: 0 maxLength: 80 id: type: integer format: unsigned_integer_id products: type: array items: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity tags: type: array description: All tags associated with the template. items: type: object additionalProperties: false required: - id - name properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 template_active: type: boolean template_type: type: object additionalProperties: false description: An optional type for the template meaning it supports a specific set of template variables. See [Template type](doc:template-type). nullable: true required: - created_time - description - extension_type - id - name - updated_time properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true created_time: type: string nullable: true format: datetime description: type: string minLength: 0 maxLength: 300 extension_type: type: string nullable: true id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 updated_time: type: string nullable: true format: datetime updated_time: type: string format: datetime nullable: true workspaces: type: array description: All workspaces associated with the template. items: type: object additionalProperties: false description: A workspace to which the template belongs or is shared required: - id - name properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 nullable: true examples: templateResponseExample: description: 'A sample response of a template:' value: _links: self: href: https://api.oneflow.com/v1/templates/170001 template_type: href: https://api.oneflow.com/v1/template_types/220001 attachment_file_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T17:59:12+00:00' files: - _private_ownerside: created_time: '2023-04-27T17:59:12+00:00' updated_time: '2023-04-27T17:59:20+00:00' extension: docx id: 1200001 name: attachment_sample_doc size: 4168 - _private_ownerside: created_time: '2023-04-27T17:59:12+00:00' updated_time: '2023-04-27T17:59:22+00:00' extension: pdf id: 1200002 name: attachment_sample_pdf size: 6586 id: 920001 type: attachment available_options: can_receive_attachments: false can_receive_expanded_pdf: false can_receive_products: true delivery_channels: - name: email preferred: true required_participant_attributes: - email - name: none preferred: false required_participant_attributes: [] - name: same_device preferred: false required_participant_attributes: - sign_method - name: sms preferred: false required_participant_attributes: - phone_number sign_methods: - name: sms preferred: false - name: standard_esign preferred: true two_step_authentication_methods: - name: email preferred: false required_participant_attributes: - email - name: none preferred: true required_participant_attributes: [] - name: sms preferred: false required_participant_attributes: - phone_number configuration: default_creator_roles: _permissions: contract:update: true organizer: false signatory: true created_time: '2023-04-20T11:49:44+00:00' id: 170001 name: Sales Proposal template parties: - _private_ownerside: created_time: '2023-04-20T11:50:44+00:00' updated_time: '2023-04-20T11:50:44+00:00' country_code: SE id: 470001 identification_number: 11223344-5566 my_party: true name: Own Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-20T11:50:44+00:00' first_visited_time: null last_visited_time: null updated_time: '2023-04-20T11:50:44+00:00' visits: 0 delivery_channel: email delivery_status: success email: own@email.com id: 230001 identification_number: 10034544-0066 my_participant: true name: First Last organizer: false phone_number: '+111222333444' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: Sales Manager two_step_authentication_method: email type: company - _private_ownerside: created_time: '2023-04-20T11:51:44+00:00' updated_time: '2023-04-20T11:51:44+00:00' country_code: SE id: 470002 identification_number: 11223344-5577 my_party: false name: Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-20T11:51:44+00:00' first_visited_time: null last_visited_time: null updated_time: '2023-04-20T11:51:44+00:00' visits: 0 delivery_channel: email delivery_status: success email: mem@email.com id: 230002 identification_number: 10034544-0077 my_participant: false name: Firstname Lastname organizer: false phone_number: '+111222333555' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: company - _private_ownerside: created_time: '2023-04-20T11:52:44+00:00' updated_time: '2023-04-20T11:52:44+00:00' country_code: SE id: 470003 identification_number: 10034544-0088 my_party: false name: Firstname2 Lastname2 participant: _permissions: contract:update: true _private_ownerside: created_time: '2023-04-20T11:52:44+00:00' first_visited_time: null last_visited_time: null updated_time: '2023-04-20T11:52:44+00:00' visits: 0 delivery_channel: email delivery_status: success email: individual@email.com id: 230003 identification_number: 10034544-0088 my_participant: false name: Firstname2 Lastname2 organizer: false phone_number: '+111222333666' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: individual pdf_file_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T17:59:12+00:00' files: - _private_ownerside: created_time: '2023-04-27T17:59:12+00:00' updated_time: '2023-04-27T17:59:18+00:00' extension: pdf id: 1200003 name: expanded_sample_pdf size: 6586 id: 920002 type: pdf product_groups: - _private_ownerside: created_time: '2023-04-20T11:55:44+00:00' updated_time: '2023-04-20T11:55:44+00:00' configuration: columns: - enabled: true key: name label: Product - enabled: true key: description label: Description - enabled: true key: price_1 label: Price 1 - enabled: true key: price_2 label: Price 2 - enabled: true key: count label: Value hide_price_summation: false price_affixes: postfix: '' prefix: '' enabled_columns: - enabled: true key: name - enabled: true key: description - enabled: true key: price_1 - enabled: true key: price_2 - enabled: true key: count id: 85001 products: - _private_ownerside: created_time: '2023-04-20T11:55:44+00:00' custom_id: null updated_time: '2023-04-20T11:55:56+00:00' counterparty_lock: false description: '' id: 150001 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: quantity tags: [] template_active: true template_type: created_time: '2021-07-05T07:28:26+00:00' description: Hubspot data fields extension_type: hubspot id: 220001 name: Hubspot Template updated_time: '2023-04-03T12:41:41+00:00' updated_time: '2023-04-20T11:55:56+00:00' '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. /templates/{template_id}/files/{file_id}: get: x-tag: Templates summary: Get a template file by ID operationId: public_api.api.v1.template_file_get.handler description: Use this endpoint to retrieve a specific template file by its ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: template_id in: path required: true description: The unique ID of the template. schema: type: integer format: signed_integer_id example: 170001 - name: file_id in: path required: true description: The ID of a file. schema: type: integer format: signed_integer_id example: 1 - name: download in: query required: false description: If set to true, the file will be downloaded. The default value is false; in this case, only the file metadata will be returned. schema: type: boolean example: false responses: '200': description: Returns the requested template file. content: application/json: schema: type: object additionalProperties: false description: Contract file. required: - extension - id - name - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object additionalProperties: false description: File data that is private to the ownerside. nullable: true required: - created_time properties: created_time: type: string format: datetime nullable: true extension: description: The file extension nullable: true type: string minLength: 1 maxLength: 20 id: type: integer format: signed_integer_id name: description: The name of the file. nullable: true type: string minLength: 0 maxLength: 255 type: type: string description: One of the contract [file types](doc:contract-file#contract-file-types). enum: - contract - verification - attachment - pdf - unknown examples: templateFileResponseExample: description: 'A sample response containing metadata for a specific file inside a template:' value: _links: self: href: https://api.oneflow.com/v1/templates/170001/files/1 template: href: https://api.oneflow.com/v1/templates/170001 _private_ownerside: created_time: null extension: pdf id: 1 name: Contract type: contract '302': description: A redirect to the requested pdf template file. '400': description: Invalid format or content of the request. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /template_types: post: x-tag: Template types summary: Create a template type operationId: public_api.api.v1.template_type_create.handler description: Use this endpoint to create a template type. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 requestBody: description: Request body parameters for creating a template type. required: true content: application/json: schema: type: object additionalProperties: false description: Schema for template type request body. required: - name properties: name: description: The name of the template type. type: string minLength: 1 maxLength: 100 example: test_template_type description: description: The description of the template type. type: string minLength: 0 maxLength: 300 example: simple template type examples: templateTypeCreateRequestBodyExample: value: name: test_template_type description: simple template type responses: '200': description: Returns the created [template type](template_type). content: application/json: schema: type: object additionalProperties: false description: See [Template type](doc:template-type). required: - active - created_time - data_fields - description - extension_type - id - name - updated_time properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true active: type: boolean created_time: type: string format: datetime data_fields: type: array items: type: object additionalProperties: false description: Attributes of a data field in a template type. required: - active - custom_id - description - id - name - placeholder - source - value properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true active: type: boolean custom_id: type: string minLength: 1 maxLength: 100 nullable: true description: type: string minLength: 0 maxLength: 300 id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 placeholder: type: string nullable: true maxLength: 100 source: type: string description: One of the (sources)(data-field#source) of the data field. enum: - system - user value: type: string nullable: true maxLength: 1024 description: type: string nullable: true minLength: 0 maxLength: 300 extension_type: type: string nullable: true id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 updated_time: type: string nullable: true format: datetime examples: templateTypeCreateResponseExample: description: 'A sample template type create response:' value: _links: self: href: https://api.oneflow.com/v1/template_types/1001 active: true created_time: '2023-03-27T16:45:56+00:00' data_fields: [] description: simple template type extension_type: null id: 1001 name: test_template_type updated_time: '2023-04-27T16:45:56+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. get: x-tag: Template types summary: Get template types operationId: public_api.api.v1.template_types_list.handler description: Use this endpoint to retrieve a list of template types available for the specified user. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com - name: extension_type in: query required: false description: Cross-account way of finding template groups used by specific integration extensions. Set by Oneflow when the extension is created. schema: type: string pattern: ^[a-zA-Z0-9_]+$ minLength: 1 maxLength: 100 example: hubspot - name: offset in: query required: false schema: type: integer minimum: 0 maximum: 19900 default: 0 example: 0 - name: limit in: query required: false schema: type: integer minimum: 1 maximum: 100 default: 100 example: 100 - name: sort description: "A comma-separated list of columns by which results are sorted. Valid columns:\n * name\n" in: query required: false schema: type: string example: name responses: '200': description: Returns the list of [template type](template-type)s. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A collection of templates. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true count: type: integer data: type: array items: type: object additionalProperties: false description: An optional type for the template meaning it supports a specific set of template variables. See [Template type](doc:template-type). nullable: true required: - created_time - description - extension_type - id - name - updated_time properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true created_time: type: string nullable: true format: datetime description: type: string minLength: 0 maxLength: 300 extension_type: type: string nullable: true id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 updated_time: type: string nullable: true format: datetime examples: templateTypesResponseExample: description: 'A sample response with a list of template types:' value: _links: next: href: null previous: href: null self: href: https://api.oneflow.com/v1/template_types?limit=100&offset=0 count: 2 data: - _links: self: href: https://api.oneflow.com/v1/template_types/220001 created_time: '2021-07-05T07:28:26+00:00' description: Hubspot data fields extension_type: hubspot id: 220001 name: Hubspot Template updated_time: '2023-04-03T12:41:41+00:00' - _links: self: href: https://api.oneflow.com/v1/template_types/220002 created_time: '2023-04-26T03:12:56+00:00' description: sample template type extension_type: null id: 220002 name: Test Template Type updated_time: '2023-04-26T03:12:56+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. /template_types/{template_type_id}: get: x-tag: Template types summary: Get template type by ID operationId: public_api.api.v1.template_type_get.handler description: Use this endpoint to retrieve a specific template type by its ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: template_type_id in: path required: true description: The unique ID of the template type. schema: type: integer format: signed_integer_id example: 220001 responses: '200': description: Returns the requested [template type](template-type). content: application/json: schema: type: object additionalProperties: false description: See [Template type](doc:template-type). required: - active - created_time - data_fields - description - extension_type - id - name - updated_time properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true active: type: boolean created_time: type: string format: datetime data_fields: type: array items: type: object additionalProperties: false description: Attributes of a data field in a template type. required: - active - custom_id - description - id - name - placeholder - source - value properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true active: type: boolean custom_id: type: string minLength: 1 maxLength: 100 nullable: true description: type: string minLength: 0 maxLength: 300 id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 placeholder: type: string nullable: true maxLength: 100 source: type: string description: One of the (sources)(data-field#source) of the data field. enum: - system - user value: type: string nullable: true maxLength: 1024 description: type: string nullable: true minLength: 0 maxLength: 300 extension_type: type: string nullable: true id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 updated_time: type: string nullable: true format: datetime examples: templateTypeResponseExample: description: 'A sample template type with data fields:' value: _links: self: href: https://api.oneflow.com/v1/template_types/220001 active: true created_time: '2023-04-26T03:12:56+00:00' data_fields: - active: true custom_id: first-name description: first name of a person id: 3001 name: First name placeholder: first name source: system value: Foo - active: false custom_id: last-name description: last name of a person id: 3002 name: Last name placeholder: last name source: user value: Bar description: sample template type extension_type: salesforce id: 220001 name: Test Template Type updated_time: '2023-04-26T03:25:14+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. /template_types/{template_type_id}/data_fields: put: x-tag: Template types summary: Update template type data fields operationId: public_api.api.v1.template_type_data_fields_put.handler description: Use this endpoint to update all data fields in the specified template type. See the [Data Field](data-field) for more information. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: type: string format: email example: john.doe@oneflow.com - name: template_type_id in: path required: true description: The unique ID of the template type. schema: type: integer format: signed_integer_id example: 220001 requestBody: description: Request body details for updating data fields. required: true content: application/json: schema: type: object additionalProperties: false description: The array of data fields to be updated and preserved in the template type. required: - data_fields properties: data_fields: description: The list of data fields that belong to the given template type. type: array items: type: object additionalProperties: false description: Attributes of a data field that can be updated in a template type. required: - custom_id - name properties: custom_id: description: The unique name that was given to the data field when it was added to the template type. type: string minLength: 1 maxLength: 100 example: custom_id_participant_last_name description: description: The description of the data field. type: string minLength: 0 maxLength: 300 name: description: The name of the data field. type: string minLength: 1 maxLength: 100 example: Participant Last Name placeholder: description: The placeholder of the data field. nullable: true type: string minLength: 0 maxLength: 100 value: description: The value of the data field. nullable: true type: string minLength: 0 maxLength: 1024 examples: templateTypeDatafieldsUpdateRequestExample: description: 'A sample request with a list of data fields to be updated in a template type:' value: data_fields: - custom_id: custom_id_participant_last_name description: The last name of a participant in a contract. name: Participant Last Name placeholder: Last Name value: Smith - custom_id: custom_id_company_address name: Company address value: 1234 Main Street - custom_id: custom_id_participant_position name: Participant's position in company. responses: '200': description: Returns the created [data field](data-field)s information. content: application/json: schema: type: object additionalProperties: false description: An array of the current data fields in the template type. required: - data_fields properties: data_fields: type: array items: type: object additionalProperties: false description: Attributes of a data field in a template type. required: - active - custom_id - description - id - name - placeholder - source - value properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true active: type: boolean custom_id: type: string minLength: 1 maxLength: 100 nullable: true description: type: string minLength: 0 maxLength: 300 id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 placeholder: type: string nullable: true maxLength: 100 source: type: string description: One of the (sources)(data-field#source) of the data field. enum: - system - user value: type: string nullable: true maxLength: 1024 examples: templateTypeDatafieldsUpdateResponseExample: description: 'A sample response with a list of data fields in a template type:' value: data_fields: - _links: template_type: href: https://api.oneflow.com/v1/template_types/220001 active: true custom_id: custom_id_participant_last_name description: The last name of a participant in a contract. id: 3001 name: Participant Last Name placeholder: Last Name source: system value: Smith - _links: template_type: href: https://api.oneflow.com/v1/template_types/220001 active: true custom_id: custom_id_company_address description: '' id: 3002 name: Company address placeholder: null source: system value: 1234 Main Street - _links: template_type: href: https://api.oneflow.com/v1/template_types/220001 active: true custom_id: custom_id_participant_position description: '' id: 3003 name: Participant's position in company. placeholder: null source: user value: null '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource. /template_types/{template_type_id}/data_fields/{data_field_id}: delete: x-tag: Template types summary: Delete a template type data field by ID operationId: public_api.api.v1.template_type_data_field_delete.handler description: Use this endpoint to delete a data field by its ID in the specified template type. See the [Data Field](data-field) data model for more information. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: type: string format: email example: john.doe@oneflow.com - name: template_type_id in: path required: true description: The unique ID of the template type. schema: type: integer format: signed_integer_id example: 220001 - name: data_field_id in: path required: true description: The unique ID of the data field in template type. schema: type: integer format: signed_integer_id example: 3001 responses: '200': description: The data field was deleted successfully. '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. /webhooks: get: x-tag: Webhooks summary: Get webhooks operationId: public_api.api.v1.webhooks_list.handler description: Use this endpoint to retrieve the list of webhooks available for the specified user. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com responses: '200': description: Returns the list of webhooks. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A list of webhooks for given user. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true count: type: integer data: type: array items: type: object additionalProperties: false required: - callback_url - filters - integration_instance - legacy_webhook - template_group_id - webhook_id description: A webhook. properties: callback_url: description: The webhook's callback url. type: string nullable: true filters: description: An array of filters associated with the webhook. type: array items: description: This represents a filter which can be associated with a webhook. type: object additionalProperties: false required: - filter_rules properties: filter_rules: type: array items: discriminator: propertyName: type oneOf: - description: This represents a event_type filter rule which can be associated with a webhook filter. title: Event Type type: object additionalProperties: false required: - type - values properties: type: description: The type of the rule. type: string enum: - EVENT_TYPE nullable: false values: description: The types of events we want. type: array items: type: string description: One of the [contract event types](contract-event#contract-event-type). enum: - contract:content_update - contract:decline - contract:delete - contract:lifecycle_state:cancel - contract:lifecycle_state:end - contract:lifecycle_state:new_period - contract:lifecycle_state:start - contract:lifecycle_state:terminate - contract:publish - contract:sign - contract:signature_reset - contract:signing_period_expire - contract:signing_period_revive - comment:create - participant:create - participant:decline - participant:delegate - participant:delete - participant:delivery_failure - participant:first_visit - participant:publish - participant:sign - participant:signature_reset - participant:update - party:create - party:delete - party:update - product:create - product:delete - product:update - data_field:update nullable: false minItems: 1 maxItems: 50 uniqueItems: true - description: This represents a workspace filter rule which can be associated with a webhook filter. title: Workspace type: object additionalProperties: false required: - type - values properties: type: description: The type of the rule. type: string enum: - WORKSPACE nullable: false values: description: The workspace IDs we want events for. type: array items: type: integer format: signed_integer_id nullable: false example: 130001 nullable: false minItems: 1 maxItems: 50 uniqueItems: true minItems: 1 maxItems: 2 nullable: true integration_instance: description: Connected integration instance. type: integer format: signed_integer_id nullable: true legacy_webhook: description: True if the webhook is a legacy webhook. type: boolean template_group_id: type: integer format: signed_integer_id nullable: true webhook_id: description: webhook ID type: integer format: signed_integer_id examples: webhooksResponseExample: description: 'A sample response with a list of webhooks:' value: _links: next: href: null previous: href: null self: href: https://api.oneflow.com/v1/webhooks?limit=100&offset=0 count: 2 data: - callback_url: https://example.org/webhook/test1 filters: - filter_rules: - type: EVENT_TYPE values: - contract:sign - contract:content_update - filter_rules: - type: EVENT_TYPE values: - contract:sign - contract:content_update - contract:publish - type: WORKSPACE values: - 130001 - 130002 integration_instance: 200001 legacy_webhook: false template_group_id: 220001 webhook_id: 240001 - callback_url: https://example.org/webhook/test2 filters: null integration_instance: 200002 legacy_webhook: true template_group_id: 220002 webhook_id: 240002 '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. post: x-tag: Webhooks summary: Create a webhook operationId: public_api.api.v1.webhook_create.handler description: Use this endpoint to create a new webhook. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com requestBody: description: Request body parameters for creating a webhook. required: true content: application/json: schema: type: object description: Request body for a create webhook request. additionalProperties: false required: - callback_url properties: callback_url: description: The webhook's callback url. type: string format: https_url minLength: 1 maxLength: 1000 example: https://example.org/webhook/test1 filters: description: An array of filters to be associated with the webhook being created. type: array items: description: This represents a filter which can be associated with a webhook. type: object additionalProperties: false required: - filter_rules properties: filter_rules: type: array items: discriminator: propertyName: type oneOf: - description: This represents a event_type filter rule which can be associated with a webhook filter. title: Event Type type: object additionalProperties: false required: - type - values properties: type: description: The type of the rule. type: string enum: - EVENT_TYPE nullable: false values: description: The types of events we want. type: array items: type: string description: One of the [contract event types](contract-event#contract-event-type). enum: - contract:content_update - contract:decline - contract:delete - contract:lifecycle_state:cancel - contract:lifecycle_state:end - contract:lifecycle_state:new_period - contract:lifecycle_state:start - contract:lifecycle_state:terminate - contract:publish - contract:sign - contract:signature_reset - contract:signing_period_expire - contract:signing_period_revive - comment:create - participant:create - participant:decline - participant:delegate - participant:delete - participant:delivery_failure - participant:first_visit - participant:publish - participant:sign - participant:signature_reset - participant:update - party:create - party:delete - party:update - product:create - product:delete - product:update - data_field:update nullable: false minItems: 1 maxItems: 50 uniqueItems: true - description: This represents a workspace filter rule which can be associated with a webhook filter. title: Workspace type: object additionalProperties: false required: - type - values properties: type: description: The type of the rule. type: string enum: - WORKSPACE nullable: false values: description: The workspace IDs we want events for. type: array items: type: integer format: signed_integer_id nullable: false example: 130001 nullable: false minItems: 1 maxItems: 50 uniqueItems: true minItems: 1 maxItems: 2 nullable: true minItems: 1 maxItems: 10 sign_key: description: A key to authenticate the webhook requests. type: string nullable: true minLength: 1 maxLength: 50 template_group_id: type: integer format: signed_integer_id nullable: true examples: webhhookCreateRequestExample: value: callback_url: https://example.org/webhook/test1 sign_key: null template_group_id: 220001 filters: - filter_rules: - type: EVENT_TYPE values: - contract:sign - contract:content_update - filter_rules: - type: EVENT_TYPE values: - contract:sign - contract:content_update - contract:publish - type: WORKSPACE values: - 130001 - 130002 responses: '201': description: Returns the created webhook. content: application/json: schema: type: object additionalProperties: false required: - callback_url - filters - integration_instance - legacy_webhook - template_group_id - webhook_id description: A webhook. properties: callback_url: description: The webhook's callback url. type: string nullable: true filters: description: An array of filters associated with the webhook. type: array items: description: This represents a filter which can be associated with a webhook. type: object additionalProperties: false required: - filter_rules properties: filter_rules: type: array items: discriminator: propertyName: type oneOf: - description: This represents a event_type filter rule which can be associated with a webhook filter. title: Event Type type: object additionalProperties: false required: - type - values properties: type: description: The type of the rule. type: string enum: - EVENT_TYPE nullable: false values: description: The types of events we want. type: array items: type: string description: One of the [contract event types](contract-event#contract-event-type). enum: - contract:content_update - contract:decline - contract:delete - contract:lifecycle_state:cancel - contract:lifecycle_state:end - contract:lifecycle_state:new_period - contract:lifecycle_state:start - contract:lifecycle_state:terminate - contract:publish - contract:sign - contract:signature_reset - contract:signing_period_expire - contract:signing_period_revive - comment:create - participant:create - participant:decline - participant:delegate - participant:delete - participant:delivery_failure - participant:first_visit - participant:publish - participant:sign - participant:signature_reset - participant:update - party:create - party:delete - party:update - product:create - product:delete - product:update - data_field:update nullable: false minItems: 1 maxItems: 50 uniqueItems: true - description: This represents a workspace filter rule which can be associated with a webhook filter. title: Workspace type: object additionalProperties: false required: - type - values properties: type: description: The type of the rule. type: string enum: - WORKSPACE nullable: false values: description: The workspace IDs we want events for. type: array items: type: integer format: signed_integer_id nullable: false example: 130001 nullable: false minItems: 1 maxItems: 50 uniqueItems: true minItems: 1 maxItems: 2 nullable: true integration_instance: description: Connected integration instance. type: integer format: signed_integer_id nullable: true legacy_webhook: description: True if the webhook is a legacy webhook. type: boolean template_group_id: type: integer format: signed_integer_id nullable: true webhook_id: description: webhook ID type: integer format: signed_integer_id examples: webhhookCreateResponseExample: description: 'A sample response of a webhook:' value: callback_url: https://example.org/webhook/test1 filters: - filter_rules: - type: EVENT_TYPE values: - contract:sign - contract:content_update - filter_rules: - type: EVENT_TYPE values: - contract:sign - contract:content_update - contract:publish - type: WORKSPACE values: - 130001 - 130002 integration_instance: 200001 legacy_webhook: false template_group_id: 220001 webhook_id: 240001 '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. /webhooks/{webhook_id}: get: x-tag: Webhooks summary: Get a webhook by ID operationId: public_api.api.v1.webhook_get.handler description: Use this endpoint to retrieve a specific webhook by ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com - name: webhook_id in: path required: true description: The unique ID of the webhook. schema: type: integer format: signed_integer_id example: 240001 responses: '200': description: Returns the requested webhook. content: application/json: schema: type: object additionalProperties: false required: - callback_url - filters - integration_instance - legacy_webhook - template_group_id - webhook_id description: A webhook. properties: callback_url: description: The webhook's callback url. type: string nullable: true filters: description: An array of filters associated with the webhook. type: array items: description: This represents a filter which can be associated with a webhook. type: object additionalProperties: false required: - filter_rules properties: filter_rules: type: array items: discriminator: propertyName: type oneOf: - description: This represents a event_type filter rule which can be associated with a webhook filter. title: Event Type type: object additionalProperties: false required: - type - values properties: type: description: The type of the rule. type: string enum: - EVENT_TYPE nullable: false values: description: The types of events we want. type: array items: type: string description: One of the [contract event types](contract-event#contract-event-type). enum: - contract:content_update - contract:decline - contract:delete - contract:lifecycle_state:cancel - contract:lifecycle_state:end - contract:lifecycle_state:new_period - contract:lifecycle_state:start - contract:lifecycle_state:terminate - contract:publish - contract:sign - contract:signature_reset - contract:signing_period_expire - contract:signing_period_revive - comment:create - participant:create - participant:decline - participant:delegate - participant:delete - participant:delivery_failure - participant:first_visit - participant:publish - participant:sign - participant:signature_reset - participant:update - party:create - party:delete - party:update - product:create - product:delete - product:update - data_field:update nullable: false minItems: 1 maxItems: 50 uniqueItems: true - description: This represents a workspace filter rule which can be associated with a webhook filter. title: Workspace type: object additionalProperties: false required: - type - values properties: type: description: The type of the rule. type: string enum: - WORKSPACE nullable: false values: description: The workspace IDs we want events for. type: array items: type: integer format: signed_integer_id nullable: false example: 130001 nullable: false minItems: 1 maxItems: 50 uniqueItems: true minItems: 1 maxItems: 2 nullable: true integration_instance: description: Connected integration instance. type: integer format: signed_integer_id nullable: true legacy_webhook: description: True if the webhook is a legacy webhook. type: boolean template_group_id: type: integer format: signed_integer_id nullable: true webhook_id: description: webhook ID type: integer format: signed_integer_id examples: webhookResponseExample: description: 'A sample response of a webhook:' value: callback_url: https://example.org/webhook/test1 filters: - filter_rules: - type: EVENT_TYPE values: - contract:sign - contract:content_update - filter_rules: - type: EVENT_TYPE values: - contract:sign - contract:content_update - contract:publish - type: WORKSPACE values: - 130001 - 130002 integration_instance: 200001 legacy_webhook: false template_group_id: 220001 webhook_id: 240001 '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. put: x-tag: Webhooks summary: Update a webhook by ID operationId: public_api.api.v1.webhook_put.handler description: Use this endpoint to update a specific webhook by ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com - name: webhook_id in: path required: true description: The unique ID of the webhook. schema: type: integer format: signed_integer_id example: 240001 requestBody: description: Request body parameters used for updating a webhook. required: true content: application/json: schema: type: object description: Request body for an update webhook request. additionalProperties: false properties: callback_url: description: The webhook's callback url. type: string minLength: 1 maxLength: 1000 filters: description: An array of filters to be associated with the webhook being updated. type: array items: description: This represents a filter which can be associated with a webhook. type: object additionalProperties: false required: - filter_rules properties: filter_rules: type: array items: discriminator: propertyName: type oneOf: - description: This represents a event_type filter rule which can be associated with a webhook filter. title: Event Type type: object additionalProperties: false required: - type - values properties: type: description: The type of the rule. type: string enum: - EVENT_TYPE nullable: false values: description: The types of events we want. type: array items: type: string description: One of the [contract event types](contract-event#contract-event-type). enum: - contract:content_update - contract:decline - contract:delete - contract:lifecycle_state:cancel - contract:lifecycle_state:end - contract:lifecycle_state:new_period - contract:lifecycle_state:start - contract:lifecycle_state:terminate - contract:publish - contract:sign - contract:signature_reset - contract:signing_period_expire - contract:signing_period_revive - comment:create - participant:create - participant:decline - participant:delegate - participant:delete - participant:delivery_failure - participant:first_visit - participant:publish - participant:sign - participant:signature_reset - participant:update - party:create - party:delete - party:update - product:create - product:delete - product:update - data_field:update nullable: false minItems: 1 maxItems: 50 uniqueItems: true - description: This represents a workspace filter rule which can be associated with a webhook filter. title: Workspace type: object additionalProperties: false required: - type - values properties: type: description: The type of the rule. type: string enum: - WORKSPACE nullable: false values: description: The workspace IDs we want events for. type: array items: type: integer format: signed_integer_id nullable: false example: 130001 nullable: false minItems: 1 maxItems: 50 uniqueItems: true minItems: 1 maxItems: 2 nullable: true minItems: 1 maxItems: 10 sign_key: description: A key to authenticate the webhook requests. type: string nullable: true minLength: 1 maxLength: 50 template_group_id: type: integer format: signed_integer_id nullable: true examples: webhookUpdateRequestExample: value: callback_url: https://example.org/webhook/test1 sign_key: null template_group_id: 220001 filters: - filter_rules: - type: EVENT_TYPE values: - contract:sign - contract:content_update - filter_rules: - type: EVENT_TYPE values: - contract:sign - contract:content_update - contract:publish - type: WORKSPACE values: - 130001 - 130002 responses: '200': description: Returns the updated webhook. content: application/json: schema: type: object additionalProperties: false required: - callback_url - filters - integration_instance - legacy_webhook - template_group_id - webhook_id description: A webhook. properties: callback_url: description: The webhook's callback url. type: string nullable: true filters: description: An array of filters associated with the webhook. type: array items: description: This represents a filter which can be associated with a webhook. type: object additionalProperties: false required: - filter_rules properties: filter_rules: type: array items: discriminator: propertyName: type oneOf: - description: This represents a event_type filter rule which can be associated with a webhook filter. title: Event Type type: object additionalProperties: false required: - type - values properties: type: description: The type of the rule. type: string enum: - EVENT_TYPE nullable: false values: description: The types of events we want. type: array items: type: string description: One of the [contract event types](contract-event#contract-event-type). enum: - contract:content_update - contract:decline - contract:delete - contract:lifecycle_state:cancel - contract:lifecycle_state:end - contract:lifecycle_state:new_period - contract:lifecycle_state:start - contract:lifecycle_state:terminate - contract:publish - contract:sign - contract:signature_reset - contract:signing_period_expire - contract:signing_period_revive - comment:create - participant:create - participant:decline - participant:delegate - participant:delete - participant:delivery_failure - participant:first_visit - participant:publish - participant:sign - participant:signature_reset - participant:update - party:create - party:delete - party:update - product:create - product:delete - product:update - data_field:update nullable: false minItems: 1 maxItems: 50 uniqueItems: true - description: This represents a workspace filter rule which can be associated with a webhook filter. title: Workspace type: object additionalProperties: false required: - type - values properties: type: description: The type of the rule. type: string enum: - WORKSPACE nullable: false values: description: The workspace IDs we want events for. type: array items: type: integer format: signed_integer_id nullable: false example: 130001 nullable: false minItems: 1 maxItems: 50 uniqueItems: true minItems: 1 maxItems: 2 nullable: true integration_instance: description: Connected integration instance. type: integer format: signed_integer_id nullable: true legacy_webhook: description: True if the webhook is a legacy webhook. type: boolean template_group_id: type: integer format: signed_integer_id nullable: true webhook_id: description: webhook ID type: integer format: signed_integer_id examples: webhookUpdateResponseExample: description: 'A sample response of a webhook:' value: callback_url: https://example.org/webhook/test1 filters: - filter_rules: - type: EVENT_TYPE values: - contract:sign - contract:content_update - filter_rules: - type: EVENT_TYPE values: - contract:sign - contract:content_update - contract:publish - type: WORKSPACE values: - 130001 - 130002 integration_instance: 200001 legacy_webhook: false template_group_id: 220001 webhook_id: 240001 '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. delete: x-tag: Webhooks summary: Delete a webhook by ID operationId: public_api.api.v1.webhook_delete.handler description: Use this endpoint to de-register a specific webhook by ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com - name: webhook_id in: path required: true description: The unique ID of the webhook. schema: type: integer format: signed_integer_id example: 240001 responses: '200': description: The webhook was de-registered successfully. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. /workspaces: get: x-tag: Workspace summary: Get workspaces operationId: public_api.api.v1.workspaces_list.handler description: Use this endpoint to retrieve the list of workspaces available for the specified user. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com - name: offset in: query required: false schema: type: integer minimum: 0 maximum: 19900 default: 0 example: 0 - name: limit in: query required: false schema: type: integer minimum: 1 maximum: 100 default: 100 example: 100 - name: sort description: "A comma-separated list of columns by which results are sorted. Valid columns:\n * name\n" in: query required: false schema: type: string example: name - name: filter description: An object containing key-value pairs to filter results. in: query required: false style: deepObject explode: true schema: type: object additionalProperties: false properties: name: description: Filter workspaces by the workspace name. type: string maxLength: 30 id: description: Retrieve specific workspaces by providing a comma-separated list of workspaces IDs. type: string maxLength: 200 responses: '200': description: Returns the list of [workspaces](workspace). content: application/json: schema: type: object additionalProperties: false required: - count - data description: A collection of workspaces. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true count: type: integer data: type: array items: type: object additionalProperties: false required: - _permissions - id - name - updated_time description: A single Oneflow workspace. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false required: - contract:create description: This attribute contains the permission for the contract create operation in a workspace. If contract:create is true, this means that the user is allowed to create a contract in a particular workspace. properties: contract:create: type: boolean _integration_permissions: type: array additionalProperties: false description: A list of integration specific permissions. This exists only for specific integration tokens items: type: object additionalProperties: false required: - key - value properties: key: type: string value: type: string company_name: description: The name of the company. type: string minLength: 0 maxLength: 130 country_code: description: The default country code used in all templates and contracts that belong to this workspace. type: string format: branding_country_code created_time: description: The time when this workspace was created. type: string format: datetime nullable: true date_format: description: The format of the date used in all templates and contracts that belong to this workspace. type: string description: description: The description of this workspace. type: string minLength: 0 maxLength: 300 nullable: false id: description: The unique id of this workspace. type: integer format: signed_integer_id name: description: The name of this workspace. type: string minLength: 1 maxLength: 50 registration_number: description: The registration number of the company. type: string minLength: 0 maxLength: 25 type: description: The type of the workspace. type: string updated_time: description: The time when this workspace was last updated. type: string format: datetime nullable: true examples: workspacesResponseExample: description: 'A sample response with a list of workspaces:' value: _links: next: href: null previous: href: null self: href: https://api.oneflow.com/v1/workspaces?offset=0&limit=100 count: 2 data: - _integration_permissions: [] _links: self: href: https://api.oneflow.com/v1/workspaces/130001 _permissions: contract:create: true company_name: My Company AB country_code: SE created_time: '2019-05-16T10:11:48+00:00' date_format: YYYY-MM-DD description: A workspace for holding HR templates. id: 130001 name: Best Workspace registration_number: 11223344-0000 type: Sales updated_time: '2021-07-22T11:59:11+00:00' - _integration_permissions: [] _links: self: href: https://api.oneflow.com/v1/workspaces/130002 _permissions: contract:create: true company_name: '' country_code: '' created_time: '2020-01-05T10:44:42+00:00' date_format: '' description: A workspace for holding sales templates. id: 130002 name: Sales Workspace registration_number: '' type: Legal updated_time: '2020-02-12T13:44:42+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. /workspaces/{workspace_id}: get: x-tag: Workspace summary: Get a workspace by ID operationId: public_api.api.v1.workspace_get.handler description: Use this endpoint to retrieve a specific workspace by ID. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com - name: workspace_id in: path required: true description: The unique ID of the workspace. schema: type: integer format: signed_integer_id example: 130001 responses: '200': description: Returns the requested [workspace](workspace). content: application/json: schema: type: object additionalProperties: false required: - _permissions - id - name - updated_time description: A single Oneflow workspace. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false required: - contract:create description: This attribute contains the permission for the contract create operation in a workspace. If contract:create is true, this means that the user is allowed to create a contract in a particular workspace. properties: contract:create: type: boolean _integration_permissions: type: array additionalProperties: false description: A list of integration specific permissions. This exists only for specific integration tokens items: type: object additionalProperties: false required: - key - value properties: key: type: string value: type: string company_name: description: The name of the company. type: string minLength: 0 maxLength: 130 country_code: description: The default country code used in all templates and contracts that belong to this workspace. type: string format: branding_country_code created_time: description: The time when this workspace was created. type: string format: datetime nullable: true date_format: description: The format of the date used in all templates and contracts that belong to this workspace. type: string description: description: The description of this workspace. type: string minLength: 0 maxLength: 300 nullable: false id: description: The unique id of this workspace. type: integer format: signed_integer_id name: description: The name of this workspace. type: string minLength: 1 maxLength: 50 registration_number: description: The registration number of the company. type: string minLength: 0 maxLength: 25 type: description: The type of the workspace. type: string updated_time: description: The time when this workspace was last updated. type: string format: datetime nullable: true examples: workspaceResponseExample: description: 'A sample response of a workspace:' value: _integration_permissions: [] _links: self: href: https://api.oneflow.com/v1/workspaces/130001 _permissions: contract:create: true company_name: My Company AB country_code: SE created_time: '2019-05-16T10:11:48+00:00' date_format: YYYY-MM-DD description: A workspace for holding HR templates. id: 130001 name: Best Workspace registration_number: 11223344-0000 type: Sales updated_time: '2021-07-22T11:59:11+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. /logs: get: x-tag: Log summary: Get logs operationId: public_api.api.v1.logs.handler description: Use this endpoint to retrieve HTTP request logs occured in the Oneflow account. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: offset in: query required: false schema: type: integer minimum: 0 maximum: 19900 default: 0 example: 0 - name: limit in: query required: false schema: type: integer minimum: 1 maximum: 100 default: 100 example: 100 - name: filter description: An object containing key-value pairs to filter results. in: query required: false style: deepObject explode: true schema: type: object additionalProperties: false properties: created_time: description: 'Filter request logs are made within the specified [datetime range](doc:filtering#filtering-on-datetimes). Here, specify created_time as `starting time | ending time`. ' type: string maxLength: 60 example: 2023-01-02T03:04:05+02:00|2023-05-06T07:08:09-05:00 request_method: description: Filter request logs by a comma-separated list of request methods. (GET, POST, PUT, DELETE). type: string example: GET,POST minLength: 1 maxLength: 30 response_code: description: Filter request logs by a comma-separated list of response codes. type: string integration_key: description: Filter request logs that are in specified comma-separated list of integrations. (only applicable for custom integrations) type: string example: superofice,hubspot minLength: 1 maxLength: 100 request_id: description: The request ID of a request. type: string minLength: 1 maxLength: 64 responses: '200': description: Returns the list of request logs. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A list of request logs in an account. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true count: type: integer data: type: array items: type: object additionalProperties: false required: - api_version - integration_key - request_body - request_duration - request_endpoint - request_headers - request_id - request_method - request_path - request_time - response_body - response_code properties: api_version: type: integer integration_key: type: string minLength: 1 maxLength: 20 request_body: type: object nullable: true request_duration: type: integer request_endpoint: type: string minLength: 1 maxLength: 200 request_headers: type: object nullable: true request_id: type: string minLength: 1 maxLength: 64 request_method: type: string minLength: 1 maxLength: 7 request_path: type: string minLength: 1 maxLength: 500 request_time: type: string format: datetime response_body: type: object nullable: true response_code: type: integer examples: LogsResponseExample: description: A sample response with a list request logs value: _links: next: href: https://api.oneflow.com/v1/logs?limit=1&offset=1 previous: href: null self: href: https://api.oneflow.com/v1/logs?limit=1&offset=0 count: 5 data: - api_version: 1 integration_key: custom request_body: name: tag one request_duration: 0 request_endpoint: /v1/tags request_headers: null request_id: LUSafEoxqjYGRYvRznXkZWRTfuD-==HPOmSSnZNLUCmqnrOIyMyEsnJn request_method: POST request_path: /v1/tags request_time: '2023-04-30T05:35:00+00:00' response_body: created_time: '2023-04-30T05:35:00+00:00' id: 381397 is_global: true name: tag one shared_workspaces: [] system: false updated_time: '2023-04-30T05:35:00+00:00' response_code: 200 '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '404': description: A required entity is missing. /folders: post: x-tag: Folder summary: Create a folder operationId: public_api.api.v1.folder_create.handler description: Use this endpoint to create a folder in the given workspace. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com requestBody: description: Request body parameters for creating a folder. required: true content: application/json: schema: type: object additionalProperties: false description: Request body for a create folder. required: - name - workspace_id properties: workspace_id: description: The unique ID of the workspace. type: integer format: signed_integer_id name: description: The folder's name. type: string minLength: 1 maxLength: 130 parent_id: description: The id of the parent folder. type: integer format: signed_integer_id nullable: true examples: folderCreateRequestBodyExample: value: name: Sample Folder parent_id: null workspace_id: 130000 responses: '200': description: Returned the created folder. content: application/json: schema: additionalProperties: false required: - _permissions - id - name - parent_id - path - workspace_id description: A folder. properties: _permissions: type: object additionalProperties: false description: This attribute contains the permissions for various operations possible on the folders. required: - folder:contract - folder:delete - folder:sub_folder:create - folder:update properties: folder:contract: type: boolean folder:delete: type: boolean folder:sub_folder:create: type: boolean folder:update: type: boolean id: description: Folder ID type: integer format: signed_integer_id name: description: Folder name. type: string parent_id: description: If exist any parent folder, its ID. type: integer format: signed_integer_id nullable: true path: description: An array of folder IDs representing the path from the top of the hierarchy to the current folder. type: array items: type: integer format: signed_integer_id workspace_id: description: workspace ID type: integer format: signed_integer_id examples: folderCreateResponseExample: value: _permissions: folder:contract: true folder:delete: true folder:sub_folder:create: true folder:update: true id: 380001 name: Sample Folder parent_id: null path: - 380001 workspace_id: 130000 '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. get: x-tag: Folder summary: Get Folders operationId: public_api.api.v1.folders_list.handler description: Use this endpoint to retrieve the list of folders in the account with their workspaces. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. in: header schema: type: string format: email example: john.doe@oneflow.com - name: offset in: query required: false schema: type: integer minimum: 0 maximum: 19900 default: 0 example: 0 - name: limit in: query required: false schema: type: integer minimum: 1 maximum: 100 default: 100 example: 100 - name: sort description: "A comma-separated list of columns by which results are sorted. Valid columns:\n * name\n * depth\n * workspace_id\n" in: query required: false schema: type: string example: name - name: filter description: An object containing key-value pairs to filter results. in: query required: false style: deepObject explode: true schema: type: object additionalProperties: false properties: name: description: Filter folders by the folder name. type: string maxLength: 130 parent_ids: description: Filter folders by parent IDs that are in the comma-separated list. type: string workspace_ids: description: Filter folders from workspaces that are in the specified comma-separated list of workspace IDs. type: string maxLength: 200 responses: '200': description: Returns the list of folders. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A list of folders with their workspaces. properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true count: type: integer data: type: array items: additionalProperties: false required: - _permissions - id - name - parent_id - path - workspace_id description: A folder. properties: _permissions: type: object additionalProperties: false description: This attribute contains the permissions for various operations possible on the folders. required: - folder:contract - folder:delete - folder:sub_folder:create - folder:update properties: folder:contract: type: boolean folder:delete: type: boolean folder:sub_folder:create: type: boolean folder:update: type: boolean id: description: Folder ID type: integer format: signed_integer_id name: description: Folder name. type: string parent_id: description: If exist any parent folder, its ID. type: integer format: signed_integer_id nullable: true path: description: An array of folder IDs representing the path from the top of the hierarchy to the current folder. type: array items: type: integer format: signed_integer_id workspace_id: description: workspace ID type: integer format: signed_integer_id examples: foldersResponseExample: description: A sample response with a list of folders. value: _links: next: href: null previous: href: null self: href: https://api.flowdev.com/v1/folders?limit=100&offset=0 count: 2 data: - _permissions: folder:contract: true folder:delete: true folder:sub_folder:create: true folder:update: true id: 380001 name: sales parent_id: null path: - 380001 workspace_id: 190000 - _permissions: folder:contract: true folder:delete: true folder:sub_folder:create: true folder:update: true id: 380002 name: partner sales parent_id: 380001 path: - 380001 - 380002 workspace_id: 190000 '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. /accounts/extensions: get: x-tag: Account summary: Get integration extensions operationId: public_api.api.v1.account_integration_extensions_get.handler description: Use this endpoint to retrieve all available integration extension information associated with your Oneflow account. To retrieve all available integration extensions, you can use the generic API token 'x-oneflow-api-token.' If you use an integration-specific API token, it will return only the integration extensions associated with that particular integration. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 responses: '200': description: Returns all the available integration extensions. content: application/json: schema: type: object additionalProperties: false required: - count - data description: A collection of available integration extensions in an account. properties: count: type: integer data: type: array items: type: object additionalProperties: false required: - enabled - extension_type description: An integration extension. properties: enabled: description: Indicating whether the extension is enabled or not. type: boolean extension_type: description: The integration extension. type: string examples: accountIntegrationExtensionsExample: description: 'A collection of available integration extensions in an account:' value: count: 3 data: - enabled: false extension_type: intelliplan_sales - enabled: true extension_type: microsoft_365 - enabled: true extension_type: salesforce_v2 '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. /contracts/{contract_id}/move: post: x-tag: Contract summary: Move a contract by ID operationId: public_api.api.v1.contract_move.handler description: Use this endpoint to move contract between workspaces and folders. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: type: string format: email example: john.doe@oneflow.com requestBody: description: Request body parameters used for move contract between workspaces and folders. required: true content: application/json: schema: type: object additionalProperties: false description: Request body for contract move. required: - workspace_id properties: workspace_id: description: The workspace that the contract needs to move. type: integer format: signed_integer_id example: 380002 folder_id: description: The folder id that the contract needs to move. type: integer format: signed_integer_id example: 190002 examples: contractMoveRequestExample: value: workspace_id: 380002 folder_id: 190002 responses: '200': description: Returns the [contract](contract). content: application/json: schema: type: object additionalProperties: false description: See [Contract](doc:contract). required: - _permissions - _private - _private_ownerside - attachment_file_groups - available_options - data_fields - id - lifecycle_settings - lifecycle_state - parties - pdf_file_groups - product_groups - published_time - sign_order - signing_period_expiry_time - state - state_updated_time - tags - updated_time properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for various operations possible on the contract. The format of the permission is 'contract:' followed by the specific operation, like 'contract:create.' required: - contract:delete - contract:download:pdf - contract:send properties: contract:delete: type: boolean contract:download:pdf: type: boolean contract:send: type: boolean _integration_permissions: type: array additionalProperties: false description: A list of integration specific permissions. This exists only for specific integration tokens items: type: object additionalProperties: false required: - key - value properties: key: type: string value: type: string _private: type: object description: See [Private](doc:contract#private) required: - date_format - value - folder - name - signing_period_expiration - workspace_id properties: date_format: description: The date format of the contract. type: string value: type: object description: See [Contract value](doc:contract#value). required: - amount - currency nullable: true properties: amount: type: string format: amount currency: type: string format: currency folder: additionalProperties: false required: - id - name - parent_id - path description: A folder. properties: id: description: Folder ID type: integer format: signed_integer_id name: description: Folder name. type: string parent_id: description: If exist any parent folder, its ID. type: integer format: signed_integer_id nullable: true path: description: An array of folder IDs representing the path from the top of the hierarchy to the current folder. type: array items: type: integer format: signed_integer_id name: description: The name of the contract. type: string minLength: 0 maxLength: 130 signing_period_expiration: discriminator: propertyName: type oneOf: - type: object additionalProperties: false description: The signing period for this contract never expires required: - type properties: type: type: string description: Can only be 'never'. enum: - never - type: object additionalProperties: false description: The signing period for this contract expires a given number of days after publishing. This setting can only be used when the contract is in the draft stage. Converts into a "fixed_date" after the contract is published. required: - type - expire_days_after_publish properties: type: type: string description: Can only be 'days_after_publish'. enum: - days_after_publish expire_days_after_publish: type: integer minimum: 1 - type: object additionalProperties: false description: The signing period for this contract expires on a set date. required: - type - expire_date properties: type: type: string description: Can only be 'fixed_date'. enum: - fixed_date expire_date: type: string format: date workspace_id: description: The unique id of this workspace. type: integer format: signed_integer_id nullable: true single_sign: description: State of the feature single sign type: boolean format: single_sign _private_ownerside: type: object description: Contract data that is private to the ownerside. nullable: true required: - created_time - template_id - template_type_id properties: created_time: type: string format: datetime template_id: type: integer format: signed_integer_id nullable: true template_type_id: type: integer format: signed_integer_id nullable: true attachment_file_groups: type: array description: A list of attachment type file groups in the contract. items: description: A file group represents an expanded PDF session or attachment session in the contract. type: object additionalProperties: false required: - _private_ownerside - files - id - type properties: _private_ownerside: type: object description: File group data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true files: type: array items: type: object additionalProperties: false description: A single file of the contract file group. required: - _private_ownerside - extension - id - name - size properties: _private_ownerside: type: object description: File data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true extension: description: The file extension. type: string nullable: true id: type: integer format: signed_integer_id name: description: The name of the file. type: string nullable: true size: description: The size of the file in bytes. type: integer nullable: true id: type: integer format: unsigned_integer_id type: type: string description: The file group type of the file group sections. There are only two types available, `attachment` and `pdf`. enum: - attachment - pdf available_options: type: object additionalProperties: false description: Available options in the contract. See [Available options](doc:contract#available-options). required: - can_receive_attachments - can_receive_expanded_pdf - can_receive_products - delivery_channels - sign_methods - two_step_authentication_methods properties: can_receive_attachments: type: boolean can_receive_expanded_pdf: type: boolean can_receive_products: type: boolean delivery_channels: type: array items: description: See [Delivery channel options](contract#delivery-channels). type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string sign_methods: type: array items: description: This attribute is only allowed for participants with the role signatory. For signatories it is required. Note that the participant role defaults to signatory. See [Contract sign methods](doc:contract#sign-methods). type: object additionalProperties: false required: - name - preferred properties: name: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown preferred: type: boolean two_step_authentication_methods: type: array items: description: See [Two-step authentication methods](doc:contract#two-step-authentication-methods) type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string data_fields: type: array description: The data fields that are part of the contract. items: type: object additionalProperties: false description: See [Data field](doc:data-field). required: - _private_ownerside - description - id - name - placeholder - value properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object additionalProperties: false description: Data field attributes that are private to the ownerside. required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true description: type: string minLength: 0 maxLength: 300 id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 placeholder: type: string minLength: 0 maxLength: 100 value: type: string minLength: 0 id: type: integer format: signed_integer_id lifecycle_settings: type: object description: See [Lifecycle settings](lifecycle-settings). required: - duration - end_date - initial_duration - notice_period - start_date - type additionalProperties: false nullable: true properties: duration: type: string format: duration nullable: true end_date: type: string format: date nullable: true initial_duration: type: string format: duration nullable: true notice_period: type: string format: duration nullable: true start_date: type: string format: date nullable: true type: type: string description: One of the contract [duration types](contract#duration-type). enum: - no_duration - single_period - recurring - recurring_two_periods - unknown lifecycle_state: type: object additionalProperties: false description: Lifecycle information of the contract. See [Lifecycle state](doc:contract#lifecycle-state). nullable: true required: - composite - contract_end_time - contract_start_time - cancel_time - has_ended_by_termination - has_passed_notice_period_start_time - is_canceled - is_recurring - lifecycle_state - lifecycle_state_updated_time - notice_period_start_time - period - period_end_time - period_start_time properties: composite: type: string description: One of the [lifecycle composites](contract#lifecycle-composite). enum: - awaiting - awaiting-recurring - active - active-recurring - active-canceled-recurring - ended - ended-terminated - ended-terminated-recurring contract_end_time: type: string format: datetime nullable: true contract_start_time: type: string format: datetime nullable: true cancel_time: type: string format: datetime nullable: true has_ended_by_termination: type: boolean has_passed_notice_period_start_time: type: boolean is_canceled: type: boolean is_recurring: type: boolean lifecycle_state: type: string description: One of the [lifecycle states](ccontract#lifecycle-states). enum: - awaiting - active - ended - unknown lifecycle_state_updated_time: type: string format: datetime notice_period_start_time: type: string format: datetime nullable: true period: type: integer nullable: true period_end_time: type: string format: datetime nullable: true period_start_time: type: string format: datetime nullable: true links: type: array description: All links on the contract. (links is only available in the Get a contract by ID response) items: oneOf: - description: Internal contract link. title: Internal type: object additionalProperties: false required: - id - linked_contract - type properties: id: type: integer format: signed_integer_id linked_contract: type: integer format: signed_integer_id type: type: string description: One of the [link types](contract#links). enum: - amends - amended_by - sub_contract - main_contract - replaced_by - replaces - relates_to - description: External contract link. title: External type: object additionalProperties: false required: - id - type - external_link - external_title properties: id: type: integer format: signed_integer_id type: description: Can only be `external` of the [link types](contract#links). type: string enum: - external external_link: type: string minLength: 1 maxLength: 1024 external_title: type: string minLength: 1 maxLength: 130 parties: type: array description: The parties involved in this contract. items: oneOf: - title: Individual description: An individual party, where a single participant is signing on behalf of him- or herself. See [Individual party](doc:party#individual) type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participant - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true participant: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `individual`. enum: - individual - title: Company description: The participants are signing on behalf of this company. See [Company party](doc:party#company). type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participants - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 participants: description: The maximum number of participants per contract across all parties is 40. type: array items: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `company`. enum: - company discriminator: propertyName: type mapping: individual: contract_party_individual.yml company: contract_party_company.yml pdf_file_groups: type: array description: A list of expanded pdf type file groups in the contract. items: description: A file group represents an expanded PDF session or attachment session in the contract. type: object additionalProperties: false required: - _private_ownerside - files - id - type properties: _private_ownerside: type: object description: File group data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true files: type: array items: type: object additionalProperties: false description: A single file of the contract file group. required: - _private_ownerside - extension - id - name - size properties: _private_ownerside: type: object description: File data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true extension: description: The file extension. type: string nullable: true id: type: integer format: signed_integer_id name: description: The name of the file. type: string nullable: true size: description: The size of the file in bytes. type: integer nullable: true id: type: integer format: unsigned_integer_id type: type: string description: The file group type of the file group sections. There are only two types available, `attachment` and `pdf`. enum: - attachment - pdf product_groups: description: A list of product groups. type: array items: description: A product group represents a product table in the contract, see [Product group](doc:product-group). type: object additionalProperties: false required: - _private_ownerside - configuration - enabled_columns - id - products properties: _private_ownerside: type: object description: Product group data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true configuration: type: object additionalProperties: false description: Updated product group configuration properties: columns: type: array items: type: object additionalProperties: false description: Product group columns data. required: - key properties: enabled: type: boolean key: description: One of the product group column keys. type: string enum: - name - description - price_1 - price_2 - count label: type: string counterpart_edit: type: boolean hide_price_summation: type: boolean price_affixes: type: object additionalProperties: false description: Postfix and prefix of a contract product price. properties: postfix: type: string prefix: type: string created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true enabled_columns: type: array items: type: object additionalProperties: false description: An individual product table columns enable information. required: - enabled - key properties: enabled: type: boolean key: type: string minLength: 0 maxLength: 80 id: type: integer format: unsigned_integer_id products: type: array items: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity published_time: type: string format: datetime nullable: true sign_later: description: A flag to indicate if the contract signing is postponed. type: boolean sign_order: type: array description: Sign order of the participants. items: type: object additionalProperties: false required: - participant_id - order properties: participant_id: type: integer format: signed_integer_id description: participant ID order: type: integer minimum: 1 maximum: 40 description: Sign order signing_period_expiry_time: type: string format: datetime nullable: true state: type: string description: One of the [contract states](contract#contract-state). enum: - draft - pending - overdue - signed - declined - unknown state_updated_time: type: string format: datetime tags: type: array description: All tags associated with the contract. items: type: object additionalProperties: false required: - id - name properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 updated_time: type: string format: datetime nullable: true examples: contractMoveResponseExample: description: 'A sample contract with parties and products:' value: _integration_permissions: [] _links: comments: href: https://api.oneflow.com/v1/contracts/10001/comments data_fields: href: https://api.oneflow.com/v1/contracts/10001/data_fields events: href: https://api.oneflow.com/v1/contracts/10001/events files: href: https://api.oneflow.com/v1/contracts/10001/files parties: href: https://api.oneflow.com/v1/contracts/10001/parties publish: href: https://api.oneflow.com/v1/contracts/10001/publish self: href: https://api.oneflow.com/v1/contracts/10001 template: href: https://api.oneflow.com/v1/templates/170001 template_type: href: https://api.oneflow.com/v1/template_types/220001 workspace: href: https://api.oneflow.com/v1/workspaces/130001 _permissions: contract:delete: true contract:download:pdf: true contract:send: false _private: name: My First Contract signing_period_expiration: expire_date: '2023-05-11' type: fixed_date value: amount: '500.10' currency: SEK workspace_id: 130001 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' template_id: 170001 template_type_id: 220001 attachment_file_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T17:59:12+00:00' files: - _private_ownerside: created_time: '2023-04-27T17:59:12+00:00' updated_time: '2023-04-27T17:59:20+00:00' extension: docx id: 1200001 name: attachment_sample_doc size: 4168 - _private_ownerside: created_time: '2023-04-27T17:59:12+00:00' updated_time: '2023-04-27T17:59:22+00:00' extension: pdf id: 1200002 name: attachment_sample_pdf size: 6586 id: 920001 type: attachment available_options: can_receive_attachments: false can_receive_expanded_pdf: false can_receive_products: false delivery_channels: - name: email preferred: true required_participant_attributes: - email - name: none preferred: false required_participant_attributes: [] - name: same_device preferred: false required_participant_attributes: - sign_method - name: sms preferred: false required_participant_attributes: - phone_number sign_methods: - name: finnish_bankid preferred: false - name: sms preferred: false - name: standard_esign preferred: true - name: swedish_bankid preferred: false two_step_authentication_methods: - name: email preferred: false required_participant_attributes: - email - name: none preferred: true required_participant_attributes: [] - name: sms preferred: false required_participant_attributes: - phone_number data_fields: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_first_name updated_time: '2023-04-27T11:29:36+00:00' description: firstname of the person id: 140001 name: First Name placeholder: firstname placeholder value: Foo - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_last_name updated_time: '2023-04-27T11:29:36+00:00' description: lastname of the person id: 140002 name: Last Name placeholder: lastname placeholder value: '' id: 10001 lifecycle_settings: duration: 12m end_date: null initial_duration: null notice_period: 3m start_date: null type: recurring lifecycle_state: cancel_time: null composite: active-recurring contract_end_time: null contract_start_time: '2023-04-27T18:30:00+00:00' has_ended_by_termination: false has_passed_notice_period_start_time: true is_canceled: false is_recurring: true lifecycle_state: active lifecycle_state_updated_time: '2023-04-27T18:44:07+00:00' notice_period_start_time: '2024-01-27T18:30:00+00:00' period: 1 period_end_time: '2024-04-27T18:30:00+00:00' period_start_time: '2023-04-27T18:30:00+00:00' links: - id: 1 linked_contract: 10010 type: relates_to - external_link: https://www.example.com external_title: example_title id: 2 type: external parties: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_party_1 updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470001 identification_number: 11223344-5566 my_party: true name: Own Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: '2023-04-27T11:29:36+00:00' last_visited_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T18:44:07+00:00' visits: 1 delivery_channel: email delivery_status: success email: own@email.com id: 230001 identification_number: 10034544-0066 my_participant: true name: First Last organizer: false phone_number: '+111222333444' sign_method: unknown sign_state: signed sign_state_updated_time: '2023-04-27T18:44:07+00:00' signatory: true title: Sales Manager two_step_authentication_method: none type: company - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_party_2 updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470002 identification_number: 11223344-5577 my_party: false name: Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_participant_1 first_visited_time: null last_visited_time: null updated_time: '2023-04-27T18:44:07+00:00' visits: 0 delivery_channel: email delivery_status: success email: mem@email.com id: 230002 identification_number: 10034544-0077 my_participant: false name: Firstname Lastname organizer: false phone_number: '+111222333555' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: company - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_party_3 updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470003 identification_number: 10034544-0088 my_party: false name: Firstname2 Lastname2 participant: _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: null last_visited_time: null updated_time: '2023-04-27T18:44:07+00:00' visits: 0 delivery_channel: email delivery_status: success email: individual@email.com id: 230003 identification_number: 10034544-0088 my_participant: false name: Firstname2 Lastname2 organizer: false phone_number: '+111222333666' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: individual pdf_file_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T17:59:12+00:00' files: - _private_ownerside: created_time: '2023-04-27T17:59:12+00:00' updated_time: '2023-04-27T17:59:18+00:00' extension: pdf id: 1200003 name: expanded_sample_pdf size: 6586 id: 920002 type: pdf product_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_product_group_1 updated_time: '2023-04-27T11:29:36+00:00' configuration: columns: - enabled: true key: name label: ProductX - enabled: true key: description label: Description - enabled: true key: price_1 label: Price 1 - enabled: true key: price_2 label: Price 2 - enabled: true key: count label: ValueX counterpart_edit: false hide_price_summation: false price_affixes: postfix: '' prefix: Rs enabled_columns: - enabled: true key: name - enabled: true key: description - enabled: true key: price_1 - enabled: true key: price_2 - enabled: true key: count id: 85011 products: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: CUSTOM_ID_PRODUCT_1 updated_time: '2023-04-27T11:29:36+00:00' counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice published_time: '2023-04-27T18:22:44+00:00' sign_later: false sign_order: - order: 1 participant_id: 230001 - order: 2 participant_id: 230002 - order: 3 participant_id: 230003 signing_period_expiry_time: '2023-05-12T00:00:00+00:00' state: signed state_updated_time: '2023-04-27T18:30:00+00:00' tags: - id: 380001 name: tag one - id: 380002 name: tag two updated_time: '2023-04-27T18:44:09+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. /contracts/{contract_id}/mark_as_signed: post: x-tag: Contract summary: Mark contract as signed by ID operationId: public_api.api.v1.contract_sign.handler description: Use this endpoint to mark contract as signed by contract ID via API. Note that this is not the contract sign endpoint for a single user. This only to mark the contract is signed by all users. parameters: - name: x-oneflow-api-token description: The API key of your Oneflow account. in: header required: true schema: type: string pattern: ^[a-zA-Z0-9-]+$ minLength: 40 maxLength: 40 example: 9841f1ee533681c3ea6a438560f2bb6c73b76675 - name: contract_id in: path required: true description: The unique ID of the contract. schema: type: integer format: signed_integer_id example: 10001 - name: x-oneflow-user-email description: The email address of a registered Oneflow user. required: true in: header schema: oneOf: - type: string format: email example: john.doe@oneflow.com - type: string enum: - __CREATOR__ example: __CREATOR__ x-oneflow-replace: schema: type: string format: email example: john.doe@oneflow.com requestBody: description: Request body parameters contains the date that contract signed. required: true content: application/json: schema: type: object additionalProperties: false description: Request body for contract sign. required: - mark_as_signed_date properties: mark_as_signed_date: description: timestamp of the date time that the contract needs to sign. type: string format: datetime example: '2024-01-02T03:04:05+02:00' examples: contractSignRequestExample: value: mark_as_signed_date: '2024-01-02T03:04:05+02:00' responses: '200': description: Returns the [contract](contract). content: application/json: schema: type: object additionalProperties: false required: - signed_by - signed_date - contract properties: signed_by: type: object description: Contract signer details required: - name - email properties: name: type: string email: type: string format: email signed_date: type: string format: datetime contract: type: object additionalProperties: false description: See [Contract](doc:contract). required: - _permissions - _private - _private_ownerside - attachment_file_groups - available_options - data_fields - id - lifecycle_settings - lifecycle_state - parties - pdf_file_groups - product_groups - published_time - sign_order - signing_period_expiry_time - state - state_updated_time - tags - updated_time properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for various operations possible on the contract. The format of the permission is 'contract:' followed by the specific operation, like 'contract:create.' required: - contract:delete - contract:download:pdf - contract:send properties: contract:delete: type: boolean contract:download:pdf: type: boolean contract:send: type: boolean _integration_permissions: type: array additionalProperties: false description: A list of integration specific permissions. This exists only for specific integration tokens items: type: object additionalProperties: false required: - key - value properties: key: type: string value: type: string _private: type: object description: See [Private](doc:contract#private) required: - date_format - value - folder - name - signing_period_expiration - workspace_id properties: date_format: description: The date format of the contract. type: string value: type: object description: See [Contract value](doc:contract#value). required: - amount - currency nullable: true properties: amount: type: string format: amount currency: type: string format: currency folder: additionalProperties: false required: - id - name - parent_id - path description: A folder. properties: id: description: Folder ID type: integer format: signed_integer_id name: description: Folder name. type: string parent_id: description: If exist any parent folder, its ID. type: integer format: signed_integer_id nullable: true path: description: An array of folder IDs representing the path from the top of the hierarchy to the current folder. type: array items: type: integer format: signed_integer_id name: description: The name of the contract. type: string minLength: 0 maxLength: 130 signing_period_expiration: discriminator: propertyName: type oneOf: - type: object additionalProperties: false description: The signing period for this contract never expires required: - type properties: type: type: string description: Can only be 'never'. enum: - never - type: object additionalProperties: false description: The signing period for this contract expires a given number of days after publishing. This setting can only be used when the contract is in the draft stage. Converts into a "fixed_date" after the contract is published. required: - type - expire_days_after_publish properties: type: type: string description: Can only be 'days_after_publish'. enum: - days_after_publish expire_days_after_publish: type: integer minimum: 1 - type: object additionalProperties: false description: The signing period for this contract expires on a set date. required: - type - expire_date properties: type: type: string description: Can only be 'fixed_date'. enum: - fixed_date expire_date: type: string format: date workspace_id: description: The unique id of this workspace. type: integer format: signed_integer_id nullable: true single_sign: description: State of the feature single sign type: boolean format: single_sign _private_ownerside: type: object description: Contract data that is private to the ownerside. nullable: true required: - created_time - template_id - template_type_id properties: created_time: type: string format: datetime template_id: type: integer format: signed_integer_id nullable: true template_type_id: type: integer format: signed_integer_id nullable: true attachment_file_groups: type: array description: A list of attachment type file groups in the contract. items: description: A file group represents an expanded PDF session or attachment session in the contract. type: object additionalProperties: false required: - _private_ownerside - files - id - type properties: _private_ownerside: type: object description: File group data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true files: type: array items: type: object additionalProperties: false description: A single file of the contract file group. required: - _private_ownerside - extension - id - name - size properties: _private_ownerside: type: object description: File data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true extension: description: The file extension. type: string nullable: true id: type: integer format: signed_integer_id name: description: The name of the file. type: string nullable: true size: description: The size of the file in bytes. type: integer nullable: true id: type: integer format: unsigned_integer_id type: type: string description: The file group type of the file group sections. There are only two types available, `attachment` and `pdf`. enum: - attachment - pdf available_options: type: object additionalProperties: false description: Available options in the contract. See [Available options](doc:contract#available-options). required: - can_receive_attachments - can_receive_expanded_pdf - can_receive_products - delivery_channels - sign_methods - two_step_authentication_methods properties: can_receive_attachments: type: boolean can_receive_expanded_pdf: type: boolean can_receive_products: type: boolean delivery_channels: type: array items: description: See [Delivery channel options](contract#delivery-channels). type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string sign_methods: type: array items: description: This attribute is only allowed for participants with the role signatory. For signatories it is required. Note that the participant role defaults to signatory. See [Contract sign methods](doc:contract#sign-methods). type: object additionalProperties: false required: - name - preferred properties: name: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown preferred: type: boolean two_step_authentication_methods: type: array items: description: See [Two-step authentication methods](doc:contract#two-step-authentication-methods) type: object additionalProperties: false required: - name - preferred - required_participant_attributes properties: name: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown preferred: type: boolean required_participant_attributes: type: array items: type: string data_fields: type: array description: The data fields that are part of the contract. items: type: object additionalProperties: false description: See [Data field](doc:data-field). required: - _private_ownerside - description - id - name - placeholder - value properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object additionalProperties: false description: Data field attributes that are private to the ownerside. required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true description: type: string minLength: 0 maxLength: 300 id: type: integer format: signed_integer_id name: type: string minLength: 1 maxLength: 100 placeholder: type: string minLength: 0 maxLength: 100 value: type: string minLength: 0 id: type: integer format: signed_integer_id lifecycle_settings: type: object description: See [Lifecycle settings](lifecycle-settings). required: - duration - end_date - initial_duration - notice_period - start_date - type additionalProperties: false nullable: true properties: duration: type: string format: duration nullable: true end_date: type: string format: date nullable: true initial_duration: type: string format: duration nullable: true notice_period: type: string format: duration nullable: true start_date: type: string format: date nullable: true type: type: string description: One of the contract [duration types](contract#duration-type). enum: - no_duration - single_period - recurring - recurring_two_periods - unknown lifecycle_state: type: object additionalProperties: false description: Lifecycle information of the contract. See [Lifecycle state](doc:contract#lifecycle-state). nullable: true required: - composite - contract_end_time - contract_start_time - cancel_time - has_ended_by_termination - has_passed_notice_period_start_time - is_canceled - is_recurring - lifecycle_state - lifecycle_state_updated_time - notice_period_start_time - period - period_end_time - period_start_time properties: composite: type: string description: One of the [lifecycle composites](contract#lifecycle-composite). enum: - awaiting - awaiting-recurring - active - active-recurring - active-canceled-recurring - ended - ended-terminated - ended-terminated-recurring contract_end_time: type: string format: datetime nullable: true contract_start_time: type: string format: datetime nullable: true cancel_time: type: string format: datetime nullable: true has_ended_by_termination: type: boolean has_passed_notice_period_start_time: type: boolean is_canceled: type: boolean is_recurring: type: boolean lifecycle_state: type: string description: One of the [lifecycle states](ccontract#lifecycle-states). enum: - awaiting - active - ended - unknown lifecycle_state_updated_time: type: string format: datetime notice_period_start_time: type: string format: datetime nullable: true period: type: integer nullable: true period_end_time: type: string format: datetime nullable: true period_start_time: type: string format: datetime nullable: true links: type: array description: All links on the contract. (links is only available in the Get a contract by ID response) items: oneOf: - description: Internal contract link. title: Internal type: object additionalProperties: false required: - id - linked_contract - type properties: id: type: integer format: signed_integer_id linked_contract: type: integer format: signed_integer_id type: type: string description: One of the [link types](contract#links). enum: - amends - amended_by - sub_contract - main_contract - replaced_by - replaces - relates_to - description: External contract link. title: External type: object additionalProperties: false required: - id - type - external_link - external_title properties: id: type: integer format: signed_integer_id type: description: Can only be `external` of the [link types](contract#links). type: string enum: - external external_link: type: string minLength: 1 maxLength: 1024 external_title: type: string minLength: 1 maxLength: 130 parties: type: array description: The parties involved in this contract. items: oneOf: - title: Individual description: An individual party, where a single participant is signing on behalf of him- or herself. See [Individual party](doc:party#individual) type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participant - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true participant: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `individual`. enum: - individual - title: Company description: The participants are signing on behalf of this company. See [Company party](doc:party#company). type: object additionalProperties: false required: - _private_ownerside - country_code - id - identification_number - my_party - name - participants - type properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _private_ownerside: type: object description: Party data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string nullable: true updated_time: type: string format: datetime nullable: true country_code: type: string format: country_code id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_party: type: boolean name: type: string minLength: 1 maxLength: 100 participants: description: The maximum number of participants per contract across all parties is 40. type: array items: type: object nullable: false additionalProperties: false description: See [Participant](doc:participant). required: - _permissions - _private_ownerside - delivery_channel - delivery_status - email - id - identification_number - my_participant - name - organizer - phone_number - sign_method - sign_state - sign_state_updated_time - signatory - title - two_step_authentication_method properties: _links: type: object additionalProperties: false description: Links to related endpoints. properties: comments: type: object properties: href: type: string nullable: true contracts: type: object properties: href: type: string nullable: true contract: type: object properties: href: type: string nullable: true create: type: object properties: href: type: string nullable: true data_field: type: object properties: href: type: string nullable: true data_fields: type: object properties: href: type: string nullable: true events: type: object properties: href: type: string nullable: true event: type: object properties: href: type: string nullable: true files: type: object properties: href: type: string nullable: true file: type: object properties: href: type: string nullable: true next: type: object properties: href: type: string nullable: true parties: type: object properties: href: type: string nullable: true party: type: object properties: href: type: string nullable: true previous: type: object properties: href: type: string nullable: true publish: type: object properties: href: type: string nullable: true self: type: object properties: href: type: string nullable: true template_types: type: object properties: href: type: string nullable: true template_type: type: object properties: href: type: string nullable: true template: type: object properties: href: type: string nullable: true templates: type: object properties: href: type: string nullable: true workspaces: type: object properties: href: type: string nullable: true workspace: type: object properties: href: type: string nullable: true _permissions: type: object additionalProperties: false description: This attribute contains the permissions for the participant/creator on the contract. required: - contract:update properties: contract:update: type: boolean _private_ownerside: type: object description: Participant data that is private to the ownerside. nullable: true required: - created_time - custom_id - first_visited_time - last_visited_time - updated_time - visits properties: created_time: type: string format: datetime custom_id: type: string nullable: true first_visited_time: type: string format: datetime nullable: true last_visited_time: type: string format: datetime nullable: true updated_time: type: string format: datetime nullable: true visits: type: integer delivery_channel: type: string description: One of the contract [delivery channels](contract#delivery-channels). enum: - email - sms - email_and_sms - same_device - none - unknown delivery_status: type: string description: One of the contract [delivery status](contract-participant#delivery-status). enum: - not_sent - pending - failure - bounce - success - opened - unknown email: type: string format: email id: type: integer format: signed_integer_id identification_number: type: string minLength: 0 maxLength: 25 my_participant: type: boolean name: type: string minLength: 1 maxLength: 100 nullable: true organizer: description: A flag to indicate if the participant is an organizer combined with the permissions. type: boolean phone_number: type: string minLength: 0 maxLength: 50 nullable: true sign_method: type: string description: One of the [sign methods](contract#sign-methods). enum: - standard_esign - sms - swedish_bankid - norwegian_bankid - danish_mitid - finnish_bankid - handwritten_signature - eid_sign - unknown sign_state: type: string description: One of the [sign states](contract-participant#sign-state). enum: - undecided - signed - declined - unknown sign_state_updated_time: type: string format: datetime nullable: true signatory: description: A flag to indicate if the participant is an signatory combined with the permissions. type: boolean title: type: string minLength: 0 maxLength: 100 two_step_authentication_method: type: string description: One of the [two step authentication methods](contract#two-step-authentication-methods). enum: - email - sms - personal_identification - none - unknown type: type: string description: Can only be `company`. enum: - company discriminator: propertyName: type mapping: individual: contract_party_individual.yml company: contract_party_company.yml pdf_file_groups: type: array description: A list of expanded pdf type file groups in the contract. items: description: A file group represents an expanded PDF session or attachment session in the contract. type: object additionalProperties: false required: - _private_ownerside - files - id - type properties: _private_ownerside: type: object description: File group data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true files: type: array items: type: object additionalProperties: false description: A single file of the contract file group. required: - _private_ownerside - extension - id - name - size properties: _private_ownerside: type: object description: File data that is private to the ownerside. nullable: true required: - created_time - updated_time properties: created_time: type: string format: datetime updated_time: type: string format: datetime nullable: true extension: description: The file extension. type: string nullable: true id: type: integer format: signed_integer_id name: description: The name of the file. type: string nullable: true size: description: The size of the file in bytes. type: integer nullable: true id: type: integer format: unsigned_integer_id type: type: string description: The file group type of the file group sections. There are only two types available, `attachment` and `pdf`. enum: - attachment - pdf product_groups: description: A list of product groups. type: array items: description: A product group represents a product table in the contract, see [Product group](doc:product-group). type: object additionalProperties: false required: - _private_ownerside - configuration - enabled_columns - id - products properties: _private_ownerside: type: object description: Product group data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true configuration: type: object additionalProperties: false description: Updated product group configuration properties: columns: type: array items: type: object additionalProperties: false description: Product group columns data. required: - key properties: enabled: type: boolean key: description: One of the product group column keys. type: string enum: - name - description - price_1 - price_2 - count label: type: string counterpart_edit: type: boolean hide_price_summation: type: boolean price_affixes: type: object additionalProperties: false description: Postfix and prefix of a contract product price. properties: postfix: type: string prefix: type: string created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true enabled_columns: type: array items: type: object additionalProperties: false description: An individual product table columns enable information. required: - enabled - key properties: enabled: type: boolean key: type: string minLength: 0 maxLength: 80 id: type: integer format: unsigned_integer_id products: type: array items: type: object additionalProperties: false description: An individual product in a contract's product table. required: - _private_ownerside - id - name - price_1 - price_2 - quantity properties: _private_ownerside: type: object description: Product data that is private to the ownerside. nullable: true required: - created_time - custom_id - updated_time properties: created_time: type: string format: datetime custom_id: type: string minLength: 1 maxLength: 100 nullable: true updated_time: type: string format: datetime nullable: true counterparty_lock: type: boolean created_from: type: integer description: This will be only available in the contract create response. format: unsigned_integer_id nullable: true description: type: string minLength: 0 maxLength: 3000 id: type: integer format: unsigned_integer_id name: type: string minLength: 0 maxLength: 80 price_1: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true price_2: description: An object that holds all price related information for an individual product. type: object additionalProperties: false nullable: true required: - amount - base_amount - discount_amount - discount_percent properties: amount: description: The price amount after discount. type: object required: - amount properties: amount: type: string format: signed_amount nullable: true base_amount: description: The price amount before discount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_amount: description: The absolute discount amount. type: object required: - amount properties: amount: type: string format: amount nullable: true discount_percent: description: The discount percentage as a decimal string between "0" and "100". type: string format: discount_percent nullable: true quantity: description: The object holds information about the quantity of an individual product. The default quantity type is multiple_choice. If the quantity type is single_choice or multiple_choice, the amount must be set to 0 or 1. If the quantity type is set to single_choice, the amount must be set to 1 at least for one product, and 0 for the rest of the products in the same product group with the quantity type single_choice. type: object additionalProperties: false properties: amount: description: The number of individual products selected, or the quantity. minimum: 0 maximum: 99999999 type: integer nullable: true type: description: One of the product's [quantity types](product-group#quantity-type). type: string default: quantity enum: - single_choice - multiple_choice - quantity published_time: type: string format: datetime nullable: true sign_later: description: A flag to indicate if the contract signing is postponed. type: boolean sign_order: type: array description: Sign order of the participants. items: type: object additionalProperties: false required: - participant_id - order properties: participant_id: type: integer format: signed_integer_id description: participant ID order: type: integer minimum: 1 maximum: 40 description: Sign order signing_period_expiry_time: type: string format: datetime nullable: true state: type: string description: One of the [contract states](contract#contract-state). enum: - draft - pending - overdue - signed - declined - unknown state_updated_time: type: string format: datetime tags: type: array description: All tags associated with the contract. items: type: object additionalProperties: false required: - id - name properties: id: type: integer format: signed_integer_id name: type: string minLength: 1 updated_time: type: string format: datetime nullable: true examples: contractSignResponseExample: value: signed_by: john.diggel@qc.com signed_date: '2023-05-10T06:30:00+00:00' contract: _integration_permissions: [] _links: comments: href: https://api.oneflow.com/v1/contracts/10001/comments data_fields: href: https://api.oneflow.com/v1/contracts/10001/data_fields events: href: https://api.oneflow.com/v1/contracts/10001/events files: href: https://api.oneflow.com/v1/contracts/10001/files parties: href: https://api.oneflow.com/v1/contracts/10001/parties publish: href: https://api.oneflow.com/v1/contracts/10001/publish self: href: https://api.oneflow.com/v1/contracts/10001 template: href: https://api.oneflow.com/v1/templates/170001 template_type: href: https://api.oneflow.com/v1/template_types/220001 workspace: href: https://api.oneflow.com/v1/workspaces/130001 _permissions: contract:delete: true contract:download:pdf: true contract:send: false _private: name: My First Contract signing_period_expiration: expire_date: '2023-05-11' type: fixed_date value: amount: '500.10' currency: SEK workspace_id: 130001 _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' template_id: 170001 template_type_id: 220001 attachment_file_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T17:59:12+00:00' files: - _private_ownerside: created_time: '2023-04-27T17:59:12+00:00' updated_time: '2023-04-27T17:59:20+00:00' extension: docx id: 1200001 name: attachment_sample_doc size: 4168 - _private_ownerside: created_time: '2023-04-27T17:59:12+00:00' updated_time: '2023-04-27T17:59:22+00:00' extension: pdf id: 1200002 name: attachment_sample_pdf size: 6586 id: 920001 type: attachment available_options: can_receive_attachments: false can_receive_expanded_pdf: false can_receive_products: false delivery_channels: - name: email preferred: true required_participant_attributes: - email - name: none preferred: false required_participant_attributes: [] - name: same_device preferred: false required_participant_attributes: - sign_method - name: sms preferred: false required_participant_attributes: - phone_number sign_methods: - name: finnish_bankid preferred: false - name: sms preferred: false - name: standard_esign preferred: true - name: swedish_bankid preferred: false two_step_authentication_methods: - name: email preferred: false required_participant_attributes: - email - name: none preferred: true required_participant_attributes: [] - name: sms preferred: false required_participant_attributes: - phone_number data_fields: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_first_name updated_time: '2023-04-27T11:29:36+00:00' description: firstname of the person id: 140001 name: First Name placeholder: firstname placeholder value: Foo - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_last_name updated_time: '2023-04-27T11:29:36+00:00' description: lastname of the person id: 140002 name: Last Name placeholder: lastname placeholder value: '' id: 10001 lifecycle_settings: duration: 12m end_date: null initial_duration: null notice_period: 3m start_date: null type: recurring lifecycle_state: cancel_time: null composite: active-recurring contract_end_time: null contract_start_time: '2023-04-27T18:30:00+00:00' has_ended_by_termination: false has_passed_notice_period_start_time: true is_canceled: false is_recurring: true lifecycle_state: active lifecycle_state_updated_time: '2023-04-27T18:44:07+00:00' notice_period_start_time: '2024-01-27T18:30:00+00:00' period: 1 period_end_time: '2024-04-27T18:30:00+00:00' period_start_time: '2023-04-27T18:30:00+00:00' links: - id: 1 linked_contract: 10010 type: relates_to parties: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470001 identification_number: 11223344-5566 my_party: true name: Own Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: '2023-04-27T11:29:36+00:00' last_visited_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T18:44:07+00:00' visits: 1 delivery_channel: email delivery_status: success email: own@email.com id: 230001 identification_number: 10034544-0066 my_participant: true name: First Last organizer: false phone_number: '+111222333444' sign_method: unknown sign_state: signed sign_state_updated_time: '2023-04-27T18:44:07+00:00' signatory: true title: Sales Manager two_step_authentication_method: none type: company - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470002 identification_number: 11223344-5577 my_party: false name: Company AB participants: - _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_participant_1 first_visited_time: null last_visited_time: null updated_time: '2023-04-27T18:44:07+00:00' visits: 0 delivery_channel: email delivery_status: success email: mem@email.com id: 230002 identification_number: 10034544-0077 my_participant: false name: Firstname Lastname organizer: false phone_number: '+111222333555' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: company - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T11:29:36+00:00' country_code: SE id: 470003 identification_number: 10034544-0088 my_party: false name: Firstname2 Lastname2 participant: _permissions: contract:update: true _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: null first_visited_time: null last_visited_time: null updated_time: '2023-04-27T18:44:07+00:00' visits: 0 delivery_channel: email delivery_status: success email: individual@email.com id: 230003 identification_number: 10034544-0088 my_participant: false name: Firstname2 Lastname2 organizer: false phone_number: '+111222333666' sign_method: standard_esign sign_state: undecided sign_state_updated_time: null signatory: true title: '' two_step_authentication_method: email type: individual pdf_file_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' updated_time: '2023-04-27T17:59:12+00:00' files: - _private_ownerside: created_time: '2023-04-27T17:59:12+00:00' updated_time: '2023-04-27T17:59:18+00:00' extension: pdf id: 1200003 name: expanded_sample_pdf size: 6586 id: 920002 type: pdf product_groups: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: custom_id_product_group_1 updated_time: '2023-04-27T11:29:36+00:00' configuration: columns: - enabled: true key: name label: ProductX - enabled: true key: description label: Description - enabled: true key: price_1 label: Price 1 - enabled: true key: price_2 label: Price 2 - enabled: true key: count label: ValueX counterpart_edit: false hide_price_summation: false price_affixes: postfix: '' prefix: Rs quantity_precision: 2 enabled_columns: - enabled: true key: name - enabled: true key: description - enabled: true key: price_1 - enabled: true key: price_2 - enabled: true key: count id: 85011 products: - _private_ownerside: created_time: '2023-04-27T11:29:36+00:00' custom_id: CUSTOM_ID_PRODUCT_1 updated_time: '2023-04-27T11:29:36+00:00' counterparty_lock: false description: shiny shoes for sunny saunters id: 150011 name: shoes price_1: amount: amount: '90.00' base_amount: amount: '100.00' discount_amount: amount: '0.00' discount_percent: '10.000' price_2: amount: amount: '0.00' base_amount: amount: '0.00' discount_amount: amount: '0.00' discount_percent: '0.000' quantity: amount: 1 type: multiple_choice published_time: '2023-04-27T18:22:44+00:00' sign_later: false sign_order: - order: 1 participant_id: 230001 - order: 2 participant_id: 230002 - order: 3 participant_id: 230003 signing_period_expiry_time: '2023-05-12T00:00:00+00:00' state: signed state_updated_time: '2023-04-27T18:30:00+00:00' tags: - id: 380001 name: tag one - id: 380002 name: tag two updated_time: '2023-04-27T18:44:09+00:00' '400': description: Invalid format or content of the request. '401': description: The API token or the user email is invalid. '403': description: The request is not authorized by the server. '404': description: A required entity is missing. '409': description: A conflict occurred with the current state of the target resource.