PUT Update supplier
The Update Supplier API will let you update an existing supplier in your Toursys platform.
[ENDPOINT]/ToursysConnectionApi/api/suppliers/update
To know what [ENDPOINT] to use, check our documentation regarding endpoints.
Headers
X-API-KEY generatedToken
Parameters:
supplier_code - (String, Required) | Supplier's unique reference code
supplier_legal_name - (String, Required) | Supplier's legal name
supplier_commercial_name - (String, Required) | Supplier’s commercial name
supplier_office_address - (String, Required) | Specific address for the supplier
supplier_email - (String, Required) | Supplier's communication email
supplier_internal_comments - (String, Optional) | Comments only the Toursys users will see
supplier_prepayment_days - (Int, Optional) | Number of days prior to service by which the supplier must be paid
supplier_credit_days - (Int, Optional) | Payment date will be the end date of the reservation + credit days. If credit days are 0 and prepayment days are 0, this is a cash supplier.
supplier_accepts_pets - (Boolean, Optional) | If supplier allows pets or not. | (0 = No pets allowed, 1 = Pets allowed)
supplier_certificate_1 - (String, Optional) | Certification type name (ex. stars, leaves, forks, etc.)
supplier_certificate_1_ranking - (Int, Optional) | Ranking number for the certificate
supplier_certificate_2 - (String, Optional) | Certification type name (ex. stars, leaves, forks, etc.)
supplier_certificate_2_ranking - (Int, Optional) | Ranking number for the certificate
supplier_certificate_3 - (String, Optional) | Certification type name (ex. stars, leaves, forks, etc.)
supplier_certificate_3_ranking - (Int, Optional) | Ranking number for the certificate
supplier_business_address - (String, Optional) | Supplier’s business address
supplier_website - (String, Optional) | Supplier's website URL
supplier_phone - (String, Optional) | Supplier's phone number
supplier_contacts - (List, Optional) | List of supplier contacts
contact_code - (String, Required) | Code to identify the contact
contact_first_name - (String, Required) | First name of the contact
contact_last_name - (String, Required) | Last name of the contact
contact_gender - (Boolean, Required) | Gender of the contact | (0 = Male, 1 = Female)
contact_email - (String, Required) | Contact email
contact_phone - (String, Required) | Contact phone or cellphone
supplier_information - (List, Optional) | List of supplier information
information_language - (String, Optional) | Language code that identifies the language the information is being provided. You can check on the managed languages on here
information_short_description - (String, Required) | Short description for the supplier
information_long_description - (String, Optional) | Long more detailed description for the supplier
information_policies - (String, Optional) | Supplier's policies
information_general_comments - (String, Optional) | Supplier's general comments
Example Request
curl --location -g --request POST '[ENDPOINT]/ToursysConnectionApi/api/suppliers/update' \
--header 'X-API-KEY: generatedToken' \
--header 'Content-Type: application/json' \
--data '{
"supplier_code": "Acmetravel",
"supplier_id_number": "000000000",
"supplier_legal_name": "Acmetravel SA",
"supplier_commercial_name": "Acmetravel",
"supplier_internal_comments": "Demo supplier",
"supplier_prepayment_days": 15,
"supplier_credit_days": 0,
"supplier_accepts_pets": false,
"supplier_certificate_1 ": "Stars",
"supplier_certificate_1_ranking": 5,
"supplier_certificate_2": "",
"supplier_certificate_2_ranking": 0,
"supplier_certificate_3": "",
"supplier_certificate_3_ranking": 0,
"supplier_office_address": "USA, Florida",
"supplier_business_address": "USA, Florida",
"supplier_email": "info@acmetravel.com",
"supplier_website": "acmetravel.com",
"supplier_phone": "+1 (213) 984-1313",
"supplier_contacts": [
{
"contact_code": "John Smith",
"contact_first_name": "John",
"contact_last_name": "Smith",
"contact_gender": 0,
"contact_email": "john.smith@acmetravel.com",
"contact_phone": "+1 (213) 984-1313",
"contact_type": "Sales"
}
],
"supplier_information": [
{
"information_language": "en",
"information_short_description": "Come and enjoy the best tours and hotels in the market.",
"information_long_description": "",
"information_policies": "",
"information_general_comments": "",
"information_video_url": "https://youtu.be/5Cs2DXU0H_g"
}
]
}'
Error codes:
BAD_GATEWAY - 500
001 - A supplier with the code provided already exists in Toursys. Each supplier code must be unique.
002 - The following fields are required, please check they all have data: supplier code, supplier legal name, supplier commercial name, supplier type, supplier language, supplier location, supplier office address, and supplier email.
003 - You must provide at least 1 contact for the supplier.
004 - Invalid supplier ID type code. Please provide a valid one.
005 - There is no supplier with that identification code in Toursys.