Contracts

Contracts document services


Parameters

Name In Type Required Description
org_id path string true The string id related with tenants which contract belongs to
contract_id path string true Contract identifier

Request example

1
2
3
4

curl -X GET https://documents.masstack.com/v1/orgs/yoigo/contracts/00c6a5a6-2d8a-4857-9b32-a4abbdbd0c2c \
  -H "Accept: application/json"

Responses

Code Meaning Description Schema
200 OK Expected response GetContractResponse
400 Bad Request Request input is not valid None
401 Unauthorized Unauthorized. AuthN and AuthZ validations have fail None
404 Not Found Resource not found None
500 Internal Server Error Not expected error None
default Default Error response ErrorsResponse

Parameters

Name In Type Required Description
x-auth-owner header string true The string id related with the contract owner. It is mandatory
org_id path string true The string id related with one of Grupo MasOrange tenants
body body CreateFilledContractRequest true Data to fill (and sign data) a template contract

Request body - instance of CreateFilledContractRequest

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
{
  "template_external_id": "telco_services",
  "template_version": "1",
  "language": "string",
  "flags_conditions": [
    "GDPR:YES"
  ],
  "fields_values": [
    {
      "name": "string",
      "value": "string"
    }
  ],
  "name": "personal_contract",
  "tags": [
    "Draft",
    "CONTRACT",
    "v1.0"
  ]
}
Name Type Required Description
template_external_id string true Template external id unique identifier
template_version integer true version of the template to be updated
language Language1 true Templates languages allowed to generate contract
Allowed values: ES, EN, EU, GL, CA, DE, UNDEFINED
flags_conditions [Condition1] false list of conditions which trigger specific sections of the template to be filled
fields_values [ContractValues] true template variables whose values will be printed in the filled template
name string false Name of the document filled (without spaces). The document is renamed with this value.
tags [Tag1] false Free values (user-defined) to tag document. These values are normalized following the next rules:
- All tags will be converted to lowercase
- All whitespaces will be removed
- Empty or blank tags are not allowed
- Tags matching reserved words (null, undefined or nan) are not allowed

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

curl -X POST https://documents.masstack.com/v1/orgs/masmovil/contracts/fill \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "x-auth-owner: string" \
 --data-raw "{
  'template_external_id': 'telco_services',
  'template_version': '1',
  'language': 'string',
  'flags_conditions': [
    'GDPR:YES'
  ],
  'fields_values': [
    {
      'name': 'string',
      'value': 'string'
    }
  ],
  'name': 'personal_contract',
  'tags': [
    'Draft',
    'CONTRACT',
    'v1.0'
  ]
}" 

Responses

Code Meaning Description Schema
200 OK Expected response to a valid request. CreateFilledContractResponse
400 Bad Request Request input is not valid None
401 Unauthorized Unauthorized. AuthN and AuthZ validations have fail None
404 Not Found resource not found None
410 Gone resource is not longer available None
500 Internal Server Error Not expected error None
default Default Error response ErrorsResponse

Parameters

Name In Type Required Description
x-auth-owner header string true The string id related with the contract owner. It is mandatory
org_id path string true The string id related with one of Grupo MasOrange tenants
contract_id path string(uuid) true Contract identifier
body body ChangeContractOwnerRequest true Data required to update contract’s owner

Request body - instance of ChangeContractOwnerRequest

1
2
3
{
  "new_owner": "subsCrIptIon8172241"
}
Name Type Required Description
new_owner string true New contract owner

Request example

1
2
3
4
5
6
7
8
9

curl -X PUT https://documents.masstack.com/v1/orgs/masmovil/contracts/00c6a5a6-2d8a-4857-9b32-a4abbdbd0c2c/owner \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "x-auth-owner: string" \
 --data-raw "{
  'new_owner': 'subsCrIptIon8172241'
}" 

Responses

Code Meaning Description Schema
200 OK Owner changed successfully. ChangeContractOwnerResponse
400 Bad Request Request input is not valid None
401 Unauthorized Unauthorized. AuthN and AuthZ validations have fail None
404 Not Found resource not found None
410 Gone resource is not longer available None
500 Internal Server Error Not expected error None
default Default Error response ErrorsResponse

Parameters

Name In Type Required Description
org_id path string true The string id related with one of Grupo MasOrange tenants
body body SignContractsRequest true metadata for creating the contract’s sign process

Request body - instance of SignContractsRequest

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
  "sign_type": "ONLINE",
  "signers": [
    {
      "alias": "signer_1",
      "name": "James",
      "last_name": "Smith",
      "identity_document": {
        "document_number": "12345678A",
        "document_type": "NIF"
      },
      "email": "example@email.com",
      "msisdn": {
        "phone_number": 6123456789,
        "country_code": "34"
      },
      "language": "ES",
      "identification_options": {
        "personal_document_evidence": true
      }
    }
  ],
  "contracts": [
    {
      "contract_id": "310484e7-40ec-4b4b-8731-3e7ed29f7ef5"
    }
  ],
  "additional_options": {
    "preview_documents": [
      "d290f1ee-6c54-4b01-90e6-d701748f0851"
    ]
  }
}
Name Type Required Description
sign_type string true type of the sign process in which contracts are going to be signed. values: ‘ONSITE’, ‘ONLINE’
signers [Signer] true none
contracts [ContractWithoutOwner] true List of contracts to be signed
additional_options SignContractAdditionalOptions false additional options to configure on contracts sign process

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

curl -X POST https://documents.masstack.com/v1/orgs/masmovil/contracts/sign \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
 --data-raw "{
  'sign_type': 'ONLINE',
  'signers': [
    {
      'alias': 'signer_1',
      'name': 'James',
      'last_name': 'Smith',
      'identity_document': {
        'document_number': '12345678A',
        'document_type': 'NIF'
      },
      'email': 'example@email.com',
      'msisdn': {
        'phone_number': 6123456789,
        'country_code': '34'
      },
      'language': 'ES',
      'identification_options': {
        'personal_document_evidence': true
      }
    }
  ],
  'contracts': [
    {
      'contract_id': '310484e7-40ec-4b4b-8731-3e7ed29f7ef5'
    }
  ],
  'additional_options': {
    'preview_documents': [
      'd290f1ee-6c54-4b01-90e6-d701748f0851'
    ]
  }
}" 

Responses

Code Meaning Description Schema
201 Created New sign process is created to sign contracts. Expected response for a valid request. SignContractsResponse
400 Bad Request Request input is not valid None
401 Unauthorized Unauthorized. AuthN and AuthZ validations have fail None
500 Internal Server Error Not expected error None
default Default Error response ErrorsResponse

Endpoints

Documents

    Forms

      Sections

        Templates

          Templates Configuration

            Digital Sign Process

              Biometric Signature

                Simple Signature

                  Identification Agent

                    Sign Configuration

                      Identification OTP

                        Identification Agent Admin

                          Identification OTP Admin

                            Contracts

                              Scoring

                                Securize