The ACN Online Sign-Up API is a collection of REST resources related to supporting customer sign-up applications. These are described in this document.
HTTP Basic: Please contact ACN IT Infrastructure for a login
As per the REST approach, errors are handled via HTTP status codes. The body of the response will contain specifics of any error encountered. The following table describes the status codes used by the ACN Online Sign-Up API.
| Code | Description |
|---|---|
| 200 OK | Everything went well. |
| 201 Created | Object was created. |
| 400 Bad Request | Request was malformed/not understood. |
| 401 Forbidden | Permission denied. |
| 404 Not Found | Resource not found. |
| 410 Gone | Object does not exist. |
| 500 Internal Server Error | A timeout or exception thrown by downstream systems. |
| 501 Not Implemented | Action not available. |
| 503 Throttled | Request was throttled. |
These errors are accompanied by the header "X-Application-Error-Code", along with a message describing the error. Specific codes are documented below.
| Code | Message |
|---|---|
| 001 | Optus Infrastructure error - please try again later |
| 002 | Telstra Infrastructure error - please try again later |
| 003 | This service is already with ACN. If you'd like to view or change your service details, please login to <a href='http://myaccount.acnaustralia.com.au' target='_blank'>MyAccount</a> |
Checkout service (new customer) - returns a '302 FOUND' redirect to a workflow decided by the fields specified. If any validation errors occur, a '400 BAD REQUEST' is returned with the form validation error.
Same as Checkout New resource, with the addition of the following form fields
| Argument | Description | Type | Required | Min Length | Max Length |
|---|---|---|---|---|---|
| customerId | Customer Id | Integer | True | ||
| password | Customer Password | String | True | 6 | 9 |
Note If any of customerId or password is incorrect a generic error is thrown.
Normal Operation
SQ by FNN (3 services) Ben-Coopers-MacBook-Pro:~ ben$ curl -v -d "customerType=Residential&services=3&service0-servicePlan=1234&service0-offer=4321&service0-productCode=mobile&service1-servicePlan=1234&service1-productCode=homephone&service2-servicePlan=1234&service2-offer=4321&service2-childServicePlan=5678&service2-childOffer=1020&service2-productCode=envision&service2-sqZone=Zone 1&service2-sqSpeed=20000&sqType=FNN&fnn=0299298029&customerId=100012345&password=password" "http://john.smith:password@localhost:8000/api/checkout/existing/" * About to connect() to localhost port 8000 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8000 (#0) * Server auth using Basic with user 'john.smith' > POST /api/checkout/existing/ HTTP/1.1 > Authorization: Basic am9obi5zbWl0aDpwYXNzd29yZA== > User-Agent: curl/7.19.3 (i386-apple-darwin9.6.0) libcurl/7.19.3 zlib/1.2.3 > Host: localhost:8000 > Accept: */* > Content-Length: 407 > Content-Type: application/x-www-form-urlencoded > * HTTP 1.0, assume close after body < HTTP/1.0 302 FOUND < Date: Fri, 11 Mar 2011 00:18:27 GMT < Server: WSGIServer/0.1 Python/2.6.1 < Vary: Authorization, Cookie < Content-Type: text/html; charset=utf-8 < Location: http://localhost:8000/service/ < Set-Cookie: sessionid=3ff1cced7edbdb97023514e01aa3a0be; expires=Fri, 25-Mar-2011 00:18:27 GMT; Max-Age=1209600; Path=/ < * Closing connection #0 SQ by ADDR (3 services) Ben-Coopers-MacBook-Pro:~ ben$ curl -v -d "customerType=Residential&services=3&service0-servicePlan=1234&service0-offer=4321&service0-productCode=mobile&service1-servicePlan=1234&service1-productCode=homephone&service2-servicePlan=1234&service2-offer=4321&service2-childServicePlan=5678&service2-childOffer=1020&service2-productCode=envision&service2-sqZone=Zone 1&service2-sqSpeed=20000&sqType=ADDR&subAddressNumber=11&subAddressType=LEVEL&streetNumber=1&streetName=Pacific&streetType=HIGHWAY&suburb=North Sydney&state=NSW&postCode=2060&firstName=John&lastName=Smith&customerId=100012345&password=password" "http://john.smith:password@localhost:8000/api/checkout/existing/" * About to connect() to localhost port 8000 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8000 (#0) * Server auth using Basic with user 'john.smith' > POST /api/checkout/existing/ HTTP/1.1 > Authorization: Basic am9obi5zbWl0aDpwYXNzd29yZA== > User-Agent: curl/7.19.3 (i386-apple-darwin9.6.0) libcurl/7.19.3 zlib/1.2.3 > Host: localhost:8000 > Accept: */* > Content-Length: 566 > Content-Type: application/x-www-form-urlencoded > * HTTP 1.0, assume close after body < HTTP/1.0 302 FOUND < Date: Fri, 11 Mar 2011 00:22:55 GMT < Server: WSGIServer/0.1 Python/2.6.1 < Vary: Authorization, Cookie < Content-Type: text/html; charset=utf-8 < Location: http://localhost:8000/customer/service/ < Set-Cookie: sessionid=512aac591eeab08d6ddc64b10163c7e4; expires=Fri, 25-Mar-2011 00:22:55 GMT; Max-Age=1209600; Path=/ < * Closing connection #0
Validation (bad customerId or password)
Ben-Coopers-MacBook-Pro:~ ben$ curl -v -d "customerType=Residential&services=3&service0-servicePlan=1234&service0-offer=4321&service0-productCode=mobile&service1-servicePlan=1234&service1-productCode=homephone&service2-servicePlan=1234&service2-offer=4321&service2-childServicePlan=5678&service2-childOffer=1020&service2-productCode=envision&service2-sqZone=Zone 1&service2-sqSpeed=20000&sqType=ADDR&subAddressNumber=11&subAddressType=LEVEL&streetNumber=1&streetName=Pacific&streetType=HIGHWAY&suburb=North Sydney&state=NSW&postCode=2060&firstName=John&lastName=Smith&customerId=100012345&password=notlikely" "http://john.smith:password@localhost:8000/api/checkout/existing/" * About to connect() to localhost port 8000 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8000 (#0) * Server auth using Basic with user 'john.smith' > POST /api/checkout/existing/ HTTP/1.1 > Authorization: Basic am9obi5zbWl0aDpwYXNzd29yZA== > User-Agent: curl/7.19.3 (i386-apple-darwin9.6.0) libcurl/7.19.3 zlib/1.2.3 > Host: localhost:8000 > Accept: */* > Content-Length: 569 > Content-Type: application/x-www-form-urlencoded > * HTTP 1.0, assume close after body < HTTP/1.0 400 BAD REQUEST < Date: Fri, 11 Mar 2011 00:29:49 GMT < Server: WSGIServer/0.1 Python/2.6.1 < Vary: Authorization < Content-Type: text/html; charset=utf-8 < * Closing connection #0 Bad Request: <ul class="errorlist"><li>__all__<ul class="errorlist"><li>Either Customer does not exist or password is incorrect</li></ul></li></ul>
Note the generic error message
URL: /api/checkout/existing.{emitter_format}
Accepted methods: POST, GET
Resource fields: ('customerType', ('products', 'offer'))
URL: /api/sq/address/{product}/
Accepted methods: GET
Resource fields: ('product', 'availability', 'speed', 'zone', 'message', 'productCode')
SQ result for DPS, ADSL, Naked DSL and Envision by address
| Argument | Description | Type | Required | Min Length | Max Length | Restriction |
|---|---|---|---|---|---|---|
| subAddressType | Unit/Level Type | String | False | SUB_ADDRESS_TYPES | ||
| subAddressNumber | Unit/Level | String | False | 0 | 5 | |
| streetNumber | Street Number | String | True | 1 | 5 | |
| streetName | Street Name | String | True | 1 | 40 | |
| streetType | Street Type | String | True | STREET_TYPES | ||
| streetSuffix | Street Suffix | String | False | STREET_SUFFIX | ||
| suburb | Suburb | String | True | 1 | 30 | |
| state | State | String | True | ADDRESS_STATES | ||
| postCode | Post Code | String | True | 4 | 4 | |
| firstName | First Name | String | True | 1 | none | |
| lastName | Last Name | String | True | 1 | none |
Restriction Configuration
ADDRESS_STATES = [
("",""),
("ACT","ACT"),
("NSW","NSW"),
("NT","NT"),
("QLD","QLD"),
("SA","SA"),
("TAS","TAS"),
("VIC","VIC"),
("WA","WA")
]
SUB_ADDRESS_TYPES = [
("","Select your unit or level type"),
("APARTMENT","APARTMENT"),
("ATCO","ATCO"),
("BARRACKS","BARRACKS"),
("BASEMENT","BASEMENT"),
("BAY","BAY"),
("BERTH","BERTH"),
("BLOCK","BLOCK"),
("BUILDING","BUILDING"),
("CARAVAN","CARAVAN"),
("CHAMBERS","CHAMBERS"),
("COMPLEX","COMPLEX"),
("COTTAGE","COTTAGE"),
("COUNTER","COUNTER"),
("DUPLEX","DUPLEX"),
("ENTRANCE","ENTRANCE"),
("FACTORY","FACTORY"),
("FARM","FARM"),
("FLAT","FLAT"),
("FLOOR","FLOOR"),
("GATE","GATE"),
("GROUND","GROUND/GROUND FLOOR"),
("HANGAR","HANGAR"),
("HOUSE","HOUSE"),
("IGLOO","IGLOO"),
("JETTY","JETTY"),
("KIOSK","KIOSK"),
("LANE","LANE"),
("LEVEL","LEVEL"),
("LOT","LOT"),
("LOWER_GROUND_FLOOR","LOWER GROUND FLOOR"),
("MAISONETTE","MAISONETTE"),
("MEZZANINE","MEZZANINE"),
("OFFICE","OFFICE"),
("PENTHOUSE","PENTHOUSE"),
("PIER","PIER"),
("RESIDENCE","RESIDENCE"),
("ROAD_SIDE_DELIVERY","ROAD SIDE DELIVERY"),
("ROOM","ROOM"),
("ROYAL_MAIL_BOX","ROYAL MAIL BOX"),
("SHED","SHED"),
("SHOP","SHOP"),
("SITE","SITE"),
("STALL","STALL"),
("STUDIO","STUDIO"),
("SUITE","SUITE"),
("TIER","TIER"),
("TOWER","TOWER"),
("TOWNHOUSE","TOWNHOUSE"),
("UNIT","UNIT"),
("UPPER_GROUND_FLOOR","UPPER GROUND FLOOR"),
("VILLA","VILLA"),
("WARD","WARD"),
("WAREHOUSE","WAREHOUSE"),
("WHARF","WHARF")
]
STREET_SUFFIX = [
("",""),
("CENTRAL","CENTRAL"),
("EAST","EAST"),
("EXTENSION","EXTENSION"),
("LOWER","LOWER"),
("NORTH","NORTH"),
("NORTH_EAST","NORTH EAST"),
("NORTH_WEST","NORTH WEST"),
("SOUTH","SOUTH"),
("SOUTH_EAST","SOUTH EAST"),
("SOUTH_WEST","SOUTH WEST"),
("UPPER","UPPER"),
("WEST","WEST")
]
STREET_TYPES = [
("",""),
("Common street types",(("AVENUE","AVENUE"),
("CLOSE","CLOSE"),
("CRESCENT","CRESCENT"),
("COURT","COURT"),
("DRIVE","DRIVE"),
("PARADE","PARADE"),
("PLACE","PLACE"),
("ROAD","ROAD"),
("STREET","STREET")
)
),
("Other street types", (("ACCESS","ACCESS"),
("ALLEY","ALLEY"),
("ALLEYWAY","ALLEYWAY"),
("AMBLE","AMBLE"),
("ANCHORAGE","ANCHORAGE"),
("APPROACH","APPROACH"),
("ARCADE","ARCADE"),
("ARTERIAL","ARTERIAL"),
("ARTERY","ARTERY"),
("BANK","BANK"),
("BARRACKS","BARRACKS"),
("BASIN","BASIN"),
("BAY","BAY"),
("BEACH","BEACH"),
("BEND","BEND"),
("BLOCK","BLOCK"),
("BOULEVARD","BOULEVARD"),
("BOUNDARY","BOUNDARY"),
("BOWL","BOWL"),
("BRACE","BRACE"),
("BRAE","BRAE"),
("BRANCH","BRANCH"),
("BREA","BREA"),
("BREAK","BREAK"),
("BRIDGE","BRIDGE"),
("BROADWAY","BROADWAY"),
("BROW","BROW"),
("BYPASS","BYPASS"),
("BYWAY","BYWAY"),
("CAUSEWAY","CAUSEWAY"),
("CENTRE","CENTRE"),
("CENTREWAY","CENTREWAY"),
("CHASE","CHASE"),
("CIRCLE","CIRCLE"),
("CIRCLET","CIRCLET"),
("CIRCUIT","CIRCUIT"),
("CIRCUS","CIRCUS"),
("COLONNADE","COLONNADE"),
("COMMON","COMMON"),
("COMMUNITY","COMMUNITY"),
("CONCOURSE","CONCOURSE"),
("CONNECTION","CONNECTION"),
("COPSE","COPSE"),
("CORNER","CORNER"),
("CORSO","CORSO"),
("COURSE","COURSE"),
("COURTYARD","COURTYARD"),
("COVE","COVE"),
("CREEK","CREEK"),
("CRESCENT","CRESCENT"),
("CREST","CREST"),
("CRIEF","CRIEF"),
("CROSS","CROSS"),
("CROSSING","CROSSING"),
("CROSSROAD","CROSSROAD"),
("CROSSWAY","CROSSWAY"),
("CRUISEWAY","CRUISEWAY"),
("CUL_DE_SAC","CUL DE SAC"),
("CUTTING","CUTTING"),
("DALE","DALE"),
("DELL","DELL"),
("DEVIATION","DEVIATION"),
("DIP","DIP"),
("DISTRIBUTOR","DISTRIBUTOR"),
("DOWNS","DOWNS"),
("DRIVE","DRIVE"),
("DRIVEWAY","DRIVEWAY"),
("EASEMENT","EASEMENT"),
("EDGE","EDGE"),
("ELBOW","ELBOW"),
("END","END"),
("ENTRANCE","ENTRANCE"),
("ESPLANADE","ESPLANADE"),
("ESTATE","ESTATE"),
("EXPRESSWAY","EXPRESSWAY"),
("EXTENSION","EXTENSION"),
("FAIR","FAIR"),
("FAIRWAY","FAIRWAY"),
("FIRE TRACK","FIRE TRACK"),
("FIRETRAIL","FIRETRAIL"),
("FLAT","FLAT"),
("FOLLOW","FOLLOW"),
("FOOTWAY","FOOTWAY"),
("FORESHORE","FORESHORE"),
("FORMATION","FORMATION"),
("FREEWAY","FREEWAY"),
("FRONT","FRONT"),
("FRONTAGE","FRONTAGE"),
("GAP","GAP"),
("GARDEN","GARDEN"),
("GARDENS","GARDENS"),
("GATE","GATE"),
("GATES","GATES"),
("GATEWAY","GATEWAY"),
("GLADE","GLADE"),
("GLEN","GLEN"),
("GRANGE","GRANGE"),
("GREEN","GREEN"),
("GROUND","GROUND"),
("GROVE","GROVE"),
("GULLY","GULLY"),
("HEATH","HEATH"),
("HEIGHTS","HEIGHTS"),
("HIGHROAD","HIGHROAD"),
("HIGHWAY","HIGHWAY"),
("HILL","HILL"),
("HILLSIDE","HILLSIDE"),
("HOUSE","HOUSE"),
("INTERCHANGE","INTERCHANGE"),
("INTERSECTION","INTERSECTION"),
("ISLAND","ISLAND"),
("JUNCTION","JUNCTION"),
("KEY","KEY"),
("KNOLL","KNOLL"),
("LANDING","LANDING"),
("LANE","LANE"),
("LANEWAY","LANEWAY"),
("LEES","LEES"),
("LINE","LINE"),
("LINK","LINK"),
("LITTLE","LITTLE"),
("LOCATION","LOCATION"),
("LOOKOUT","LOOKOUT"),
("LOOP","LOOP"),
("LOWER","LOWER"),
("MALL","MALL"),
("MARKETLAND","MARKETLAND"),
("MARKETTOWN","MARKETTOWN"),
("MEAD","MEAD"),
("MEANDER","MEANDER"),
("MEW","MEW"),
("MEWS","MEWS"),
("MOTORWAY","MOTORWAY"),
("MOUNT","MOUNT"),
("MOUNTAIN","MOUNTAIN"),
("NOOK","NOOK"),
("OUTLOOK","OUTLOOK"),
("OVAL","OVAL"),
("PARADISE","PARADISE"),
("PARK","PARK"),
("PARKLANDS","PARKLANDS"),
("PARKWAY","PARKWAY"),
("PART","PART"),
("PASS","PASS"),
("PATH","PATH"),
("PATHWAY","PATHWAY"),
("PENINSULA","PENINSULA"),
("PIAZZA","PIAZZA"),
("PIER","PIER"),
("PLATEAU","PLATEAU"),
("PLAZA","PLAZA"),
("POCKET","POCKET"),
("POINT","POINT"),
("PORT","PORT"),
("PROMENADE","PROMENADE"),
("PURSUIT","PURSUIT"),
("QUAD","QUAD"),
("QUADRANGLE","QUADRANGLE"),
("QUADRANT","QUADRANT"),
("QUAYS","QUAYS"),
("RACECOURSE","RACECOURSE"),
("RAMBLE","RAMBLE"),
("RAMP","RAMP"),
("RANGE","RANGE"),
("REACH","REACH"),
("RESERVE","RESERVE"),
("REST","REST"),
("RETREAT","RETREAT"),
("RETURN","RETURN"),
("RIDE","RIDE"),
("RIDGE","RIDGE"),
("RIDGEWAY","RIDGEWAY"),
("RIGHT_OF_WAY","RIGHT OF WAY"),
("RING","RING"),
("RISE","RISE"),
("RIVER","RIVER"),
("RIVERWAY","RIVERWAY"),
("RIVIERA","RIVIERA"),
("ROADS","ROADS"),
("ROADSIDE","ROADSIDE"),
("ROADWAY","ROADWAY"),
("RONDE","RONDE"),
("ROSEBOWL","ROSEBOWL"),
("ROTARY","ROTARY"),
("ROUND","ROUND"),
("ROUTE","ROUTE"),
("ROW","ROW"),
("ROWE","ROWE"),
("RUE","RUE"),
("RUN","RUN"),
("SECTION","SECTION"),
("SERVICE_WAY","SERVICE WAY"),
("SIDING","SIDING"),
("SLOPE","SLOPE"),
("SOUND","SOUND"),
("SPUR","SPUR"),
("SQUARE","SQUARE"),
("STAIRS","STAIRS"),
("STATE_HIGHWAY","STATE HIGHWAY"),
("STATION","STATION"),
("STEPS","STEPS"),
("STOP","STOP"),
("STRAIGHT","STRAIGHT"),
("STRAND","STRAND"),
("STRIP","STRIP"),
("SUBWAY","SUBWAY"),
("TARN","TARN"),
("TERRACE","TERRACE"),
("THOROUGHFARE","THOROUGHFARE"),
("TOLLWAY","TOLLWAY"),
("TOP","TOP"),
("TOR","TOR"),
("TOWER","TOWER"),
("TOWERS","TOWERS"),
("TRACK","TRACK"),
("TRAIL","TRAIL"),
("TRAILER","TRAILER"),
("TRIANGLE","TRIANGLE"),
("TRUNKWAY","TRUNKWAY"),
("TURN","TURN"),
("UNDERPASS","UNDERPASS"),
("UPPER","UPPER"),
("VALE","VALE"),
("VALLEY","VALLEY"),
("VIADUCT","VIADUCT"),
("VIEW","VIEW"),
("VILLAGE","VILLAGE"),
("VILLAS","VILLAS"),
("VISTA","VISTA"),
("WADE","WADE"),
("WALK","WALK"),
("WALKWAY","WALKWAY"),
("WATERS","WATERS"),
("WAY","WAY"),
("WEST","WEST"),
("WHARF","WHARF"),
("WHARF","WHARF"),
("WOOD","WOOD"),
("WYND","WYND"),
("YARD","YARD")
)
)
]
Normal Operation
Ben-Coopers-MacBook-Pro:~ ben$ curl -v "http://john.smith:password@localhost:8000/api/sq/address/?subAddressNumber=11&subAddressType=LEVEL&streetNumber=1&streetName=Pacific&streetType=HIGHWAY&suburb=North Sydney&state=NSW&postCode=2060&firstName=John&lastName=Smith"
* About to connect() to localhost port 8000 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8000 (#0)
* Server auth using Basic with user 'john.smith'
> GET /api/sq/address/?subAddressNumber=11&subAddressType=LEVEL&streetNumber=1&streetName=Pacific&streetType=HIGHWAY&suburb=North Sydney&state=NSW&postCode=2060&firstName=John&lastName=Smith HTTP/1.1
> Authorization: Basic am9obi5zbWl0aDpwYXNzd29yZA==
> User-Agent: curl/7.19.3 (i386-apple-darwin9.6.0) libcurl/7.19.3 zlib/1.2.3
> Host: localhost:8000
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Date: Tue, 01 Mar 2011 00:29:27 GMT
< Server: WSGIServer/0.1 Python/2.6.1
< Vary: Authorization
< Content-Type: application/json; charset=utf-8
<
[
{
"product": "Digital Phone Service",
"zone": null,
"message": null,
"speed": null,
"availability": false,
"resource_uri": "/api/sq/fnn.Digital%20Phone%20Service"
},
{
"product": "Envision",
"zone": "",
"message": "",
"speed": "",
"availability": false,
"resource_uri": "/api/sq/fnn.Envision"
},
{
"product": "Naked DSL",
"zone": null,
"message": null,
"speed": null,
"availability": false,
"resource_uri": "/api/sq/fnn.Naked%20DSL"
},
{
"product": "ADSL + Home Phone",
"zone": "Zone 1",
"message": null,
"speed": "20000",
"availability": true,
"resource_uri": "/api/sq/fnn.ADSL%20+%20Home%20Phone"
}
* Closing connection #0
]
Validation (field missing)
Ben-Coopers-MacBook-Pro:~ ben$ curl -v "http://john.smith:password@localhost:8000/api/sq/address/?subAddressNumber=11&subAddressType=LEVEL&streetNumber=1&streetName=Pacific&streetType=HIGHWAY&suburb=North Sydney&state=NSW&postCode=2060&firstName=John" * About to connect() to localhost port 8000 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8000 (#0) * Server auth using Basic with user 'john.smith' > GET /api/sq/address/?subAddressNumber=11&subAddressType=LEVEL&streetNumber=1&streetName=Pacific&streetType=HIGHWAY&suburb=North Sydney&state=NSW&postCode=2060&firstName=John HTTP/1.1 > Authorization: Basic am9obi5zbWl0aDpwYXNzd29yZA== > User-Agent: curl/7.19.3 (i386-apple-darwin9.6.0) libcurl/7.19.3 zlib/1.2.3 > Host: localhost:8000 > Accept: */* > * HTTP 1.0, assume close after body < HTTP/1.0 400 BAD REQUEST < Date: Tue, 01 Mar 2011 03:45:12 GMT < Server: WSGIServer/0.1 Python/2.6.1 < Vary: Authorization < Content-Type: text/html; charset=utf-8 < * Closing connection #0 Bad Request: <ul class="errorlist"><li>lastName<ul class="errorlist"><li>This field is required.</li></ul></li></ul>
Validation (field restriction)
Ben-Coopers-MacBook-Pro:~ ben$ curl -v "http://john.smith:password@localhost:8000/api/sq/address/?subAddressNumber=11&subAddressType=LEVEL&streetNumber=1&streetName=Pacific&streetType=HWY&suburb=North Sydney&state=NSW&postCode=2060&firstName=John&lastName=Smith" * About to connect() to localhost port 8000 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8000 (#0) * Server auth using Basic with user 'john.smith' > GET /api/sq/address/?subAddressNumber=11&subAddressType=LEVEL&streetNumber=1&streetName=Pacific&streetType=HWY&suburb=North Sydney&state=NSW&postCode=2060&firstName=John&lastName=Smith HTTP/1.1 > Authorization: Basic am9obi5zbWl0aDpwYXNzd29yZA== > User-Agent: curl/7.19.3 (i386-apple-darwin9.6.0) libcurl/7.19.3 zlib/1.2.3 > Host: localhost:8000 > Accept: */* > * HTTP 1.0, assume close after body < HTTP/1.0 400 BAD REQUEST < Date: Tue, 01 Mar 2011 03:46:04 GMT < Server: WSGIServer/0.1 Python/2.6.1 < Vary: Authorization < Content-Type: text/html; charset=utf-8 < * Closing connection #0 Bad Request: <ul class="errorlist"><li>streetType<ul class="errorlist"><li>Select a valid choice. HWY is not one of the available choices.</li></ul></li></ul>
URL: /api/sq/fnn/{product}/
Accepted methods: GET
Resource fields: ('product', 'availability', 'speed', 'zone', 'message', 'productCode')
SQ result for DPS, ADSL, Naked DSL and Envision by phone number (Full National Number)
| Argument | Description | Type | Required | Min Length | Max Length |
|---|---|---|---|---|---|
| fnn | Full National Number | String | True | 10 | 10 |
Normal Output
Ben-Coopers-MacBook-Pro:~ ben$ curl -v "http://john.smith:password@localhost:8000/api/sq/fnn/?fnn=0282144000"
* About to connect() to localhost port 8000 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8000 (#0)
* Server auth using Basic with user 'john.smith'
> GET /api/sq/fnn/?fnn=0282144000 HTTP/1.1
> Authorization: Basic am9obi5zbWl0aDpwYXNzd29yZA==
> User-Agent: curl/7.19.3 (i386-apple-darwin9.6.0) libcurl/7.19.3 zlib/1.2.3
> Host: localhost:8000
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Date: Tue, 01 Mar 2011 00:17:47 GMT
< Server: WSGIServer/0.1 Python/2.6.1
< Vary: Authorization
< Content-Type: application/json; charset=utf-8
<
[
{
"product": "ADSL",
"zone": "Zone 1",
"message": null,
"speed": "20000",
"availability": true,
"resource_uri": "/api/sq/fnn.ADSL"
},
{
"product": "Envision",
"zone": "",
"message": "",
"speed": "",
"availability": true,
"resource_uri": "/api/sq/fnn.Envision"
},
{
"product": "Naked DSL",
"zone": "Zone 1",
"message": null,
"speed": "20000",
"availability": true,
"resource_uri": "/api/sq/fnn.Naked%20DSL"
},
{
"product": "ADSL + Home Phone",
"zone": "Zone 1",
"message": null,
"speed": "20000",
"availability": true,
"resource_uri": "/api/sq/fnn.ADSL%20+%20Home%20Phone"
}
* Closing connection #0
]
Validation (field length min)
Ben-Coopers-MacBook-Pro:~ ben$ curl -v "http://john.smith:password@localhost:8000/api/sq/fnn/?fnn=02821" * About to connect() to localhost port 8000 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8000 (#0) * Server auth using Basic with user 'john.smith' > GET /api/sq/fnn/?fnn=02821 HTTP/1.1 > Authorization: Basic am9obi5zbWl0aDpwYXNzd29yZA== > User-Agent: curl/7.19.3 (i386-apple-darwin9.6.0) libcurl/7.19.3 zlib/1.2.3 > Host: localhost:8000 > Accept: */* > * HTTP 1.0, assume close after body < HTTP/1.0 400 BAD REQUEST < Date: Tue, 01 Mar 2011 00:59:54 GMT < Server: WSGIServer/0.1 Python/2.6.1 < Vary: Authorization < Content-Type: text/html; charset=utf-8 < * Closing connection #0 Bad Request: <ul class="errorlist"><li>fnn<ul class="errorlist"><li>Ensure this value has at least 10 characters (it has 5).</li></ul></li></ul>
Validation (field length max)
Ben-Coopers-MacBook-Pro:~ ben$ curl -v "http://john.smith:password@localhost:8000/api/sq/fnn/?fnn=02821440001" * About to connect() to localhost port 8000 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8000 (#0) * Server auth using Basic with user 'john.smith' > GET /api/sq/fnn/?fnn=02821440001 HTTP/1.1 > Authorization: Basic am9obi5zbWl0aDpwYXNzd29yZA== > User-Agent: curl/7.19.3 (i386-apple-darwin9.6.0) libcurl/7.19.3 zlib/1.2.3 > Host: localhost:8000 > Accept: */* > * HTTP 1.0, assume close after body < HTTP/1.0 400 BAD REQUEST < Date: Tue, 01 Mar 2011 01:00:03 GMT < Server: WSGIServer/0.1 Python/2.6.1 < Vary: Authorization < Content-Type: text/html; charset=utf-8 < * Closing connection #0 Bad Request: <ul class="errorlist"><li>fnn<ul class="errorlist"><li>Ensure this value has at most 10 characters (it has 11).</li></ul></li></ul>
Checkout service (new customer) - returns a '302 FOUND' redirect to a workflow decided by the fields specified. If any validation errors occur, a '400 BAD REQUEST' is returned with the form validation error.
Base Checkout Form
| Argument | Description | Type | Required | Restriction |
|---|---|---|---|---|
| customerType | Customer Type | String | True | CUSTOMER_TYPES |
| services | Number of Services | Integer | True | |
| sqType | Type of Service Qualification used | String | True | SQ_TYPES |
Service Form
It is expected that the following form fields are passed through to match the number of services specified, with the prefix "servicen-" where n is (0..services-1)
| Argument | Description | Type | Required | Restriction |
|---|---|---|---|---|
| productCode | Product Code | String | True | PRODUCT_CODES |
| servicePlan | Service Plan ID | Integer | True | |
| offer | Retail Offer ID | Integer | False | |
| childServicePlan | Child Service Plan ID (only relevant for bundles) | Integer | False | |
| childOffer | Child Retail Offer ID (only relevant for bundles) | Integer | False | |
| sqZone | Service Qualification Zone | String | False | |
| sqSpeed | Service Qualification Zone | String | False |
Notes
Service Qualification Address Form
If sqType is 'ADDR', it is expected that the following form fields are passed across. It is assumed that every service listed uses the same service address. This is the same form used by the SQ Address resource.
| Argument | Description | Type | Required | Min Length | Max Length | Restriction |
|---|---|---|---|---|---|---|
| subAddressType | Unit/Level Type | String | False | SUB_ADDRESS_TYPES | ||
| subAddressNumber | Unit/Level | String | False | 0 | 5 | |
| streetNumber | Street Number | String | True | 1 | 5 | |
| streetName | Street Name | String | True | 1 | 40 | |
| streetType | Street Type | String | True | STREET_TYPES | ||
| streetSuffix | Street Suffix | String | False | STREET_SUFFIX | ||
| suburb | Suburb | String | True | 1 | 30 | |
| state | State | String | True | ADDRESS_STATES | ||
| postCode | Post Code | String | True | 4 | 4 | |
| firstName | First Name | String | True | 1 | none | |
| lastName | Last Name | String | True | 1 | none |
Service Qualification FNN form
If sqType is 'FNN', it is expected that the following form fields are passed across. It is assumed that every service listed uses an FNN for SQ. This is the same form used by the SQ FNN resource.
| Argument | Description | Type | Required | Min Length | Max Length |
|---|---|---|---|---|---|
| fnn | Full National Number | String | True | 10 | 10 |
Restriction Configuration
CUSTOMER_TYPES = [("Residential", "Residential"),
("Business", "Business")
]
SQ_TYPES = [("FNN","My Home Phone Number"),
("ADDR","My Address")]
PRODUCT_CODES = [('nakedDsl', 'Naked DSL'),
('dps', 'Digital Phone Service'),
('mbb', 'Mobile Broadband'),
('homephoneAdslBundle', 'ADSL + Home Phone'),
('mobile', 'Mobile'),
('adsl', 'ADSL'),
('homephone', 'Home Phone'),
('envision', 'Envision')]
ADDRESS_STATES = [
("",""),
("ACT","ACT"),
("NSW","NSW"),
("NT","NT"),
("QLD","QLD"),
("SA","SA"),
("TAS","TAS"),
("VIC","VIC"),
("WA","WA")
]
SUB_ADDRESS_TYPES = [
("","Select your unit or level type"),
("APARTMENT","APARTMENT"),
("ATCO","ATCO"),
("BARRACKS","BARRACKS"),
("BASEMENT","BASEMENT"),
("BAY","BAY"),
("BERTH","BERTH"),
("BLOCK","BLOCK"),
("BUILDING","BUILDING"),
("CARAVAN","CARAVAN"),
("CHAMBERS","CHAMBERS"),
("COMPLEX","COMPLEX"),
("COTTAGE","COTTAGE"),
("COUNTER","COUNTER"),
("DUPLEX","DUPLEX"),
("ENTRANCE","ENTRANCE"),
("FACTORY","FACTORY"),
("FARM","FARM"),
("FLAT","FLAT"),
("FLOOR","FLOOR"),
("GATE","GATE"),
("GROUND","GROUND/GROUND FLOOR"),
("HANGAR","HANGAR"),
("HOUSE","HOUSE"),
("IGLOO","IGLOO"),
("JETTY","JETTY"),
("KIOSK","KIOSK"),
("LANE","LANE"),
("LEVEL","LEVEL"),
("LOT","LOT"),
("LOWER_GROUND_FLOOR","LOWER GROUND FLOOR"),
("MAISONETTE","MAISONETTE"),
("MEZZANINE","MEZZANINE"),
("OFFICE","OFFICE"),
("PENTHOUSE","PENTHOUSE"),
("PIER","PIER"),
("RESIDENCE","RESIDENCE"),
("ROAD_SIDE_DELIVERY","ROAD SIDE DELIVERY"),
("ROOM","ROOM"),
("ROYAL_MAIL_BOX","ROYAL MAIL BOX"),
("SHED","SHED"),
("SHOP","SHOP"),
("SITE","SITE"),
("STALL","STALL"),
("STUDIO","STUDIO"),
("SUITE","SUITE"),
("TIER","TIER"),
("TOWER","TOWER"),
("TOWNHOUSE","TOWNHOUSE"),
("UNIT","UNIT"),
("UPPER_GROUND_FLOOR","UPPER GROUND FLOOR"),
("VILLA","VILLA"),
("WARD","WARD"),
("WAREHOUSE","WAREHOUSE"),
("WHARF","WHARF")
]
STREET_SUFFIX = [
("",""),
("CENTRAL","CENTRAL"),
("EAST","EAST"),
("EXTENSION","EXTENSION"),
("LOWER","LOWER"),
("NORTH","NORTH"),
("NORTH_EAST","NORTH EAST"),
("NORTH_WEST","NORTH WEST"),
("SOUTH","SOUTH"),
("SOUTH_EAST","SOUTH EAST"),
("SOUTH_WEST","SOUTH WEST"),
("UPPER","UPPER"),
("WEST","WEST")
]
STREET_TYPES = [
("",""),
("Common street types",(("AVENUE","AVENUE"),
("CLOSE","CLOSE"),
("CRESCENT","CRESCENT"),
("COURT","COURT"),
("DRIVE","DRIVE"),
("PARADE","PARADE"),
("PLACE","PLACE"),
("ROAD","ROAD"),
("STREET","STREET")
)
),
("Other street types", (("ACCESS","ACCESS"),
("ALLEY","ALLEY"),
("ALLEYWAY","ALLEYWAY"),
("AMBLE","AMBLE"),
("ANCHORAGE","ANCHORAGE"),
("APPROACH","APPROACH"),
("ARCADE","ARCADE"),
("ARTERIAL","ARTERIAL"),
("ARTERY","ARTERY"),
("BANK","BANK"),
("BARRACKS","BARRACKS"),
("BASIN","BASIN"),
("BAY","BAY"),
("BEACH","BEACH"),
("BEND","BEND"),
("BLOCK","BLOCK"),
("BOULEVARD","BOULEVARD"),
("BOUNDARY","BOUNDARY"),
("BOWL","BOWL"),
("BRACE","BRACE"),
("BRAE","BRAE"),
("BRANCH","BRANCH"),
("BREA","BREA"),
("BREAK","BREAK"),
("BRIDGE","BRIDGE"),
("BROADWAY","BROADWAY"),
("BROW","BROW"),
("BYPASS","BYPASS"),
("BYWAY","BYWAY"),
("CAUSEWAY","CAUSEWAY"),
("CENTRE","CENTRE"),
("CENTREWAY","CENTREWAY"),
("CHASE","CHASE"),
("CIRCLE","CIRCLE"),
("CIRCLET","CIRCLET"),
("CIRCUIT","CIRCUIT"),
("CIRCUS","CIRCUS"),
("COLONNADE","COLONNADE"),
("COMMON","COMMON"),
("COMMUNITY","COMMUNITY"),
("CONCOURSE","CONCOURSE"),
("CONNECTION","CONNECTION"),
("COPSE","COPSE"),
("CORNER","CORNER"),
("CORSO","CORSO"),
("COURSE","COURSE"),
("COURTYARD","COURTYARD"),
("COVE","COVE"),
("CREEK","CREEK"),
("CRESCENT","CRESCENT"),
("CREST","CREST"),
("CRIEF","CRIEF"),
("CROSS","CROSS"),
("CROSSING","CROSSING"),
("CROSSROAD","CROSSROAD"),
("CROSSWAY","CROSSWAY"),
("CRUISEWAY","CRUISEWAY"),
("CUL_DE_SAC","CUL DE SAC"),
("CUTTING","CUTTING"),
("DALE","DALE"),
("DELL","DELL"),
("DEVIATION","DEVIATION"),
("DIP","DIP"),
("DISTRIBUTOR","DISTRIBUTOR"),
("DOWNS","DOWNS"),
("DRIVE","DRIVE"),
("DRIVEWAY","DRIVEWAY"),
("EASEMENT","EASEMENT"),
("EDGE","EDGE"),
("ELBOW","ELBOW"),
("END","END"),
("ENTRANCE","ENTRANCE"),
("ESPLANADE","ESPLANADE"),
("ESTATE","ESTATE"),
("EXPRESSWAY","EXPRESSWAY"),
("EXTENSION","EXTENSION"),
("FAIR","FAIR"),
("FAIRWAY","FAIRWAY"),
("FIRE TRACK","FIRE TRACK"),
("FIRETRAIL","FIRETRAIL"),
("FLAT","FLAT"),
("FOLLOW","FOLLOW"),
("FOOTWAY","FOOTWAY"),
("FORESHORE","FORESHORE"),
("FORMATION","FORMATION"),
("FREEWAY","FREEWAY"),
("FRONT","FRONT"),
("FRONTAGE","FRONTAGE"),
("GAP","GAP"),
("GARDEN","GARDEN"),
("GARDENS","GARDENS"),
("GATE","GATE"),
("GATES","GATES"),
("GATEWAY","GATEWAY"),
("GLADE","GLADE"),
("GLEN","GLEN"),
("GRANGE","GRANGE"),
("GREEN","GREEN"),
("GROUND","GROUND"),
("GROVE","GROVE"),
("GULLY","GULLY"),
("HEATH","HEATH"),
("HEIGHTS","HEIGHTS"),
("HIGHROAD","HIGHROAD"),
("HIGHWAY","HIGHWAY"),
("HILL","HILL"),
("HILLSIDE","HILLSIDE"),
("HOUSE","HOUSE"),
("INTERCHANGE","INTERCHANGE"),
("INTERSECTION","INTERSECTION"),
("ISLAND","ISLAND"),
("JUNCTION","JUNCTION"),
("KEY","KEY"),
("KNOLL","KNOLL"),
("LANDING","LANDING"),
("LANE","LANE"),
("LANEWAY","LANEWAY"),
("LEES","LEES"),
("LINE","LINE"),
("LINK","LINK"),
("LITTLE","LITTLE"),
("LOCATION","LOCATION"),
("LOOKOUT","LOOKOUT"),
("LOOP","LOOP"),
("LOWER","LOWER"),
("MALL","MALL"),
("MARKETLAND","MARKETLAND"),
("MARKETTOWN","MARKETTOWN"),
("MEAD","MEAD"),
("MEANDER","MEANDER"),
("MEW","MEW"),
("MEWS","MEWS"),
("MOTORWAY","MOTORWAY"),
("MOUNT","MOUNT"),
("MOUNTAIN","MOUNTAIN"),
("NOOK","NOOK"),
("OUTLOOK","OUTLOOK"),
("OVAL","OVAL"),
("PARADISE","PARADISE"),
("PARK","PARK"),
("PARKLANDS","PARKLANDS"),
("PARKWAY","PARKWAY"),
("PART","PART"),
("PASS","PASS"),
("PATH","PATH"),
("PATHWAY","PATHWAY"),
("PENINSULA","PENINSULA"),
("PIAZZA","PIAZZA"),
("PIER","PIER"),
("PLATEAU","PLATEAU"),
("PLAZA","PLAZA"),
("POCKET","POCKET"),
("POINT","POINT"),
("PORT","PORT"),
("PROMENADE","PROMENADE"),
("PURSUIT","PURSUIT"),
("QUAD","QUAD"),
("QUADRANGLE","QUADRANGLE"),
("QUADRANT","QUADRANT"),
("QUAYS","QUAYS"),
("RACECOURSE","RACECOURSE"),
("RAMBLE","RAMBLE"),
("RAMP","RAMP"),
("RANGE","RANGE"),
("REACH","REACH"),
("RESERVE","RESERVE"),
("REST","REST"),
("RETREAT","RETREAT"),
("RETURN","RETURN"),
("RIDE","RIDE"),
("RIDGE","RIDGE"),
("RIDGEWAY","RIDGEWAY"),
("RIGHT_OF_WAY","RIGHT OF WAY"),
("RING","RING"),
("RISE","RISE"),
("RIVER","RIVER"),
("RIVERWAY","RIVERWAY"),
("RIVIERA","RIVIERA"),
("ROADS","ROADS"),
("ROADSIDE","ROADSIDE"),
("ROADWAY","ROADWAY"),
("RONDE","RONDE"),
("ROSEBOWL","ROSEBOWL"),
("ROTARY","ROTARY"),
("ROUND","ROUND"),
("ROUTE","ROUTE"),
("ROW","ROW"),
("ROWE","ROWE"),
("RUE","RUE"),
("RUN","RUN"),
("SECTION","SECTION"),
("SERVICE_WAY","SERVICE WAY"),
("SIDING","SIDING"),
("SLOPE","SLOPE"),
("SOUND","SOUND"),
("SPUR","SPUR"),
("SQUARE","SQUARE"),
("STAIRS","STAIRS"),
("STATE_HIGHWAY","STATE HIGHWAY"),
("STATION","STATION"),
("STEPS","STEPS"),
("STOP","STOP"),
("STRAIGHT","STRAIGHT"),
("STRAND","STRAND"),
("STRIP","STRIP"),
("SUBWAY","SUBWAY"),
("TARN","TARN"),
("TERRACE","TERRACE"),
("THOROUGHFARE","THOROUGHFARE"),
("TOLLWAY","TOLLWAY"),
("TOP","TOP"),
("TOR","TOR"),
("TOWER","TOWER"),
("TOWERS","TOWERS"),
("TRACK","TRACK"),
("TRAIL","TRAIL"),
("TRAILER","TRAILER"),
("TRIANGLE","TRIANGLE"),
("TRUNKWAY","TRUNKWAY"),
("TURN","TURN"),
("UNDERPASS","UNDERPASS"),
("UPPER","UPPER"),
("VALE","VALE"),
("VALLEY","VALLEY"),
("VIADUCT","VIADUCT"),
("VIEW","VIEW"),
("VILLAGE","VILLAGE"),
("VILLAS","VILLAS"),
("VISTA","VISTA"),
("WADE","WADE"),
("WALK","WALK"),
("WALKWAY","WALKWAY"),
("WATERS","WATERS"),
("WAY","WAY"),
("WEST","WEST"),
("WHARF","WHARF"),
("WHARF","WHARF"),
("WOOD","WOOD"),
("WYND","WYND"),
("YARD","YARD")
)
)
]
Normal Operation
SQ by FNN (3 services) Ben-Coopers-MacBook-Pro:~ ben$ curl -v -d "customerType=Residential&services=3&service0-servicePlan=1234&service0-offer=4321&service0-productCode=mobile&service1-servicePlan=1234&service1-productCode=homephone&service2-servicePlan=1234&service2-offer=4321&service2-childServicePlan=5678&service2-childOffer=1020&service2-productCode=envision&service2-sqZone=Zone 1&service2-sqSpeed=20000&sqType=FNN&fnn=0299298029" "http://john.smith:password@localhost:8000/api/checkout/new/" * About to connect() to localhost port 8000 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8000 (#0) * Server auth using Basic with user 'john.smith' > POST /api/checkout/new/ HTTP/1.1 > Authorization: Basic am9obi5zbWl0aDpwYXNzd29yZA== > User-Agent: curl/7.19.3 (i386-apple-darwin9.6.0) libcurl/7.19.3 zlib/1.2.3 > Host: localhost:8000 > Accept: */* > Content-Length: 370 > Content-Type: application/x-www-form-urlencoded > * HTTP 1.0, assume close after body < HTTP/1.0 302 FOUND < Date: Thu, 10 Mar 2011 23:55:41 GMT < Server: WSGIServer/0.1 Python/2.6.1 < Vary: Authorization, Cookie < Content-Type: text/html; charset=utf-8 < Location: http://localhost:8000/customer/residential/ < Set-Cookie: sessionid=b945bc6b9d8ff40c4690bd0c9d035eea; expires=Thu, 24-Mar-2011 23:55:41 GMT; Max-Age=1209600; Path=/ < * Closing connection #0 SQ by ADDR (3 services) Ben-Coopers-MacBook-Pro:~ ben$ curl -v -d "customerType=Residential&services=3&service0-servicePlan=1234&service0-offer=4321&service0-productCode=mobile&service1-servicePlan=1234&service1-productCode=homephone&service2-servicePlan=1234&service2-offer=4321&service2-childServicePlan=5678&service2-childOffer=1020&service2-productCode=envision&service2-sqZone=Zone 1&service2-sqSpeed=20000&sqType=ADDR&subAddressNumber=11&subAddressType=LEVEL&streetNumber=1&streetName=Pacific&streetType=HIGHWAY&suburb=North Sydney&state=NSW&postCode=2060&firstName=John&lastName=Smith" "http://ben.cooper:Z3gWE9TY@localhost:8000/api/checkout/new/" * About to connect() to localhost port 8000 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8000 (#0) * Server auth using Basic with user 'john.smith' > POST /api/checkout/new/ HTTP/1.1 > Authorization: Basic am9obi5zbWl0aDpwYXNzd29yZA== > User-Agent: curl/7.19.3 (i386-apple-darwin9.6.0) libcurl/7.19.3 zlib/1.2.3 > Host: localhost:8000 > Accept: */* > Content-Length: 529 > Content-Type: application/x-www-form-urlencoded > * HTTP 1.0, assume close after body < HTTP/1.0 302 FOUND < Date: Fri, 11 Mar 2011 00:00:36 GMT < Server: WSGIServer/0.1 Python/2.6.1 < Vary: Authorization, Cookie < Content-Type: text/html; charset=utf-8 < Location: http://localhost:8000/customer/residential/ < Set-Cookie: sessionid=cabaeac77b0d417912948e4f6e6053b3; expires=Fri, 25-Mar-2011 00:00:36 GMT; Max-Age=1209600; Path=/ < * Closing connection #0
Validation (services specified but no services given)
Ben-Coopers-MacBook-Pro:~ ben$ curl -v -d "customerType=Residential&services=2&sqType=FNN&fnn=0299298029" "http://john.smith:password@localhost:8000/api/checkout/new/" * About to connect() to localhost port 8000 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8000 (#0) * Server auth using Basic with user 'john.smith' > POST /api/checkout/new/ HTTP/1.1 > Authorization: Basic am9obi5zbWl0aDpwYXNzd29yZA== > User-Agent: curl/7.19.3 (i386-apple-darwin9.6.0) libcurl/7.19.3 zlib/1.2.3 > Host: localhost:8000 > Accept: */* > Content-Length: 61 > Content-Type: application/x-www-form-urlencoded > * HTTP 1.0, assume close after body < HTTP/1.0 400 BAD REQUEST < Date: Fri, 11 Mar 2011 00:32:42 GMT < Server: WSGIServer/0.1 Python/2.6.1 < Vary: Authorization, Cookie < Content-Type: text/html; charset=utf-8 < Set-Cookie: sessionid=8e52c02bfa71aa255851eee4e1c90ce1; expires=Fri, 25-Mar-2011 00:32:42 GMT; Max-Age=1209600; Path=/ < * Closing connection #0 Bad Request: <ul class="errorlist"><li>productCode<ul class="errorlist"><li>This field is required.</li></ul></li><li>servicePlan<ul class="errorlist"><li>This field is required.</li></ul></li></ul>
Validation (SQ type incorrect)
Ben-Coopers-MacBook-Pro:~ ben$ curl -v -d "customerType=Residential&services=3&service0-servicePlan=1234&service0-offer=4321&service0-productCode=mobile&service1-servicePlan=1234&service1-productCode=homephone&service2-servicePlan=1234&service2-offer=4321&service2-childServicePlan=5678&service2-childOffer=1020&service2-productCode=envision&service2-sqZone=Zone 1&service2-sqSpeed=20000&sqType=NOTATYPE&fnn=0299298029" "http://john.smith:password@localhost:8000/api/checkout/new/" * About to connect() to localhost port 8000 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8000 (#0) * Server auth using Basic with user 'john.smith' > POST /api/checkout/new/ HTTP/1.1 > Authorization: Basic am9obi5zbWl0aDpwYXNzd29yZA== > User-Agent: curl/7.19.3 (i386-apple-darwin9.6.0) libcurl/7.19.3 zlib/1.2.3 > Host: localhost:8000 > Accept: */* > Content-Length: 375 > Content-Type: application/x-www-form-urlencoded > * HTTP 1.0, assume close after body < HTTP/1.0 400 BAD REQUEST < Date: Fri, 11 Mar 2011 00:33:47 GMT < Server: WSGIServer/0.1 Python/2.6.1 < Vary: Authorization < Content-Type: text/html; charset=utf-8 < * Closing connection #0 Bad Request: <ul class="errorlist"><li>sqType<ul class="errorlist"><li>Select a valid choice. NOTATYPE is not one of the available choices.</li></ul></li></ul>
URL: /api/checkout/new.{emitter_format}
Accepted methods: POST, GET
Resource fields: ('customerType', ('products', 'offer'))