Question & Answer
Question
Why changeRegion API not throwing an exception when county value is passed as blank ?
Cause
When one try to invoke a changeRegion API to update zipcodes, if the Country is passed as blank in API input, as per the Java XAPI documentation, product should throw exception; but instead product is considering country as US and updating the changes accordingly.
Sample XML:
<Region Action="MODIFY" RegionLevelName="REGION" RegionName="Region">
<RegionSchema OrganizationCode="DEFAULT" RegionSchemaName="Region_SCHEMA"/>
<ZipCodeRanges ResetAll="Y">
<ZipCodeRange Country="" FromZip="99501" ToZip="99950" />
</ZipCodeRanges>
</Region>
<Region Action="MODIFY" RegionLevelName="REGION" RegionName="Region">
<RegionSchema OrganizationCode="DEFAULT" RegionSchemaName="Region_SCHEMA"/>
<ZipCodeRanges ResetAll="Y">
<ZipCodeRange Country="" FromZip="99501" ToZip="99950" />
</ZipCodeRanges>
</Region>
Answer
If region schema is created with country as US then product will consider the default country as US if not passed in changeRegion API input.
If this is not the case then product does throw the below mentioned exception -
ErrorCode="YCP0129" ErrorDescription="Invalid Country passed"
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS6PEW","label":"Sterling Order Management"},"Component":"","Platform":[{"code":"PF016","label":"Linux"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
Product Synonym
IBM Order Management System
Was this topic helpful?
Document Information
Modified date:
01 November 2021
UID
ibm10881904