Create example employer
Create and verify an example employer on Indeed.
Before you begin
- Become an Indeed partner and, for Indeed PLUS only, receive an
employerIdTypefrom Indeed - Get a 2-legged access token
When you call the Indeed PLUS APIs, initiate a timeout after 5,000 milliseconds.
Call the API
patchEmployer mutation:
mutation PatchEmployerExample($employerIdType: String!) { patchEmployer(input: { id: { type: $employerIdType, id: "1" } employerName: "Partner Test Company" employerAttributes: { employerType: JURIDICAL_PERSON countrySpecificAttributes: { country: "JP", taxId: "1234567890123" } localeSpecificAttributes: { country: "JP" language: "ja" isGlobalDefault: true description: "Describe your employer organization" headquarterAddress: "東京都千代田区丸の内1-9-2" leader: { name: "Sample CEO name" } } } }) { attributeUpdated }}The code snippet contains this parameter:
{ "employerIdType": "<employerIdType>"}Replace <employerIdType> with your employerIdType.
This curl command sends a POST request to https://apis.indeed.com/graphql with headers and the patchEmployer mutation.
curl -X POST \ -L 'https://apis.indeed.com/graphql' \ -H 'Authorization: Bearer <access_token>' \ -H 'Content-Type: application/json' \ -d '{"query":"mutation PatchEmployerExample($employerIdType: String!) {\n\tpatchEmployer(\n\t\tinput: {\n\t\t\tid: { type: $employerIdType, id: \"1\" }\n\t\t\temployerName: \"Partner Test Company\"\n\t\t\temployerAttributes: {\n\t\t\t\temployerType: JURIDICAL_PERSON\n\t\t\t\tcountrySpecificAttributes: { country: \"JP\", taxId: \"1234567890123\" }\n\t\t\t\tlocaleSpecificAttributes: {\n\t\t\t\t\tcountry: \"JP\"\n\t\t\t\t\tlanguage: \"ja\"\n\t\t\t\t\tisGlobalDefault: true\n\t\t\t\t\tdescription: \"Describe your employer organization\"\n\t\t\t\t\theadquarterAddress: \"東京都千代田区丸の内1-9-2\"\n\t\t\t\t\tleader: { name: \"Sample CEO name\" }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t) {\n\t\tattributeUpdated\n\t}\n}\n","operationName":"PatchEmployerExample","variables":{"employerIdType": "<employerIdType>"}}'Request headers:
| Header | Value | Description |
|---|---|---|
|
| Authenticate with the server to access protected resources. Pass the access token in this header using the note For the See Get an access token and Authorization header. |
|
| The media type of the resource. See Content-Type header. |
The --data parameter specifies the GraphQL query, where <employerIdType> is your employerIdType.
When using Insomnia to send GraphQL requests, you can import a curl command into Insomnia. See Import an API specification as a design document in Insomnia.
A successful response returns the PatchEmployerPayload object:
{ "data": { "patchEmployer": { "attributeUpdated": true } }}Next steps
-
Troubleshoot GraphQL errors you receive in the response.
-
Update the employer by changing, for instance,
headquarterAddress. -
To create more employers, change
id.id. For example, update1to2.