Adicionar Datas ao Contrato

Após a criação do contrato, podemos adicionar uma data inicial e final ao documento.

PATCH /contracts/{contract_id}

Clique aqui para testar endpoint

🚧

Todos os endpoints deverão ser autenticados

headers = {
  'Authorization': f'Bearer {api_key}',
  'Content-Type': 'application/json'
}

⚠️ Lembre-se de substituir a variável {contract_id} no parâmetro da rota pelo valor id do contrato que você deseja associar as datas.

Exemplo de payload:

{ 
  "contract": { 
    "begin_date": "2024-05-12", 
    "end_date": "2024-05-30", 
    "due_notice": 7
  } 
}

Descrição do payload:

NameTypeDescription
begin_datestringdata de início da vigência do contrato
end_datestringdata de encerramento do contato
due_noticenumberreceber aviso faltando (valor numérico) dias para o encerramento do contato.

Prazo Indeterminado:

{ 
  "contract": { 
    "begin_date": "2024-05-12", 
    "term_type": "Indeterminado"
  } 
}

⚠️ Caso o prazo do contrato seja indeterminado, é possível passar apenas o valor da variável de início, begin_date e a seguinte variável "term_type", com o valor de "Indeterminado".

Exemplo de resposta:

{
    "data": {
        "deny_reason": null,
        "status": {
            "color": 3,
            "id": 1640,
            "name": "Ag.Assinatura"
        },
        "begin_date": "2024-05-12",
        "number": "2024/28",
        "workflow": null,
        "current_document": {
            "contract": {
                "id": 176046
            },
            "draft": null,
            "editor": "tinymce",
            "file": {
                "download_url": url de download do arquivo,
                "google_file_id": null,
                "id": 199904,
                "inserted_at": "2024-05-23T18:39:28",
                "mime": "application/pdf",
                "name": "dummy.pdf",
                "preview_url": url de visualização prévia do arquivo,
                "size": 13264,
                "updated_at": "2024-05-23T18:39:28"
            },
            "id": "c0444512-1d5b-40a7-9f4b-155a0ee71e38",
            "inserted_at": "2024-05-23T20:13:07",
            "notes": null,
            "organization": {
                "id": 1199
            },
            "proofs": [
                {
                    "deleted_at": null,
                    "document": {
                        "id": "c0444512-1d5b-40a7-9f4b-155a0ee71e38"
                    },
                    "events": [
                        {
                            "action": "create",
                            "changed_field": null,
                            "from": null,
                            "id": 220589,
                            "inserted_at": "2024-05-24T15:10:00",
                            "item_type": "ProofEvent",
                            "proof": {
                                "id": 14628
                            },
                            "subject": null,
                            "to": null,
                            "user": {
                                "activated": true,
                                "activity": "Desenvolvedor Jr",
                                "cpf": "136.382.516-08",
                                "email": "[email protected]",
                                "first_name": "Davi",
                                "gender": "unspecified",
                                "id": 3056,
                                "last_name": "Ferreira",
                                "marital_status": null,
                                "organizations_users": null
                            }
                        },
                        {
                            "action": "viewed",
                            "changed_field": null,
                            "from": null,
                            "id": 220590,
                            "inserted_at": "2024-05-24T15:10:04",
                            "item_type": "ProofEvent",
                            "proof": {
                                "id": 14628
                            },
                            "subject": {
                                "approve_subject_change": null,
                                "certificate_company_document": null,
                                "certificate_company_name": null,
                                "certificate_document": null,
                                "certificate_email": null,
                                "certificate_name": null,
                                "company": null,
                                "company_document": null,
                                "company_name": null,
                                "confirmed_at": null,
                                "confirmed_ip_address": null,
                                "confirmed_user_agent": null,
                                "delivered_at": null,
                                "document": "136.382.516-08",
                                "email": "[email protected]",
                                "engine": "standard",
                                "id": 19568,
                                "inserted_at": "2024-05-24T15:10:00",
                                "name": "Davi",
                                "notification_type": "email",
                                "order": 1,
                                "party": {
                                    "id": 346124
                                },
                                "proof": {
                                    "id": 14628
                                },
                                "qualification": "Contratante",
                                "refused_changes_at": null,
                                "sent_at": "2024-05-24T15:10:00.992000Z",
                                "updated_at": "2024-05-24T15:10:00",
                                "viewed_at": null,
                                "whatsappnum": null
                            },
                            "to": null,
                            "user": {
                                "activated": true,
                                "activity": "Desenvolvedor Jr",
                                "cpf": "136.382.516-08",
                                "email": "[email protected]",
                                "first_name": "Davi",
                                "gender": "unspecified",
                                "id": 3056,
                                "last_name": "Ferreira",
                                "marital_status": null,
                                "organizations_users": null
                            }
                        },
                        {
                            "action": "viewed",
                            "changed_field": null,
                            "from": null,
                            "id": 220591,
                            "inserted_at": "2024-05-24T15:10:28",
                            "item_type": "ProofEvent",
                            "proof": {
                                "id": 14628
                            },
                            "subject": {
                                "approve_subject_change": null,
                                "certificate_company_document": null,
                                "certificate_company_name": null,
                                "certificate_document": null,
                                "certificate_email": null,
                                "certificate_name": null,
                                "company": null,
                                "company_document": null,
                                "company_name": null,
                                "confirmed_at": null,
                                "confirmed_ip_address": null,
                                "confirmed_user_agent": null,
                                "delivered_at": null,
                                "document": "136.382.516-08",
                                "email": "[email protected]",
                                "engine": "standard",
                                "id": 19568,
                                "inserted_at": "2024-05-24T15:10:00",
                                "name": "Davi",
                                "notification_type": "email",
                                "order": 1,
                                "party": {
                                    "id": 346124
                                },
                                "proof": {
                                    "id": 14628
                                },
                                "qualification": "Contratante",
                                "refused_changes_at": null,
                                "sent_at": "2024-05-24T15:10:00.992000Z",
                                "updated_at": "2024-05-24T15:10:00",
                                "viewed_at": null,
                                "whatsappnum": null
                            },
                            "to": null,
                            "user": null
                        },
                        {
                            "action": "viewed",
                            "changed_field": null,
                            "from": null,
                            "id": 220594,
                            "inserted_at": "2024-05-24T15:12:51",
                            "item_type": "ProofEvent",
                            "proof": {
                                "id": 14628
                            },
                            "subject": {
                                "approve_subject_change": null,
                                "certificate_company_document": null,
                                "certificate_company_name": null,
                                "certificate_document": null,
                                "certificate_email": null,
                                "certificate_name": null,
                                "company": null,
                                "company_document": null,
                                "company_name": null,
                                "confirmed_at": null,
                                "confirmed_ip_address": null,
                                "confirmed_user_agent": null,
                                "delivered_at": null,
                                "document": "136.382.516-08",
                                "email": "[email protected]",
                                "engine": "standard",
                                "id": 19568,
                                "inserted_at": "2024-05-24T15:10:00",
                                "name": "Davi",
                                "notification_type": "email",
                                "order": 1,
                                "party": {
                                    "id": 346124
                                },
                                "proof": {
                                    "id": 14628
                                },
                                "qualification": "Contratante",
                                "refused_changes_at": null,
                                "sent_at": "2024-05-24T15:10:00.992000Z",
                                "updated_at": "2024-05-24T15:10:00",
                                "viewed_at": null,
                                "whatsappnum": null
                            },
                            "to": null,
                            "user": null
                        },
                        {
                            "action": "viewed",
                            "changed_field": null,
                            "from": null,
                            "id": 220713,
                            "inserted_at": "2024-05-28T18:42:44",
                            "item_type": "ProofEvent",
                            "proof": {
                                "id": 14628
                            },
                            "subject": {
                                "approve_subject_change": null,
                                "certificate_company_document": null,
                                "certificate_company_name": null,
                                "certificate_document": null,
                                "certificate_email": null,
                                "certificate_name": null,
                                "company": null,
                                "company_document": null,
                                "company_name": null,
                                "confirmed_at": null,
                                "confirmed_ip_address": null,
                                "confirmed_user_agent": null,
                                "delivered_at": null,
                                "document": "136.382.516-08",
                                "email": "[email protected]",
                                "engine": "standard",
                                "id": 19568,
                                "inserted_at": "2024-05-24T15:10:00",
                                "name": "Davi",
                                "notification_type": "email",
                                "order": 1,
                                "party": {
                                    "id": 346124
                                },
                                "proof": {
                                    "id": 14628
                                },
                                "qualification": "Contratante",
                                "refused_changes_at": null,
                                "sent_at": "2024-05-24T15:10:00.992000Z",
                                "updated_at": "2024-05-24T15:10:00",
                                "viewed_at": null,
                                "whatsappnum": null
                            },
                            "to": null,
                            "user": {
                                "activated": true,
                                "activity": "Desenvolvedor Jr",
                                "cpf": "136.382.516-08",
                                "email": "[email protected]",
                                "first_name": "Davi",
                                "gender": "unspecified",
                                "id": 3056,
                                "last_name": "Ferreira",
                                "marital_status": null,
                                "organizations_users": null
                            }
                        },
                        {
                            "action": "viewed",
                            "changed_field": null,
                            "from": null,
                            "id": 220817,
                            "inserted_at": "2024-05-29T13:37:33",
                            "item_type": "ProofEvent",
                            "proof": {
                                "id": 14628
                            },
                            "subject": {
                                "approve_subject_change": null,
                                "certificate_company_document": null,
                                "certificate_company_name": null,
                                "certificate_document": null,
                                "certificate_email": null,
                                "certificate_name": null,
                                "company": null,
                                "company_document": null,
                                "company_name": null,
                                "confirmed_at": null,
                                "confirmed_ip_address": null,
                                "confirmed_user_agent": null,
                                "delivered_at": null,
                                "document": "136.382.516-08",
                                "email": "[email protected]",
                                "engine": "standard",
                                "id": 19568,
                                "inserted_at": "2024-05-24T15:10:00",
                                "name": "Davi",
                                "notification_type": "email",
                                "order": 1,
                                "party": {
                                    "id": 346124
                                },
                                "proof": {
                                    "id": 14628
                                },
                                "qualification": "Contratante",
                                "refused_changes_at": null,
                                "sent_at": "2024-05-24T15:10:00.992000Z",
                                "updated_at": "2024-05-24T15:10:00",
                                "viewed_at": null,
                                "whatsappnum": null
                            },
                            "to": null,
                            "user": {
                                "activated": true,
                                "activity": "Desenvolvedor Jr",
                                "cpf": "136.382.516-08",
                                "email": "[email protected]",
                                "first_name": "Davi",
                                "gender": "unspecified",
                                "id": 3056,
                                "last_name": "Ferreira",
                                "marital_status": null,
                                "organizations_users": null
                            }
                        },
                        {
                            "action": "viewed",
                            "changed_field": null,
                            "from": null,
                            "id": 220818,
                            "inserted_at": "2024-05-29T13:50:36",
                            "item_type": "ProofEvent",
                            "proof": {
                                "id": 14628
                            },
                            "subject": {
                                "approve_subject_change": null,
                                "certificate_company_document": null,
                                "certificate_company_name": null,
                                "certificate_document": null,
                                "certificate_email": null,
                                "certificate_name": null,
                                "company": null,
                                "company_document": null,
                                "company_name": null,
                                "confirmed_at": null,
                                "confirmed_ip_address": null,
                                "confirmed_user_agent": null,
                                "delivered_at": null,
                                "document": "136.382.516-08",
                                "email": "[email protected]",
                                "engine": "standard",
                                "id": 19568,
                                "inserted_at": "2024-05-24T15:10:00",
                                "name": "Davi",
                                "notification_type": "email",
                                "order": 1,
                                "party": {
                                    "id": 346124
                                },
                                "proof": {
                                    "id": 14628
                                },
                                "qualification": "Contratante",
                                "refused_changes_at": null,
                                "sent_at": "2024-05-24T15:10:00.992000Z",
                                "updated_at": "2024-05-24T15:10:00",
                                "viewed_at": null,
                                "whatsappnum": null
                            },
                            "to": null,
                            "user": {
                                "activated": true,
                                "activity": "Desenvolvedor Jr",
                                "cpf": "136.382.516-08",
                                "email": "[email protected]",
                                "first_name": "Davi",
                                "gender": "unspecified",
                                "id": 3056,
                                "last_name": "Ferreira",
                                "marital_status": null,
                                "organizations_users": null
                            }
                        },
                        {
                            "action": "viewed",
                            "changed_field": null,
                            "from": null,
                            "id": 220819,
                            "inserted_at": "2024-05-29T13:53:23",
                            "item_type": "ProofEvent",
                            "proof": {
                                "id": 14628
                            },
                            "subject": {
                                "approve_subject_change": null,
                                "certificate_company_document": null,
                                "certificate_company_name": null,
                                "certificate_document": null,
                                "certificate_email": null,
                                "certificate_name": null,
                                "company": null,
                                "company_document": null,
                                "company_name": null,
                                "confirmed_at": null,
                                "confirmed_ip_address": null,
                                "confirmed_user_agent": null,
                                "delivered_at": null,
                                "document": "136.382.516-08",
                                "email": "[email protected]",
                                "engine": "standard",
                                "id": 19568,
                                "inserted_at": "2024-05-24T15:10:00",
                                "name": "Davi",
                                "notification_type": "email",
                                "order": 1,
                                "party": {
                                    "id": 346124
                                },
                                "proof": {
                                    "id": 14628
                                },
                                "qualification": "Contratante",
                                "refused_changes_at": null,
                                "sent_at": "2024-05-24T15:10:00.992000Z",
                                "updated_at": "2024-05-24T15:10:00",
                                "viewed_at": null,
                                "whatsappnum": null
                            },
                            "to": null,
                            "user": {
                                "activated": true,
                                "activity": "Desenvolvedor Jr",
                                "cpf": "136.382.516-08",
                                "email": "[email protected]",
                                "first_name": "Davi",
                                "gender": "unspecified",
                                "id": 3056,
                                "last_name": "Ferreira",
                                "marital_status": null,
                                "organizations_users": null
                            }
                        }
                    ],
                    "id": 14628,
                    "inserted_at": "2024-05-24T15:10:00",
                    "ordered": false,
                    "organization": {
                        "id": 1199
                    },
                    "original_file": {
                        "download_url": url de download do arquivo,
                        "google_file_id": null,
                        "id": 199904,
                        "inserted_at": "2024-05-23T18:39:28",
                        "mime": "application/pdf",
                        "name": "dummy.pdf",
                        "preview_url": url de visualização prévia do arquivo,
                        "size": 13264,
                        "updated_at": "2024-05-23T18:39:28"
                    },
                    "packaged_file": null,
                    "preview_file": null,
                    "proof_subject_requested_changes": [],
                    "receipt_file": null,
                    "requester": {
                        "activated": true,
                        "activity": "Desenvolvedor Jr",
                        "cpf": "136.382.516-08",
                        "email": "[email protected]",
                        "first_name": "Davi",
                        "gender": "unspecified",
                        "id": 3056,
                        "last_name": "Ferreira",
                        "marital_status": null,
                        "organizations_users": null
                    },
                    "signed_file": null,
                    "signing_file": {
                        "download_url": url de download do arquivo,
                        "google_file_id": null,
                        "id": 199909,
                        "inserted_at": "2024-05-24T15:10:00",
                        "mime": "application/pdf",
                        "name": "dummy.pdf",
                        "preview_url": url de visualização prévia do arquivo,
                        "size": 19619,
                        "updated_at": "2024-05-24T15:10:00"
                    },
                    "status": "pending",
                    "subjects": [
                        {
                            "approve_subject_change": null,
                            "certificate_company_document": null,
                            "certificate_company_name": null,
                            "certificate_document": null,
                            "certificate_email": null,
                            "certificate_name": null,
                            "company": null,
                            "company_document": null,
                            "company_name": null,
                            "confirmed_at": null,
                            "confirmed_ip_address": null,
                            "confirmed_user_agent": null,
                            "delivered_at": null,
                            "document": "136.382.516-08",
                            "email": "[email protected]",
                            "engine": "standard",
                            "id": 19568,
                            "inserted_at": "2024-05-24T15:10:00",
                            "name": "Davi",
                            "notification_type": "email",
                            "order": 1,
                            "party": {
                                "trade_name": null,
                                "address_zip_code": "36406-007",
                                "form": null,
                                "document": "136.382.516-08",
                                "reference": "em frente a santinha da Marechal",
                                "address_street": "Alameda João de Freitas",
                                "id": 346124,
                                "address_state": "MG",
                                "name": "Davi Ferreira Dev",
                                "national_id": "20017630",
                                "inserted_at": "2024-05-06T18:40:28",
                                "birth_date": "1997-08-28",
                                "contact_name": null,
                                "reps": null,
                                "organization": {
                                    "id": 1199
                                },
                                "updated_at": "2024-05-24T15:50:15",
                                "email": "[email protected]",
                                "address_complement": "Centro",
                                "phone": "(31) 98700-1467",
                                "contact_email": null,
                                "address_number": "25",
                                "marital_status": "single",
                                "address_neighborhood": "São Sebastião",
                                "state_subscription": null,
                                "person_type": "pf",
                                "contact_phone": null,
                                "imported_id": null,
                                "address_country": "Brasil",
                                "nationality": "Brasileiro",
                                "address_city": "Conselheiro Lafaiete",
                                "city_subscription": null,
                                "whatsappnum": "+55 31 98700 1467",
                                "profession": "Desenvolvedor de Software"
                            },
                            "proof": {
                                "id": 14628
                            },
                            "qualification": "Contratante",
                            "refused_changes_at": null,
                            "sent_at": "2024-05-24T15:10:00.992000Z",
                            "updated_at": "2024-05-24T15:10:00",
                            "viewed_at": null,
                            "whatsappnum": null
                        }
                    ],
                    "updated_at": "2024-05-24T15:10:00"
                }
            ],
            "updated_at": "2024-05-23T20:13:07",
            "user": {
                "id": 3056
            }
        },
        "classifier": null,
        "tasks": [],
        "archived": false,
        "due_notice": 7,
        "id": 176046,
        "shares": [
            {
                "company": null,
                "contract": {
                    "id": 176046
                },
                "email_viewed_at": null,
                "engine": "standard",
                "id": 345685,
                "inserted_at": "2024-05-24T15:09:52",
                "notification_type": "email",
                "order": 1,
                "party": {
                    "trade_name": null,
                    "address_zip_code": "36406-007",
                    "form": null,
                    "document": "136.382.516-08",
                    "reference": "em frente a santinha da Marechal",
                    "address_street": "Alameda João de Freitas",
                    "id": 346124,
                    "address_state": "MG",
                    "name": "Davi Ferreira Dev",
                    "national_id": "20017630",
                    "inserted_at": "2024-05-06T18:40:28",
                    "birth_date": "1997-08-28",
                    "contact_name": null,
                    "reps": null,
                    "organization": {
                        "id": 1199
                    },
                    "updated_at": "2024-05-24T15:50:15",
                    "email": "[email protected]",
                    "address_complement": "Centro",
                    "phone": "(31) 98700-1467",
                    "contact_email": null,
                    "address_number": "25",
                    "marital_status": "single",
                    "address_neighborhood": "São Sebastião",
                    "state_subscription": null,
                    "person_type": "pf",
                    "contact_phone": null,
                    "imported_id": null,
                    "address_country": "Brasil",
                    "nationality": "Brasileiro",
                    "address_city": "Conselheiro Lafaiete",
                    "city_subscription": null,
                    "whatsappnum": "+55 31 98700 1467",
                    "profession": "Desenvolvedor de Software"
                },
                "qualification": "Contratante",
                "signer_type": "sign",
                "updated_at": "2024-05-29T13:53:23",
                "viewed_at": "2024-05-29T13:53:23.040449Z"
            }
        ],
        "inserted_at": "2024-05-23T20:13:07",
        "observations": null,
        "attachments": [],
        "financial": [],
        "form_submission": null,
        "organization": {
            "active": true,
            "addons": [],
            "available_proof_engines": [
                "standard"
            ],
            "domains": [],
            "id": 1199,
            "inserted_at": "2023-12-15T19:35:45",
            "logo_url": null,
            "name": "CK API Development Corp",
            "organization_plan": {
                "document_history": false,
                "form_review_flow": false,
                "id": 1193,
                "inserted_at": "2023-12-15T19:35:45",
                "organization": {
                    "id": 1199
                },
                "plan": {
                    "id": 7
                },
                "price": "199.90",
                "price_user": "56.33",
                "redlining": false,
                "sharelink": true,
                "signature_counter": 1,
                "updated_at": "2023-12-15T19:35:45",
                "whatsapp_link": true,
                "whatsapp_monthly_quota": 1000,
                "whatsapp_notification": true
            },
            "organizations_users": null,
            "statuses": null,
            "updated_at": "2024-05-23T20:16:47",
            "workflows": null
        },
        "object": null,
        "comments": [],
        "updated_at": "2024-05-29T13:53:23",
        "review_flows_events": [],
        "pendencies": 1,
        "assignee": {
            "activated": true,
            "activity": "Desenvolvedor Jr",
            "cpf": "136.382.516-08",
            "email": "[email protected]",
            "first_name": "Davi",
            "gender": "unspecified",
            "id": 3056,
            "last_name": "Ferreira",
            "marital_status": null,
            "organizations_users": null
        },
        "title": "Teste Contrato",
        "term_type": "Indeterminado",
        "deleted": false,
        "needs_acceptance": false,
        "end_date": "2024-05-30",
        "childrem_contracts": [],
        "prev_status": null,
        "custom_fields": [],
        "parent_contract": null,
        "review_flow": null,
        "prev_assignee": null
    }
}