action envoice_invoice_api_new { label: "Create an invoice" provider: envoice method: POST path: "/api/invoice/new" encoding: form input: { type: "object" properties: { Attachments: { type: "array" description: "List of invoice attachments" items: { type: "object" properties: { Link: { type: "string" description: "Link to the file" } ObfuscatedFileName: { type: "string" description: "Hashed file name to avoid url wildguessing" } OriginalFileName: { type: "string" description: "Name of the file" } Size: { type: "integer" format: "int64" description: "File size number in bytes" } Type: { type: "string" description: "Type of the link (Attached or external)" enum: ["External", "Uploaded"] } } } } ClientId: { type: "integer" format: "int32" description: "The client to whom this invoice is assigned" } ClonedFromId: { type: "integer" format: "int32" description: "Indicate from which invoice this invoice has been cloned from" } CurrencyId: { type: "integer" format: "int32" description: "Id of the currency for the invoice amounts" } Duedate: { type: "string" format: "date-time" description: "Indicates when the invoice will be proclamed as due" } InvoiceCategoryId: { type: "integer" format: "int32" description: "Hold the id of the invoice category" } IssuedOn: { type: "string" format: "date-time" description: "Indicates when the invoice was issued" } Items: { type: "array" description: "List of invoice items" items: { type: "object" properties: { Cost: { type: "number" format: "double" description: "Amount per unit" } Description: { type: "string" description: "Additional description attached to the invoice item" } DiscountPercentage: { type: "number" format: "double" description: "Discount percentage for the overall amount" } Quantity: { type: "number" format: "double" description: "Quantity in total used for the work type" } TaxId: { type: "integer" format: "int32" description: "Tax applied on the item" } TaxPercentage: { type: "number" format: "double" description: "Task percentage. Ex: 18%" } WorkTypeId: { type: "integer" format: "int32" description: "Work type (Name of the service)" } } } } Notes: { type: "string" description: "Internal note regarding the invoice" } Number: { type: "string" description: "Unique invoice number" } PaymentGateways: { type: "array" description: "List of enabled payment gateways for this invoice" items: { type: "object" properties: { Name: { type: "string" description: "Name of the payment gateway" } } } } PoNumber: { type: "string" description: "Unique number generated by the buyer" } RecurringProfile: { type: "object" description: "Definition of invoice recurring profile" properties: { DayOfMonth: { type: "integer" format: "int32" description: "Day of month when the recurrance should happen" } DayOfWeek: { type: "string" description: "Day when the recurrance should happen" enum: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] } DueDateInDays: { type: "integer" format: "int32" description: "Total number of days for the client to pay the invoice after issuing it" } EndOfRecurrance: { type: "string" format: "date-time" description: "Indcate the date when the recurrance should stop" } Month: { type: "integer" format: "int32" description: "Month when the recurrance should happen" } RecurrancePattern: { type: "string" description: "How often the recurrance occurs" enum: ["Daily", "Weekly", "Monthly", "Yearly"] } RecurranceValue: { type: "integer" format: "int32" description: "Recurring every [value] RecurrancePattern \nEx: Recur every 1 week" } StartOfRecurrance: { type: "string" format: "date-time" description: "Indcate the date when the recurrance has started" } Status: { type: "string" description: "The status of the recurrance" enum: ["Pending", "Active", "Cancelled", "Finished"] } Title: { type: "string" description: "Title of the recurring profile. \nEx: BRAND PACKAGE - 2017-08-16 - 2018-08-16" } } } RecurringProfileId: { type: "integer" format: "int32" description: "Hold the id of the recurring profile" } ShouldSendReminders: { type: "boolean" description: "Should send email reminders to client?" } Status: { type: "string" description: "Indicate the status of the invoice (paid/unpaid/overdue)" enum: ["Draft", "Paid", "Unpaid", "Overdue", "Void"] } Terms: { type: "string" description: "Terms of agreement" } "x-auth-key": { type: "string" } "x-auth-secret": { type: "string" } } required: ["x-auth-key", "x-auth-secret"] additionalProperties: false } output: { type: "object" properties: { AccessToken: { type: "string" description: "Security access token used for accessing the invoice anonymously" } Activities: { type: "array" description: "List of invoice activities. Invoice audit log" items: { type: "object" properties: { Id: { type: "integer" format: "int32" description: "Id of invoice activity" } InvoiceNumber: { type: "string" description: "Indicates to which invoice this activity refers to" } Link: { type: "string" description: "Url which point out to a certain activity action. Ex: Click to view the payment" } Message: { type: "string" description: "Message associated with the activity" } Type: { type: "string" description: "Type of the activity" enum: ["Created", "Draft", "Cloned", "SentViaEmail", "SentViaSms", "SentReminderViaEmail", "SentReminderViaSms", "Opened", "Viewed", "Rejected", "Updated", "Paid", "Unpaid", "Overdue", "NewManualPayment", "NewPaymentWithPaypal", "NewPaymentWithStripe", "NewPaymentWithPayoneer", "SentToAccountant", "DownloadedAsPdf", "MarkAsPaidByTheClient", "OpenedAttachment", "NewPaymentWithSquare", "NewPaymentWithKlikAndPay", "NewPaymentWithRazorpay", "NewPaymentWithWepay", "NewPaymentWithHalkbank", "ChangeStatus", "OrderUpdated", "OrderCreated", "NewPaymentWithTwoCheckout", "NewPaymentWithPaymentWall", "NewPaymentWithBamboraEU", "NewPaymentWithBamboraNA", "Void", "NewPaymentWithNlb", "NewPaymentWithAuthorizeNet", "NewPaymentWithBraintree", "EstimationCreated", "EstimationDraft", "EstimationCloned", "EstimationSentViaEmail", "EstimationOpened", "EstimationViewed", "EstimationAccepted", "EstimationRejected", "EstimationUpdated", "EstimationDownloadedAsPdf", "InvoiceDigitallySigned"] } } } } Attachments: { type: "array" description: "List of invoice attachments" items: { type: "object" properties: { Id: { type: "integer" format: "int32" description: "Id of invoice attachment" } Link: { type: "string" description: "Link to the file" } ObfuscatedFileName: { type: "string" description: "Hashed file name to avoid url wildguessing" } OriginalFileName: { type: "string" description: "Name of the file" } Size: { type: "integer" format: "int64" description: "File size number in bytes" } Type: { type: "string" description: "Type of the link (Attached or external)" enum: ["External", "Uploaded"] } } } } Client: { type: "object" properties: { AdditionalEmails: { type: "array" description: "Client additional emails contact for CC" items: { type: "object" properties: { Email: { type: "string" description: "CC" } } } } Address: { type: "string" description: "Client business address" } ClientCountryId: { type: "integer" format: "int32" description: "Indicates the country where the clients is from" } ClientCurrencyId: { type: "integer" format: "int32" description: "Indicates the default system currency used by the user for the client" } CompanyRegistrationNumber: { type: "string" description: "Client's Company Registration Number" } CreatedOn: { type: "string" format: "date-time" description: "Date of creation" } DefaultDueDateInDays: { type: "integer" format: "int32" description: "Client custom payment terms" } Email: { type: "string" description: "Client email" } Id: { type: "integer" format: "int32" description: "Entity id" } Name: { type: "string" description: "Name of the client" } PhoneNumber: { type: "string" description: "Client phone numer" } UiLanguageId: { type: "integer" format: "int32" description: "Hold a value of the language in which the invoice will be sent" } Vat: { type: "string" description: "Client's VAT number" } } } ClonedFromId: { type: "integer" format: "int32" description: "Indicate from which invoice this invoice has been cloned from" } Currency: { type: "object" properties: { Code: { type: "string" description: "Currency short numeric code" } Id: { type: "integer" format: "int32" description: "Entity id" } Name: { type: "string" description: "Name of the country" } Symbol: { type: "string" description: "Currency symbol" } Value: { type: "string" description: "Currency short alpha code" } } } DiscountAmount: { type: "number" format: "double" description: "Amount that goes as a discount" } Duedate: { type: "string" format: "date-time" description: "Indicates when the invoice will be proclamed as due" } EnablePartialPayments: { type: "boolean" description: "Indicate that the invoice allows the user to pay the invoice partially" } Id: { type: "integer" format: "int32" description: "Invoice id" } InvoiceCategoryId: { type: "integer" format: "int32" description: "Hold the id of the invoice category" } IssuedOn: { type: "string" format: "date-time" description: "Indicates when the invoice was issued" } Items: { type: "array" description: "List of invoice items" items: { type: "object" properties: { Cost: { type: "number" format: "double" description: "Amount per unit" } Description: { type: "string" description: "Additional description attached to the invoice item" } DiscountAmount: { type: "number" format: "double" description: "Amount that goes as a discount" } DiscountPercentage: { type: "number" format: "double" description: "Discount percentage for the overall amount" } Id: { type: "integer" format: "int32" description: "Id of invoice item" } Quantity: { type: "number" format: "double" description: "Quantity in total used for the work type" } SubTotalAmount: { type: "number" format: "double" description: "Sub-Total amount of the invoice item (Amount without tax)" } TaxAmount: { type: "number" format: "double" description: "Amount that goes to the tax" } TaxId: { type: "integer" format: "int32" description: "Tax applied on the item" } TaxPercentage: { type: "number" format: "double" description: "Task percentage. Ex: 18%" } TotalAmount: { type: "number" format: "double" description: "Total amount of the invoice item" } WorkTypeId: { type: "integer" format: "int32" description: "Work type (Name of the service)" } } } } Notes: { type: "string" description: "Internal note regarding the invoice" } Number: { type: "string" description: "Unique invoice number" } PaymentGateways: { type: "array" description: "List of enabled payment gateways for this invoice" items: { type: "object" properties: { Name: { type: "string" description: "Name of the payment gateway" } } } } Payments: { type: "array" description: "List of invoice payments" items: { type: "object" properties: { Amount: { type: "number" format: "double" description: "Total amount of the payment" } Id: { type: "integer" format: "int32" description: "Id of invoice payment" } IsAutomatic: { type: "boolean" description: "Indicate if the payment is automatic or manual" } Note: { type: "string" description: "Internal payment note" } PaidOn: { type: "string" format: "date-time" description: "When the payment was done by the client" } ReferenceId: { type: "string" description: "Id of the payment" } Type: { type: "string" description: "Type of payment" enum: ["Other", "Paypal", "Stripe", "Payoneer", "Bank", "Cash", "Cheque", "Ach", "Sepa", "Square", "KlikAndPay", "Razorpay", "Wepay", "Halkbank", "TwoCheckout", "PaymentWall", "BamboraEU", "BamboraNA", "Nlb", "AuthorizeNet", "Braintree"] } } } } PoNumber: { type: "string" description: "Unique number generated by the buyer" } RecurringProfile: { type: "object" description: "Definition of invoice recurring profile" properties: { DayOfMonth: { type: "integer" format: "int32" description: "Day of month when the recurrance should happen" } DayOfWeek: { type: "string" description: "Day when the recurrance should happen" enum: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] } DueDateInDays: { type: "integer" format: "int32" description: "Total number of days for the client to pay the invoice after issuing it" } EndOfRecurrance: { type: "string" format: "date-time" description: "Indcate the date when the recurrance should stop" } Month: { type: "integer" format: "int32" description: "Month when the recurrance should happen" } RecurrancePattern: { type: "string" description: "How often the recurrance occurs" enum: ["Daily", "Weekly", "Monthly", "Yearly"] } RecurranceValue: { type: "integer" format: "int32" description: "Recurring every [value] RecurrancePattern \nEx: Recur every 1 week" } StartOfRecurrance: { type: "string" format: "date-time" description: "Indcate the date when the recurrance has started" } Status: { type: "string" description: "The status of the recurrance" enum: ["Pending", "Active", "Cancelled", "Finished"] } Title: { type: "string" description: "Title of the recurring profile. \nEx: BRAND PACKAGE - 2017-08-16 - 2018-08-16" } } } RecurringProfileId: { type: "integer" format: "int32" description: "Hold the id of the recurring profile" } ShouldSendReminders: { type: "boolean" description: "Should send email reminders to client?" } Status: { type: "string" description: "Indicate the status of the invoice (paid/unpaid/overdue)" enum: ["Draft", "Paid", "Unpaid", "Overdue", "Void"] } SubTotalAmount: { type: "number" format: "double" description: "Total amount of the invoice without tax" } TaxAmount: { type: "number" format: "double" description: "Amount that goes to the tax" } Terms: { type: "string" description: "Terms of agreement" } TotalAmount: { type: "number" format: "double" description: "Total amount of the invoice with tax" } } } }