pid: the pcc_id of the offer, for example response.data.offers[X].offers[0].segments[0].pcc_id from /api/air/offers. Always pass it. The list depends on the supplier of the offer, and offers on the same route can come from different suppliers.locale: optional, the language of name.pcc_id and changes only with platform updates. Request it for the pcc_id of each offer you book. You can cache the response per pcc_id, for example for 24 hours.| Field | Description |
|---|---|
id | Document type ID. |
code | Document type code. Pass it in passengers[].document.type when you create an order. |
custom | The supplier's code for this document type. For reference only, don't send it. |
citizen | The citizenship this type applies to, see below. |
name | Document type name in the requested language. |
attributes | Document fields this type supports, with limits in config: min, max, regex, hint. |
cyrillic_data | SR only: true if the certificate number can contain Cyrillic letters. |
citizen matches the passenger's citizenship:ALL: any citizenship;RU: citizens of Russia only;OTHER: any citizenship except Russia;TJ: citizens of that country only.PSP for a foreign passport, PS for a national passport;ZC for a foreign (international) passport, NP for a national passport or a national ID card;SR for a birth certificate, or a passport as above.code in the order. If several rows have the same code, you don't need to choose between them: the supplier's code is selected by the passenger's citizenship.ZC; with a national ID card, NP.attributes lists the fields a document type supports. It isn't a list of required fields: an attribute doesn't make a field mandatory, and some types return an empty list.DocumentNumber: limits for passengers[].document.number.DocumentSeries: there is no separate series field. Write the series and the number together in number, for example AA1234567.DocumentExpire: the document type has an expiry date. If the passenger's document has an expiry date, pass it in passengers[].document.expire even if this attribute isn't in the list.LastName, FirstName, MiddleName: passenger name fields. middle_name is optional.SR has no DocumentExpire attribute. Don't send expire.cyrillic_data: false: the number contains only Latin letters and digits, without spaces, hyphens or other characters.cyrillic_data: true: the number can contain Cyrillic letters, as in the document. If DocumentNumber has regex and hint, they describe the format of a Russian birth certificate. For certificates of other countries, use Latin letters and digits without spaces or hyphens.pid is not an integer or no supplier with this pid exists:{
"pid": ["Provider with this pid was not found."]
}curl --location --globoff 'https://stage-api.etm-system.com/api/documents/types/site?locale=RU&pid={{pcc_id}}' \
--header 'Accept: application/json' \
--header 'Etm-Auth-Key: ' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Content-Type: application/json'{
"data": [
{
"id": 2,
"code": "PSP",
"custom": "P",
"citizen": "RU",
"name": "Заграничный паспорт",
"attributes": []
},
{
"id": 4,
"code": "PS",
"custom": "P",
"citizen": "RU",
"name": "Национальный паспорт",
"attributes": []
},
{
"id": 6,
"code": "ZC",
"custom": "P",
"citizen": "OTHER",
"name": "Заграничный паспорт",
"attributes": []
},
{
"id": 7,
"code": "NP",
"custom": "P",
"citizen": "OTHER",
"name": "Национальный паспорт",
"attributes": [
{
"id": 76,
"code": "LastName",
"name": "Фамилия",
"config": {
"type": "string"
}
},
{
"id": 77,
"code": "FirstName",
"name": "Имя",
"config": {
"type": "string"
}
},
{
"id": 78,
"code": "MiddleName",
"name": "Отчество",
"config": {
"type": "string"
}
},
{
"id": 132,
"code": "DocumentSeries",
"name": "Серия",
"config": {
"type": "string",
"max": 16
}
},
{
"id": 10,
"code": "DocumentNumber",
"name": "Номер документа",
"config": {
"type": "string",
"min": 1,
"max": 17
}
}
]
},
{
"id": 8,
"code": "SR",
"custom": "I",
"citizen": "ALL",
"name": "Свидетельство о рождении",
"attributes": [
{
"id": 79,
"code": "LastName",
"name": "Фамилия",
"config": {
"type": "string"
}
},
{
"id": 80,
"code": "FirstName",
"name": "Имя",
"config": {
"type": "string"
}
},
{
"id": 81,
"code": "MiddleName",
"name": "Отчество",
"config": {
"type": "string"
}
},
{
"id": 133,
"code": "DocumentSeries",
"name": "Серия",
"config": {
"type": "string",
"max": 16
}
},
{
"id": 12,
"code": "DocumentNumber",
"name": "Номер документа",
"config": {
"type": "string",
"min": 1,
"max": 17
}
}
]
}
]
}