# Generate Invoice **POST /api/billing/invoice/yard/{yardId}/carrier/{carrierId}/periodCode/{periodCode}** Generates the invoice for the provided yard, carrier and period. This can take long if the number of movements is high. If an invoice already exists for the given parameters, an error will be returned ## Servers - GCP Development: https://api-dev.gatego.io (GCP Development) - Production: https://api.gatego.io (Production) ## Parameters ### Path parameters - **carrierId** (integer(int64)) - **periodCode** (string) - **yardId** (integer(int64)) ## Responses ### 200 OK #### Body: application/json (object) - **id** (integer(int64)) Invoice ID - **yard_id** (integer(int64)) Yard ID - **carrier_id** (integer(int64)) Carrier ID - **invoice_number** (string) Invoice number - **invoice_date** () - **period_code** (string) Code representing the billing period - **period_start** () - **period_end** () - **truck_config** (object) - **trucks_section** (object) - **trucks_missing_checkin_section** (object) - **trailer_config** (object) - **trailers_section** (object) - **trailers_missing_checkin_section** (object) - **adjustments_section** (object) - **total_amount** (number) The total amount billed in this invoice - **currency** (string) The currency used in this invoice ### 400 Bad Request already exists, eg. tried to generate an invoice for a yard, carrier and period when it already exists (Use PUT method if you want to automatically replace it) ### 412 Bad Request Conflict, eg. tried to generate an invoice for a yard when is disabled by config ### 409 Bad Request Precondition Failed, eg. tried to generate an invoice for a yard/carrier when config is missing ### 401 Not Authorized ### 403 Not Allowed [Powered by Bump.sh](https://bump.sh)