Skip to main content

Company Provisioning

Available

These endpoints allow you to provision new company accounts (recruiter access) and deactivate company access.


1. Provision Company​

Registers or updates a company and its list of associated recruiters.

HTTP Request [POST]
https://parceiros.empregos.com.br/api/company/provision

curl -X 'POST' \
'https://parceiros.empregos.com.br/api/company/provision' \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer any' \
-d '{
"externalCompanyId": "E1",
"companyName": "Empregos.com.br",
"nationalRegister": "12345678000199",
"productId": 10,
"recruiter": [
{
"externalRecruiterId": "R1",
"email": "recrutador@empregos.com.br",
"recruiterName": "José Silva"
}
]
}'

Parameters [Request]​

FieldDescriptionTypeRequired
externalCompanyIdUnique identifier of the company in the partner system. Max 50 chars.StringYes
companyNameCompany name. Max 100 chars.StringYes
nationalRegisterNational registration ID (CNPJ). Max 20 chars.StringYes
productIdProduct/Plan Code ID. Can be null.IntNo
recruiterList of recruiters to provision.ArrayYes
recruiter.externalRecruiterIdUnique identifier of the recruiter. Max 50 chars.StringYes
recruiter.emailEmail of the recruiter. Max 255 chars.StringYes
recruiter.recruiterNameName of the recruiter. Max 200 chars.StringYes

Responses​

  • 200 OK: The request was processed. Returns one report item per recruiter in the request. A 200 does not mean every recruiter was provisioned: check status on each item.
    {
    "report": [
    {
    "externalRecruiterId": "R1",
    "status": "PROVISIONED",
    "redirectUrl": "https://b2b.empregos.com.br/empresa/cadastro/comecar-cadastro?email=recrutador%40empregos.com.br"
    },
    {
    "externalRecruiterId": "R2",
    "status": "ERROR",
    "redirectUrl": "https://b2b.empregos.com.br/empresa/cadastro/comecar-cadastro?email=outro%40empregos.com.br",
    "error": "Email is already registered with different details."
    }
    ]
    }
  • 400 BadRequest: Invalid payload or a failure in the provisioning. A payload that breaks a validation (missing required field, a value over its maximum length, an invalid recruiter.email) is rejected with the standard validation response, which lists the errors by field. A failure during provisioning, such as no default product configured for the partner when productId is not sent, returns:
    {
    "success": false,
    "message": "Default product not found for partner."
    }
  • 401 Unauthorized: missing or invalid bearer token. See Security.
  • 500 InternalServerError: unexpected error. Same body format as the 400 above.
Response fieldDescriptionType
reportOne item per recruiter received in the request.Array
report.externalRecruiterIdThe recruiter identifier sent in the request.String
report.statusPROVISIONED when the recruiter access was created or updated; ERROR otherwise.String
report.redirectUrlLink to the Empregos B2B sign-up, with the recruiter e-mail pre-filled (URL-encoded in email). The recruiter follows it to finish the registration.String
report.errorReason of the failure. Present only when status is ERROR.String

2. Deactivate Company Access​

Deactivates access for all recruiters associated with the specified company and cancels their active plan.

HTTP Request [DELETE]
https://parceiros.empregos.com.br/api/company/provision

curl -X 'DELETE' \
'https://parceiros.empregos.com.br/api/company/provision' \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer any' \
-d '{
"externalCompanyId": "E1",
"companyName": "Empregos.com.br",
"nationalRegister": "12345678000199",
"productId": 10,
"recruiter": []
}'

Parameters [Request]​

The body has the same format as the provisioning request, and the same validations apply. Only externalCompanyId is used to find the company to deactivate, but companyName and nationalRegister are still required. recruiter and productId are ignored, and recruiter can be an empty array or omitted.

FieldDescriptionTypeRequired
externalCompanyIdUnique identifier of the company in the partner system. Max 50 chars. It identifies the company to deactivate.StringYes
companyNameCompany name. Max 100 chars. Not used to find the company.StringYes
nationalRegisterNational registration ID (CNPJ). Max 20 chars. Not used to find the company.StringYes
productIdIgnored.IntNo
recruiterIgnored. Can be an empty array.ArrayNo

Responses​

  • 200 OK: Request processed. success is true and message reports how many access records were updated and the result of the integration that cancels the plan.
    {
    "success": true,
    "message": "Company access deactivated successfully. Rows affected: 2. Integration: success."
    }
    Integration is success, failed, or skipped (Company/Plan Code not found). A 200 does not guarantee the plan was cancelled: check Integration in the message.
  • 400 BadRequest: Invalid payload (rejected with the standard validation response, which lists the errors by field), or a failure while deactivating, which returns:
    {
    "success": false,
    "message": "Invalid partner code. It must be an integer."
    }
  • 401 Unauthorized: missing or invalid bearer token. See Security.
  • 500 InternalServerError: unexpected error. Same body format as the 400 above.
Response fieldDescriptionType
successtrue when the request was processed.Boolean
messageResult message (in English).String