Create vendorAsk AIpost https://www.pelcro.com/api/v1/core/vendorsUse this endpoint to create an invoiceQuery Paramssite_idint32requiredThe unique identifier of the site associated with your account.Body ParamscurrencystringrequiredThe currency code. Must be valid for the account and customer and is.line_itemsarray of objectsrequiredEncapsulates details about a good or service being invoiced, including its description, price, quantity, and optional tax information.Required if total is not provided.line_items*ADD objecttotalint32The total amount of the invoice in minor units e.g. cents.Required if line_items are not provided.customer_idint32The unique identifier of the customer.Required if customer_old_provider_id is not provided.customer_old_provider_idstringThe unique identifier which was add to the customer who owns this invoice.If provided, customer_id can be omitted.period_startdate-timeRepresents the start of the line item's billing period. Measured in seconds since the Unix epoch.If provided, must be a timestamp before or equal to period_end.period_enddate-timeRepresents the end of the line item's billing period. Measured in seconds since the Unix epoch. Represents the start of the line item's billing period. Measured in seconds since the Unix epoch.If provided, must be a timestamp after or equal to period_start.due_datedate-timeRepresents the date at which the invoice will be due.If provided, must be a timestamp after or equal to period_start.statusstringenumThe status of the invoice, one of: draft, open, paid, uncollectible, or voiddraftopenpaiduncollectiblevoidAllowed:draftopenpaiduncollectiblevoidbilling_reasonstringenumIndicates the reason why the invoice was created.manual: For an invoice unrelated to a subscription or e-commerce order.subscription_create: For a newly created subscription.subscription_cycle: For a subscription which advanced into a new period.subscription_update: For a subscription which was updated.order_create: For an e-commerce order.subscription_createsubscription_cyclesubscription_updateorder_createmanualAllowed:subscription_createsubscription_cyclesubscription_updateorder_createmanualsubscription_idint32The unique identifier of the subscription to assign to this invoice.Can be omitted if subscription_old_provider_id is provided.subscription_old_provider_idstringThe unique identifier of a previously created subscription for which old_provider_id was specified.Can be omitted if subscription_id is provided.customer_addressobjectAn address object representing the customer's billing address, which will be saved under this invoice. If omitted, the default behavior will be to use the customer's current default billing address.Can be omitted if billing_address_id is provided.customer_address objectbilling_address_idint32Specifies the associated billing address for a customer or invoice.Can be omitted if customer_addressis provided.customer_shippingobjectAn address object representing the customer's shipping address, which will be saved under this invoice.Can be omitted if shipping_address_id is provided.customer_shipping objectshipping_address_idint32Specifies the associated shipping address for a customer or invoice.Can be omitted if customer_shipping is provided.is_importedbooleanDefaults to falseA flag determining whether this invoice was imported.truefalsemetadataobjectmetadata objectfooterstringAn attribute that allows for adding custom text at the bottom of invoicestotal_imported_shipmentsint32If this field is populated, the revenue recognition calculation will use its value instead of the plan_shipments_per_interval value from the plan. This allows for custom shipment-based recognition logic on a per-subscription basispurchase_orderstringSpecifies the purchase order value of the invoiceHeadersAuthorizationstringrequiredDefaults to Bearer eyJ***Responses 200Success. 400Invalid request. 401Unauthenticated. 500Server error.Updated about 2 hours ago