Parameters: Regex Expression and validation for Arc XP Sales APIs
Error codes resulting from POST, PATCH, or PUT requests are often due to invalid information being sent to the Arc XP Sales system.
In the tables provided below, you could find some regex expression used to validate some of these values.
You can use a regex tester (for example, https://regex101.com/) to know if the value you are trying to send is valid.
Parameter | Regex exp | Format | Size |
---|---|---|
Address (line1) | [a-zA-Z-_0-9]+ | min: 1 max: 256 |
Address (line2) | [a-zA-Z-_0-9]+ | min: 1 max: 256 |
Address (locality) | [a-zA-Z-_0-9]+ | min: 1 max: 100 |
Address (region) | [a-zA-Z-_0-9]+ | min: 1 max: 100 |
Address (postal) | [\p{L}0-9_-]+ | min: 1 max: 100 |
Address (country) | ^[A-Z]{2} | min:2 max:2 |
Reason (Cancel Subscription) | ^[\p{L}'/ 0-9:\\,"`\n\r?.!@#$%^*()\-_=+~;]{0,2048}$ | |
browserInfo (Finalize Payment Request) | ([0-9a-zA-Z+/=:"_{}]+) | max:1024 max:2 |
Phone (Finalize Payment Update) | (^[0-9-]*$|^NA$) | min:0 max:12 |
Token (Linked subscription) | [\w\-&.]+ | min: 1 max:2048 |
name (Gift Subscription) | ^[\p{L}'/ 0-9:\\,"`\n\r?.!@#$%^*()\-_=+~;]{1,100}$ | min: 1 max:100 |
note (Gift Subscription) | ^[\p{L}'/ 0-9:\\,"`\n\r?.!@#$%^*()_=+~;-]{1,500}$ | min: 1 max:500 |
ampReaderId | ^[a-zA-Z0-9_-]{1,128}$ | |
name (Enterprise Subscription) | ^[a-zA-Z0-9_-]{1,100}$ |