@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Lead API
@base https://unify.apideck.com
@version 10.24.12
@auth ApiKey Authorization in header | ApiKey x-apideck-app-id in header | ApiKey x-apideck-consumer-id in header
@endpoints 5
@toc lead(5)

@endpoint GET /lead/leads
@required {x-apideck-consumer-id: str, x-apideck-app-id: str}
@optional {raw: bool=false, x-apideck-service-id: str, cursor: str, limit: int=20, filter: map, sort: map, fields: str}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint POST /lead/leads
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, name: str}
@optional {raw: bool=false, x-apideck-service-id: str, id: str, company_name: str, owner_id: str, owner_name: str, company_id: str, contact_id: str, lead_id: str, lead_source: str, first_name: str, last_name: str, description: str, prefix: str, title: str, language: str, status: str, monetary_amount: num, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH), fax: str, websites: [map{id: str, url!: str, type: str}], addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}], social_links: [map{id: str, url!: str, type: str}], phone_numbers: [map{id: str, country_code: str, area_code: str, number!: str, extension: str, type: str}], emails: [map{id: str, email!: str(email), type: str}], custom_fields: [map{id: str, name: str, description: str, value: any}], tags: [str], custom_mappings: map, updated_at: str, created_at: str, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}]}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /lead/leads/{id}
@required {id: str, x-apideck-consumer-id: str, x-apideck-app-id: str}
@optional {x-apideck-service-id: str, raw: bool=false, fields: str}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, name: str, company_name: str?, owner_id: str?, owner_name: str?, company_id: str?, contact_id: str?, lead_id: str?, lead_source: str?, first_name: str?, last_name: str?, description: str?, prefix: str?, title: str?, language: str?, status: str?, monetary_amount: num?, currency: str?, fax: str?, websites: [map], addresses: [map], social_links: [map], phone_numbers: [map], emails: [map], custom_fields: [map]?, tags: [str]?, custom_mappings: map?, updated_at: str?, created_at: str?, pass_through: [map]}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint PATCH /lead/leads/{id}
@required {id: str, x-apideck-consumer-id: str, x-apideck-app-id: str, name: str}
@optional {x-apideck-service-id: str, raw: bool=false, id: str, company_name: str, owner_id: str, owner_name: str, company_id: str, contact_id: str, lead_id: str, lead_source: str, first_name: str, last_name: str, description: str, prefix: str, title: str, language: str, status: str, monetary_amount: num, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH), fax: str, websites: [map{id: str, url!: str, type: str}], addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}], social_links: [map{id: str, url!: str, type: str}], phone_numbers: [map{id: str, country_code: str, area_code: str, number!: str, extension: str, type: str}], emails: [map{id: str, email!: str(email), type: str}], custom_fields: [map{id: str, name: str, description: str, value: any}], tags: [str], custom_mappings: map, updated_at: str, created_at: str, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}]}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint DELETE /lead/leads/{id}
@required {id: str, x-apideck-consumer-id: str, x-apideck-app-id: str}
@optional {x-apideck-service-id: str, raw: bool=false}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@end
