Valuekeep Developers - Web API Reference

Framework | Postal Code

Service to manage entities of type 'PostalZone'.

Overview


URL api/{tenantKey}/{orgKey}/corePatterns/postalZones
Methods Supported GET, POST, PUT, DELETE

All Operations

This service includes the following operations:

All Resources

This service uses the following resources:

GET Operations

GET PostalZones (odata)

Returns a page of the list of all the entity records available.

The following elements are optional:

opts (ODataQueryOptions) OData query option.

Response:

When successful, the response body contains the list of records available. See PostalZoneResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

GET /corePatterns/postalZones/odata

GET PostalZone by identifier

Returns the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body contains the entity record. See PostalZoneResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /corePatterns/postalZones/{id}

GET PostalZone by key

Returns the entity record that matches the specified key.

The following elements are required:

code (string) The postal zone’s code.

Response:

When successful, the response body contains the entity record. See PostalZoneResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /corePatterns/postalZones/{code}

POST Operations

POST PostalZones

Creates a new entity record.

The following elements are required:

postalZoneResource (ApiPostalZoneResource) The request body should contain the entity record that should be created.
See ApiPostalZoneResource.

Response:

When successful, the response body contains the new entity record identifier. The resource header location property contains the URL for the new entity record. See ApiPostalZoneResource.

Response status codes:

201 Created. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /corePatterns/postalZones

PUT Operations

PUT Set Code PostalZone

Updates the value of attribute 'Code' in the specified entity record.

The following elements are required:

code (string) The postal zone’s code.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /corePatterns/postalZones/{code}/code

PUT Set Country PostalZone

Updates the value of attribute 'Country' in the specified entity record.

The following elements are required:

code (string) The postal zone’s code.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /corePatterns/postalZones/{code}/country

PUT Set Description PostalZone

Updates the value of attribute 'Description' in the specified entity record.

The following elements are required:

code (string) The postal zone’s code.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /corePatterns/postalZones/{code}/description

PUT Set IsActive PostalZone

Updates the value of attribute 'IsActive' in the specified entity record.

The following elements are required:

code (string) The postal zone’s code.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /corePatterns/postalZones/{code}/isActive

PUT Set Region PostalZone

Updates the value of attribute 'Region' in the specified entity record.

The following elements are required:

code (string) The postal zone’s code.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /corePatterns/postalZones/{code}/region

DELETE Operations

DELETE PostalZone by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /corePatterns/postalZones/{id}

DELETE PostalZone by key

Deletes the entity record that matches the specified key.

The following elements are required:

code (string) The postal zone’s code.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /corePatterns/postalZones/{code}

Resources


ApiPostalZoneResource

The following elements are required:

code (string) The postal zone’s code.
country (string) The postal zone’s country.

The following elements are optional:

description (string) The postal zone’s description.
region (string) The postal zone’s region.


PostalZoneResource

The following elements are required:

code (string) The postal zone’s code.
country (string) The postal zone’s country.
(fk) Allowed value: the natural key of a record of type Country. These records are accessibly through the Countries service.

The following elements are optional:

description (string) The postal zone’s description.
region (string) The postal zone’s region.
(fk) Allowed value: the natural key of a record of type Region. These records are accessibly through the Regions service.