GoSweetSpot: Address Validation

GoSweetSpot: Address Validation

Description

Query to validate customer address details. For New Zealand addresses, the addresses are also assessed for rural delivery, saturday delivery and residential delivery.


Requests

Method: POST
Content Type: application/json
URL: https://api-docs.gosweetspot.com/docs/address-validation/v2-addressvalidation.html


Headers

access_key : your unqiue api key provided by GSS.
site_id : which site you are requesting action for.


Request

The body of the message should be sent as a Json object.

AttributeTypeDescription
consigneestringCompany name or person name, max length is 50.
contactpersonstringContact person at address, optional; max length is 50.
phonenumberstringPhone number is optional, max length is 50.
deliveryinstructionsstringSpecial instructions to print on the label. For origin, this field is ignored, the max length is 120.
emailstringEmail address: max length is 200.
addressobjectV2 validation address model.

Return format

A JSON object with validation response.


Response

AttributeTypeDescription
validatedbooleanResult of state/suburb/postcode/country validation.
addressobjectAddress, with additional property AvailableServices.
errorsstring listList of validation messages.

Request example


curl --location 'https://api.gosweetspot.com/v2/addressvalidation' \
--header 'access_key;' \
--header 'site_id;' \
--header 'Content-Type: application/json' \
--data '{
	"Consignee": "0123456789 0123456789 0123456789 0123456789",
	"Address": {
		"BuildingName": "",
		"StreetAddress": "1 Some Street",
		"Suburb": "MascotX",
		"City": "NSW",
		"PostCode": "2020",
		"CountryCode": "AU",
		"IsRural": false
	},
	"Email": "",
	"ContactPerson": "",
	"PhoneNumber": "",
	"DeliveryInstructions": "",
}'


Response example

{
  "Address": {
    "Consignee": "0123456789 0123456789 0123456789 0123456789",
    "Address": {
      "BuildingName": "",
      "StreetAddress": "1 Chesham Lane",
      "Suburb": "Clevedon",
      "City": "Auckland",
      "PostCode": "2248",
      "CountryCode": "NZ",
      "IsRural": false,
      "IsResidential": false
    },
    "Email": "",
    "ContactPerson": "",
    "PhoneNumber": "",
    "DeliveryInstructions": "",
    "AvailableServices": [
      {
        "Carrier": "NZCouriers",
        "IsResidential": true,
        "IsRural": true,
        "HasSaturdayService": false,
        "BranchCode": "MKC",
        "RunNumber": ""
      },
      {
        "Carrier": "PostHaste",
        "IsResidential": true,
        "IsRural": true,
        "HasSaturdayService": false,
        "BranchCode": "AKL",
        "RunNumber": ""
      },
      {
        "Carrier": "CastleParcel",
        "IsResidential": true,
        "IsRural": true,
        "HasSaturdayService": false,
        "BranchCode": "AKL",
        "RunNumber": ""
      },
      {
        "Carrier": "NOWCouriers",
        "IsResidential": true,
        "IsRural": true,
        "HasSaturdayService": false,
        "BranchCode": "AKL",
        "RunNumber": ""
      }
    ]
  },
  "Validated": true,
  "Errors": []
}
    • Related Articles

    • GoSweetSpot: Rates

      Description Query to get available courier services and rates for the destination. Requests Method: POST Content Type: application/json URL: https://api-docs.gosweetspot.com/docs/rates/post.html Headers access_key : your unique API key provided by ...
    • GoSweetSpot: Models

      Available Rate Model Attribute Type Description quoteId Guid Unique rates calculation identifier. carrierId integer Id of carrier. carriername string Display name of courier provider. deliverytype string Courier delivery/service type. cost decimal ...
    • GoSweetSpot: Sending an Item

      If you're sending an item for the first time on GoSweetSpot, here is a quick guide to sending items if you're sending domestically within New Zealand. Includes description of what each Receivers details mean and how to ensure your address is ...
    • Integration API - Address Validation Logic

      This article explains the logic behind how we validate your addresses through our API and what could be causing your API error when generating a consignment. Address Validation Logic Process Our Address Validation logic works based on the process of ...
    • GoSweetSpot: Shipments

      Get Shipment Updates Description Get status updates for shipments. Requests Method: GET Content Type: application/json URL: https://help.nzcouriers.co.nz/gosweetspot-api-integration/gosweetspot-shipments Headers access_key : your unique API key ...