Unable to create an Invoice with Tax Code

We have been using NetSuite REST API successfully for a while to create Invoices.

Now we added Tax Code requirement and I’m unable to create an Invoice with it.

 

The following works when used in USA, where we don’t enforce Tax Code.

{
    “memo”: “magical land in USA : closing date 5/7/2021 : {{REOS_TX_NUMBER}}”,
    “entity”: {
        “id”: {{NETSUITE_USA_CUSTOMER}}
    },
    “department”: {{NETSUITE_DEPARTMENT_ID}},
    “location”: {{NETSUITE_TEXAS_LOCATION}},
    “externalId”: “{{REOS_TX_NUMBER}}-{{$timestamp}}”,
    “ADMIN_TRANSACTION_ID”: “{{REOS_TX_NUMBER}}”,
    “ADMIN_TRANSACTION_LINK”: “https://adminlink.com”,
    “ADMIN_PROPERTY_ADDRESS”: “magical land in USA”,
    “ADMIN_JSON_DATA”: “{ \”sample\”: \”test\” }”,
    “item”: {
        “items”: [
            {
                “department”: {{NETSUITE_DEPARTMENT_ID}},
                “item”: {
                    “id”: {{NETSUITE_INVOICE_ITEM_TYPE}}
                },
                “amount”: {{REOS_TITLE_AMOUNT}}
            }
        ]
    }
}

 

In Canada I tried various permutations trying to follow the REST API documentations and questions by people here, but none seem to work.

{
    “memo”: “magical land in USA : closing date 5/7/2021 : {{REOS_TX_NUMBER}}”,
    “entity”: {
        “id”: {{NETSUITE_CANADIAN_CUSTOMER}}
    },
    “department”: {{NETSUITE_DEPARTMENT_ID}},
    “location”: {{NETSUITE_ALBERTA_LOCATION}},
    “externalId”: “{{REOS_TX_NUMBER}}-{{$timestamp}}”,
    “ADMIN_TRANSACTION_ID”: “{{REOS_TX_NUMBER}}”,
    “ADMIN_TRANSACTION_LINK”: “https://adminlink.com”,
    “ADMIN_PROPERTY_ADDRESS”: “magical land in USA”,
    “ADMIN_JSON_DATA”: “{ \”sample\”: \”test\” }”,
    “item”: {
        “items”: [
            {
                “department”: {{NETSUITE_DEPARTMENT_ID}},
                “item”: {
                    “id”: {{NETSUITE_INVOICE_ITEM_TYPE}},
                    “taxCode”: {
                        “id”: {{NETSUITE_ALBERTA_TAX_CODE}}
                    }
                },
                “amount”: {{REOS_TITLE_AMOUNT}}
            }
        ]
    }
}
I receive the following error:

{
    “type”: “https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1”,
    “title”: “Bad Request”,
    “status”: 400,
    “o:errorDetails”: [
        {
            “detail”: “Error while accessing a resource. Please enter value(s) for: Tax Code.”,
            “o:errorPath”: “item.items[0]”,
            “o:errorCode”: “USER_ERROR”
        }
    ]
}
I double checked and the internal-id provided is correct.
I also tried creating an Invoice with Tax-Code via the UI, and fetch it from the API to see the settings used on it, but it doesn’t seem to show them.
Rookie Asked on August 21, 2021 in Other.
Add Comment
3 Answer(s)

I’m having the same issue. Did you ever find a solution? Thanks!!

Rookie Answered on December 30, 2021.
Add Comment

I have same issue, but with vendorbill.  Has this issue been resolved?  If yes, what was the solution?

Rookie Answered on June 22, 2022.
Add Comment

After some googling, I came across this post https://community.oracle.com/netsuite/discussion/4473977/setting-tax-code-for-sales-order-item-through-rest-api, which suggests that assigning line-level taxes don’t work with REST API unless you have the SuiteTax feature enabled.  Can you confirm you have this enabled for your NS account?

Rookie Answered on June 22, 2022.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor