Skip to main content

Edit a business

This endpoint allows you to update business information. Only the parameters provided will be updated; others will be ignored.

Endpoint

POST https://canadamotorjobs.com/api/v1/{locale}/businesses/edit

Parameters

ParameterTypeDescriptionRequired
idstringThe business identifierRequired or ref_id
ref_idstringThe business identifier in your systemRequired or id
api_tokenstringYour API key, if you are not using the bearer tokenRequired if not using bearer token
with_databooleanWhether you want to receive business data in addition to the responseNo
namestringThe business nameNo
categorystringThe business categoryNo
logobase64The business logoNo
street_addressstringThe business addressNo
citystringThe cityNo
provincestringThe provinceNo
countrystringThe countryNo
postal_codestringThe postal codeNo
latitudefloatThe latitudeNo
longitudefloatThe longitudeNo
phonestringThe phone numberNo
email_facturationstringThe billing email addressNo
a_proposmarkdownBusiness description textNo
why_work_with_usmarkdownText on why work with this businessNo
working_conditions_custommarkdownWorking conditions text, ideally as a bullet listNo

Please only provide the parameters that need to be updated; others will be ignored. To avoid accidentally deleting data, please use an empty string "" for parameters that should be set to null.

Response

Returns the request status and all business information with the updated information if the with_data parameter is true.

Response codes

CodeMessageDescription
BUSINESS_UPDATEDThe business was updated successfullyReturns the updated business information
NOT_FOUNDThe business was not foundReturns an error if the business does not exist
INVALID_PARAMETERSThe parameters provided are invalidReturns an error if the parameters provided are invalid
NOT_AUTHORIZEDYou are not authorized to perform this actionReturns an error if you are not authorized to perform this action
ERROR_SERVERAn error occurred while updating the businessReturns an error if an error occurred while updating the business

Example response with invalid parameters

{
"success": false,
"code": "INVALID_PARAMETERS",
"message": "The parameters provided are invalid",
"errors": {
"name": "The name cannot be empty",
"logo": "Unable to process the image provided",
"etc...": "The rest of the parameters that caused the update to fail"
}
}

Code example

Changing the business address and removing the why work with us text

// Laravel PHP
use Illuminate\Support\Facades\Http;

$response = Http::withHeaders([
"Authorization" => "Bearer your_api_token"
])->post("https://canadamotorjobs.com/api/v1/en/businesses/edit", [
"ref_id" => "1234567890", // The business identifier in your system
"api_token" => "your_api_token" ?? null // Your API key, if you are not using the bearer token
"street_address" => "123 Saint Catherine Street",
"city" => "Montreal",
"postal_code" => "H3Z 2Y7",
"latitude" => 45.5017,
"longitude" => -73.5673,
"why_work_with_us" => "",//<= removes the why work with this business text
]);