CreateInvoice
Applies for an invoice.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bss:ApplyInvoice |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Amount |
string |
No |
Specifies the invoice amount. Two decimal places are supported.
|
0.01 |
| InvoiceTitleId |
string |
Yes |
The invoice title ID.
|
12345 |
| RecipientEmails |
array |
Yes |
The list of email addresses that receive the invoice. You can specify up to three email addresses. |
|
|
string |
Yes |
The email address that receives the invoice. |
1@1.com |
|
| InvoiceRemark |
string |
No |
The invoice remark. |
Remark information |
| InvoiceCandidateIds |
array |
Yes |
The list of invoice candidate IDs. |
|
|
string |
Yes |
The invoice candidate ID. |
12345 |
|
| InvoiceType |
integer |
Yes |
The invoice type. Valid values:
|
0 |
| InvoiceMode |
integer |
Yes |
The invoicing mode. Valid values:
Valid values:
|
0 |
| EcIdAccountIds |
array<object> |
No |
The list of enterprises and accounts. If this parameter is left empty, the current account is queried. |
|
|
object |
No |
|||
| AccountIds |
array |
No |
The list of accounts to access. If this parameter is left empty, all accounts under the current entity ID are selected. |
|
|
integer |
No |
The member accounts ID. |
1990699401005016 |
|
| EcId |
string |
No |
The enterprise entity ID. |
12345 |
| Nbid |
string |
No |
The level-1 marketplace ID. If this parameter is left empty, the marketplace ID of the current user is used by default. |
2684201000001 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
BssApiListResult |
||
| Data |
array<object> |
The data list. |
|
|
object |
|||
| AccountId |
integer |
The account ID. |
1990699401005016 |
| Amount |
string |
The invoice amount. |
0.01 |
| ErrorCode |
string |
The error code. |
1001 |
| InvoiceIssuer |
string |
The invoicing entity. |
ALIYUN_SERVICE |
| Message |
string |
The error message. |
Not invoiceable |
| Metadata |
any |
The metadata of the response structure. |
{} |
| RequestId |
string |
The request ID. |
79EE7556-0CFD-44EB-9CD6-B3B526E3A85F |
Examples
Success response
JSON format
{
"Data": [
{
"AccountId": 1990699401005016,
"Amount": "0.01",
"ErrorCode": "1001",
"InvoiceIssuer": "ALIYUN_SERVICE",
"Message": "不可开票"
}
],
"Metadata": "{}",
"RequestId": "79EE7556-0CFD-44EB-9CD6-B3B526E3A85F"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InnerAccountNoQueryPricePermission | In view of data security and compliance requirements, please understand the inconvenience caused to you by controlling the amount-related information and permissions of the group's cloud account. More questions please refer to the document. | Due to data security and compliance requirements, the Group's cloud account amount information permissions are controlled. Please understand the inconvenience caused. You can view it through HCRM/cloud platform. For details, please refer to: https://aliyuque.antfin.com/yunfei.xyf/kr0b8h/yvdm6izaeulmq8g2 。 |
| 400 | InnerSubAccountNoQueryPricePermission | In view of data security and compliance requirements, please understand the inconvenience caused to you by controlling the amount-related information and permissions of the group's cloud account. | Due to data security and compliance requirements, the Group's cloud account amount information permissions are controlled. Please understand the inconvenience caused. You can view it through HCRM/cloud platform. For details, please refer to: https://aliyuque.antfin.com/yunfei.xyf/kr0b8h/yvdm6izaeulmq8g2 。 |
| 400 | InvalidParameter | The specified request contains invalid parameters. | |
| 400 | NoPermission | You are not authorized to perform this action. | You do not have permissions to perform the operation. |
| 400 | AccountNoQueryPricePermission | This page cannot be accessed because you do not have discount rights query permissions. Please contact the main account to go to the cost center for authorization. The permission point that needs authorization is queryprice. | This page cannot be accessed because you do not have discount rights query permissions. Please contact the main account to go to the cost center for authorization. The permission point that needs authorization is queryprice. |
| 400 | SubAccountNoQueryPricePermission | This page cannot be accessed because you do not have discount rights query permissions. Contact the main account to go to the RAM console for authorization. The Action to be authorized is bss:QueryPrice. | This page cannot be accessed because you do not have discount rights query permissions. Contact the main account to go to the RAM console for authorization. The Action to be authorized is bss:QueryPrice. |
| 400 | InvoiceManualAmountNotAllowed | Cross-account independent invoicing, amount cannot be specified. | Cross-account independent invoicing, amount cannot be specified |
| 400 | InvoiceRecipientEmailsMoreThanThree | Maximum 3 email addresses allowed for invoice application. | You can specify up to three email addresses when applying for an invoice. |
| 400 | InvoiceCandidateNotFound | No valid data to be invoiced can be found based on the invoicing object list and account list passed in. | No valid data to be invoiced can be found based on the invoicing object list and account list passed in. |
| 400 | InvoiceTitleNotExist | Invoice title does not exist. | Invoice header does not exist |
| 400 | InvoiceRemarkTooLong | Invoice remarks must not exceed 200 characters. Please abbreviate and resubmit. | The length of the invoice note is too long, please abbreviate it properly and resubmit it! |
| 400 | InvoiceAmountInValid | Illegal amount requested for invoicing. | Illegal amount requested for invoicing |
| 400 | InvoiceAmountFormatInvalid | Illegal format of invoiced amount. | Illegal format of invoiced amount |
| 400 | InvoiceModeInvalid | InvoiceMode field is illegal. | InvoiceMode field is illegal |
| 400 | InvoiceTypeInvalid | InvoiceType field is illegal. | InvoiceType field is illegal |
| 400 | InvoiceSpecialOnlyForEnterprises | Special invoices can only be issued by enterprise accounts. | Special invoices can only be issued by enterprise accounts. |
| 400 | InvoiceAmountNegativeInvalid | The sum of the selected amounts is negative and cannot be invoiced. | The sum of the selected amounts is negative and cannot be invoiced. |
| 500 | InternalError | The request processing has failed due to some unknown error. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.