diff --git a/README.md b/README.md index 345bdd7..524cd85 100644 --- a/README.md +++ b/README.md @@ -33,12 +33,29 @@ Returns } ``` +### ICCID + +The structure of an ICCID according to the International Telecommunication Union +should be: + +![IccidSchema](./docs/fig1.png) + +This gives the structure: + +`ICCID = MII + CC + IIN + IAIN + C` + +Example Onomondo SIM: + +`ICCID = 89 + 45 + 73 + 0000271204 + 3` + +### API Response + The API will return different status codes based on different scenarios: | StatusCode | Explanation | | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | 200 | The request was successful and you should get the most recent data from our database. If data is older than 5 minutes, new data will be fetched. | -| 400 | Bad request. The request parameters didn't validate. Either not a valid iccid or from a not supported issuer. | +| 400 | Bad request. The request parameters didn't validate. Either not a valid iccid or from an issuer that we don't support. | | 404 | Not found. The SIM doesn't exist in the issuers API. This response will be cached for 30 days. | | 409 | No information about SIM in cache. Try again later, and you will get either a 404 if the SIM doensn't exist or 200 with data. | | 500 | Internal Error. | diff --git a/docs/structure-of-iccid-according-to-itu.png b/docs/structure-of-iccid-according-to-itu.png new file mode 100644 index 0000000..0f8cdc6 Binary files /dev/null and b/docs/structure-of-iccid-according-to-itu.png differ