Jump to content

Error in GET Error in GET 422 - [{"$severity":"error","$dataCode":"RecordInvalid","$message":"is not included in the list","$source":"line_items.tax_rate"},{"$severity":"error","$dataCode":"RecordInvalid","$message":"must be 'Zero Rated' for Customers ou


 Share

Recommended Posts

Error message that does not correctly identify the problem:

Error in GET Error in GET 422 - [{"$severity":"error","$dataCode":"RecordInvalid","$message":"is not included in the list","$source":"line_items.tax_rate"},{"$severity":"error","$dataCode":"RecordInvalid","$message":"must be 'Zero Rated' for Customers outside the EU.","$source":"line_items.tax_rate"}]


- line_items is invoice_lines?
- tax_rate not exists in doc or demo postman. Exists tax_rate_id 

Params send into payload are below. User contact is outside Europa (China) 

[
    'sales_invoice' => [    
        'contact_id' => '7a37e41cd14f45e9b19269e38f2ff985',
        'date' => '2023-10-15 07:00:29',
        'reference' => 'MAMS-7266',
        'invoice_lines' => [        
            0 => [            
                'description' => 'Wordpress Manejado China - sxxxxxxxx.com (22/10/2023 - 21/11/2023)',
                'ledger_account_id' => '1ea6606e04c1489c802f733ea65035a1',
                'quantity' => 1,
                'unit_price' => '19.99',
                'tax_rate_id' => 'ES_ZERO',
            ],
            1 => [            
                'description' => 'Costo administrativo',
                'ledger_account_id' => 'e28101ad59ad4b8f9798b59be32e9cf6',
                'quantity' => 1,
                'unit_price' => '0.88',
                'tax_rate_id' => 'ES_ZERO',
            ],
        ],
    ],
]

Any ideas ?

Link to comment
Share on other sites

Solution for developer: is tax_rate_id must be ES_EXEMPT

Solution for good UX: Message error on API must be more descriptive.

Error in GET Error in GET 422 - [{"$severity":"error","$dataCode":"RecordInvalid","$message":"is not included in the list","$source":"invoice_lines.tax_rate_id"},{"$severity":"error","$dataCode":"RecordInvalid","$message":"must be 'ES_EXEMPT' for Customers outside the EU.","$source":"invoice_lines.tax_rate_id"}]
Link to comment
Share on other sites

Hi,

Thanks for your question.

Can you confirm that the business you are posting this for is registered in Spain and provide the address of the contact. Feel free to DM me if you don't wish to make the details of the customer public.

 

Thanks

Mark

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...