Facturalusa - Software de Facturação Grátis

Vendas - Procurar

—
Este endpoint destina-se exclusivamente a consultas pontuais e esporádicas. Não deve ser utilizado para pesquisas contínuas, polling periódico ou como mecanismo de listagem de dados. Para mais informações, leia a documentação da página Propósito da API.
value mixed required

Valor a procurar

search_in string required

Determina em que campo deve ser procurado. Deve ser enviado um dos seguintes valores: ID, Document Number ou External Reference. No caso da procura ser efectuada no nº do documento, a seguinte nomenclatura exemplo deve ser enviada: FT A/4921.

URL
https://facturalusa.pt/api/v2/sales/find
Método
post
Resposta
200
Resposta exemplo
{
    "id": integer,
    "sale_reference_id": integer,
    "number": integer,
    "issue_date": string,
    "due_date": string,
    "serie_id": integer,
    "document_type_id": integer,
    "document_full_number": string,
    "gross_total": decimal,
    "total_discount": decimal,
    "net_total": decimal,
    "total_base_vat": decimal,
    "total_vat": decimal,
    "total_shipping": decimal,
    "grand_total": decimal,
    "grand_total_with_currency_exchange": decimal,
    "final_discount_financial": decimal,
    "final_discount_global": decimal,
    "final_discount_global_value": decimal,
    "customer_id": integer,
    "customer_code": string,
    "customer_name": string,
    "customer_vat_number": string,
    "customer_country": string,
    "customer_city": string,
    "customer_address": string,
    "customer_postal_code": string,
    "customer_delivery_address_country": string,
    "customer_delivery_address_address": string,
    "customer_delivery_address_city": string,
    "customer_delivery_address_postal_code": string,
    "company_name": string,
    "company_vat_number": string,
    "company_country": string,
    "company_address": string,
    "company_city": string,
    "company_postal_code": string,
    "payment_method_id": integer,
    "payment_condition_id": integer,
    "shipping_mode_id": integer,
    "shipping_value": decimal,
    "shipping_vat_id": integer,
    "price_id": integer,
    "currency_id": integer,
    "currency_exchange": decimal,
    "vat_type": string,
    "observations": string,
    "external_reference": string,
    "irs_retention_apply": boolean,
    "irs_retention_base": decimal,
    "irs_retention_total": decimal,
    "irs_retention_tax": decimal,
    "url_file": string,
    "file_previewed": boolean,
    "file_language": string,
    "file_format": string,
    "email_sent": boolean,
    "sms_sent": boolean,
    "status": string,
    "vehicle_id": integer,
    "employee_id": integer,
    "waybill_shipping_date": string,
    "waybill_global": boolean,
    "at_code": string,
    "at_message": string,
    "at_success": boolean,
    "mb_entity": string,
    "mb_sub_entity": string,
    "mb_reference": string,
    "cargo_location": string,
    "discharge_location": string,
    "cargo_date": string,
    "discharge_date": string,
    "signed": boolean,
    "signed_id": integer,
    "sign_attempt": integer,
    "sign_error": string,
    "created_by": integer,
    "finished_by": integer,
    "finished_at": string,
    "canceled_by": integer,
    "canceled_at": string,
    "canceled_reason": string,
    "updated_at": string,
    "created_at": string,
    "reference": {
        "id": integer,
        "number": integer,
        "issue_date": string,
        "due_date": string,
        "serie_id": integer,
        "document_type_id": integer,
        "document_full_number": string,
        "serie": {
            "id": integer,
            "description": string
        },
        "documenttype": {
            "id": integer,
            "description": string,
            "saft_initials": string,
            "type": string
        }
    },
    "origin": {
        "id": integer,
        "number": integer,
        "issue_date": string,
        "due_date": string,
        "serie_id": integer,
        "document_type_id": integer,
        "document_full_number": string,
        "serie": {
            "id": integer,
            "description": string
        },
        "documenttype": {
            "id": integer,
            "description": string,
            "saft_initials": string,
            "type": string
        }
    },
    "serie": {
        "id": integer,
        "description": string,
        "valid_until": string
    },
    "documenttype": {
        "id": integer,
        "description": string,
        "saft_initials": string,
        "type": string,
        "print_report": string,
        "print_report_width": integer,
        "print_pages_number": boolean,
        "print_automatic": boolean,
        "print_margin_top": integer,
        "print_margin_right": integer,
        "print_margin_left": integer,
        "print_margin_bottom": integer,
        "stock_check_negative": boolean,
        "stock_check_minimum": boolean,
        "send_email_automatic": boolean,
        "send_sms_automatic": boolean,
        "sign_document_automatic": boolean,
        "active": boolean,
        "updated_at": string,
        "created_at": string
    },
    "documenttypeserie": {
        "id": integer,
        "document_type_id": integer,
        "serie_id": integer,
        "document_number": integer,
        "atcud": string
    },
    "customer": {
        "id": integer,
        "code": string,
        "name": string,
        "vat_number": string,
        "country": string,
        "address": string,
        "city": string,
        "postal_code": string,
        "email": string,
        "telephone": string,
        "mobile": string,
        "currency_id": integer,
        "payment_method_id": integer,
        "payment_condition_id": integer,
        "shipping_mode_id": integer,
        "price_id": integer,
        "employee_id": integer,
        "type": string,
        "vat_exemption_id": integer,
        "vat_type": string,
        "irs_retention_tax": decimal,
        "observations": string,
        "other_contacts": string,
        "other_emails": string,
        "code_blocked": boolean,
        "vat_number_blocked": boolean,
        "name_blocked": boolean,
        "receive_sms": boolean,
        "receive_emails": boolean,
        "language": string,
        "active": boolean,
        "updated_at": string,
        "created_at": string
    },
    "customercountry": {
        "id": integer,
        "name": string,
        "code_iso_one": string
    },
    "paymentmethod": {
        "id": integer,
        "description": string,
        "description_english": string
    },
    "paymentcondition": {
        "id": integer,
        "description": string,
        "description_english": string,
        "days": integer
    },
    "shippingmode": {
        "id": integer,
        "description": string,
        "description_english": string
    },
    "shippingvat": {
        "id": integer,
        "description": string,
        "type": string,
        "tax": decimal
    },
    "price": {
        "id": integer,
        "description": string
    },
    "currency": {
        "id": integer,
        "description": string,
        "symbol": string,
        "code_iso": string
    },
    "vehicle": {
        "id": integer,
        "name": string,
        "license_plate": string
    },
    "employee": {
        "id": integer,
        "name": string,
        "email": string
    },
    "locationdestiny": {
        "id": integer,
        "name": string,
        "country": string,
        "address": string,
        "city": string,
        "postal_code": string
    },
    "warehouseorigin": {
        "id": integer,
        "description": string
    },
    "warehousedestiny": {
        "id": integer,
        "description": string
    },
    "items": [
        {
            "id": integer,
            "item_id": integer,
            "item_details": string,
            "unit_price": decimal,
            "quantity": decimal,
            "discount": decimal,
            "gross_total": decimal,
            "net_total": decimal,
            "total_base_vat": decimal,
            "total_vat": decimal,
            "total_discount": decimal,
            "grand_total": decimal,
            "vat_id": integer,
            "unit_id": integer,
            "vat_exemption_id": integer,
            "item": {
                "id": integer,
                "reference": string,
                "description": string,
                "details": string,
                "details_show_print": boolean,
                "type": string,
                "cost_price": decimal,
                "observations": string,
                "reference_blocked": boolean,
                "description_blocked": boolean,
                "active": boolean,
                "updated_at": string,
                "created_at": string,
                "stock": decimal
            },
            "unit": {
                "id": integer,
                "description": string,
                "symbol": string
            },
            "vat": {
                "id": integer,
                "description": string,
                "type": string,
                "tax": decimal,
                "saft_region": string
            },
            "vatexemption": {
                "id": integer,
                "code": string,
                "description": string
            }
        }
    ],
    "vats": [
        {
            "vat_id": integer,
            "total_base_vat": decimal,
            "total_vat": decimal,
            "vat": {
                "id": integer,
                "description": string,
                "type": string,
                "tax": decimal,
                "saft_region": string
            }
        }
    ],
    "createdby": {
        "id": integer,
        "name": string,
        "firstname": string,
        "lastname": string,
        "email": string
    },
    "finishedby": {
        "id": integer,
        "name": string,
        "firstname": string,
        "lastname": string,
        "email": string
    },
    "canceledby": {
        "id": integer,
        "name": string,
        "firstname": string,
        "lastname": string,
        "email": string
    },
    "accountopen": {
        "id": integer,
        "sale_id": integer,
        "debit": decimal,
        "credit": decimal,
        "balance": decimal
    }
}

Sugerimos que teste e valide a resposta completa numa plataforma de testes de API como por exemplo Postman ou Insomnia.

Sugerimos que teste e valide a resposta completa numa plataforma de testes de API como por exemplo Postman ou Insomnia.

🍪 Usamos cookies no nosso site para melhorar a sua experiência. Ao continuar, declara aceitar a nossa Política de Cookies.