# Issuing Embossing Request

The Issuing Embossing Request resource is used to initiate the personalization and delivery of a physical card.

Each request specifies the card, kit, display name, and shipping address for card delivery.

Track the embossing and shipping status through the log endpoints.

### The Issuing Embossing Request object

**Attributes**

| Name | Type | Description |
| --- | --- | --- |
| `id` | STRING | Unique identifier for the issuing embossing request. |
| `cardId` | STRING | Id of the IssuingCard to be embossed. |
| `kitId` | STRING | Id of the IssuingEmbossingKit to be used. |
| `displayName1` | STRING | First line of the name to be printed on the card face. Example: "TONY STARK". |
| `displayName2` | STRING | Second line of the name to be printed on the card face. |
| `displayName3` | STRING | Third line of the name to be printed on the card face. |
| `shippingCity` | STRING | City for card delivery. |
| `shippingCountryCode` | STRING | Country code for card delivery. Example: "BRA". |
| `shippingDistrict` | STRING | District for card delivery. |
| `shippingService` | STRING | Shipping service type. Options: "loggi", "conveyor". |
| `shippingStateCode` | STRING | State code for card delivery. Example: "SP". |
| `shippingStreetLine1` | STRING | Primary street line for card delivery. |
| `shippingStreetLine2` | STRING | Secondary street line for card delivery. |
| `shippingTrackingNumber` | STRING | Tracking number for the card shipment. |
| `shippingZipCode` | STRING | ZIP code for card delivery. Example: "01311-000". |
| `embosserId` | STRING | Id of the embosser responsible for this request. |
| `shippingPhone` | STRING | Phone number for delivery contact. Example: "+5511999999999". |
| `status` | STRING | Current status of the embossing request. Options: "created", "processing", "success", "failed". |
| `tags` | LIST OF STRINGS | Tags associated with the embossing request. |
| `fee` | INTEGER | Fee charged in cents for the embossing request. |
| `created` | STRING | Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00". |
| `updated` | STRING | Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00". |

### Create Issuing Embossing Requests

`POST /v2/issuing-embossing-request`

Use this route to create up to 100 new issuing embossing requests at a time.

**Parameters**

| Name | Required | Description |
| --- | --- | --- |
| `cardId` | REQUIRED | Id of the IssuingCard to be embossed. |
| `kitId` | REQUIRED | Id of the IssuingEmbossingKit to use. |
| `displayName1` | REQUIRED | First line of the name to be printed on the card. Example: "TONY STARK". |
| `displayName2` | OPTIONAL | Second line of the name to be printed on the card. |
| `displayName3` | OPTIONAL | Third line of the name to be printed on the card. |
| `shippingCity` | REQUIRED | City for card delivery. |
| `shippingCountryCode` | REQUIRED | Country code for card delivery. Example: "BRA". |
| `shippingDistrict` | REQUIRED | District for card delivery. |
| `shippingService` | REQUIRED | Shipping service type. Options: "loggi", "conveyor". |
| `shippingStateCode` | REQUIRED | State code for card delivery. Example: "SP". |
| `shippingStreetLine1` | REQUIRED | Primary street line for card delivery. |
| `shippingStreetLine2` | REQUIRED | Secondary street line for card delivery. |
| `shippingZipCode` | REQUIRED | ZIP code for card delivery. Example: "01311-000". |
| `shippingTrackingNumber` | REQUIRED | Tracking number for the card shipment. |
| `shippingPhone` | OPTIONAL | Phone number for delivery contact. Example: "+5511999999999". |
| `embosserId` | OPTIONAL | Id of the embosser to handle this request. |
| `tags` | OPTIONAL | Array of strings to tag the entity for future queries. |

**Request**

```python
import starkinfra

requests = starkinfra.issuingembossingrequest.create([
    starkinfra.IssuingEmbossingRequest(
        card_id="5715709195239424",
        kit_id="6724771005489152",
        display_name_1="TONY STARK",
        shipping_city="Sao Paulo",
        shipping_country_code="BRA",
        shipping_district="Bela Vista",
        shipping_service="loggi",
        shipping_state_code="SP",
        shipping_street_line_1="Av. Paulista, 1000",
        shipping_street_line_2="Apto 101",
        shipping_tracking_number="BR1234567890",
        shipping_zip_code="01311-000",
        embosser_id="5656565656565656",
        tags=["department: tech"]
    )
])

for request in requests:
    print(request)
```

**Response**

```python
IssuingEmbossingRequest(
    id=7834882116598271,
    card_id=5715709195239424,
    kit_id=6724771005489152,
    display_name_1=TONY STARK,
    display_name_2=None,
    display_name_3=None,
    shipping_city=Sao Paulo,
    shipping_country_code=BRA,
    shipping_district=Bela Vista,
    shipping_phone=+5511999999999,
    shipping_service=loggi,
    shipping_state_code=SP,
    shipping_street_line_1=Av. Paulista, 1000,
    shipping_street_line_2=Apto 101,
    shipping_tracking_number=BR1234567890,
    shipping_zip_code=01311-000,
    embosser_id=5656565656565656,
    fee=0,
    status=created,
    tags=['department: tech'],
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
```

### List Issuing Embossing Requests

`GET /v2/issuing-embossing-request`

Get a list of issuing embossing requests in chunks of at most 100.

**Parameters**

| Name | Required | Description |
| --- | --- | --- |
| `limit` | OPTIONAL | Number of results per cursor. Max = 100. |
| `cursor` | OPTIONAL | String used to get the next batch of results. Our SDKs handle this for you. |
| `after` | OPTIONAL | Filter entities created after this date. |
| `before` | OPTIONAL | Filter entities created before this date. |
| `status` | OPTIONAL | Filter requests by the specified status. |
| `cardIds` | OPTIONAL | List of IssuingCard ids to filter the retrieved entities. |
| `tags` | OPTIONAL | Filter entities that contain the specified tags. |
| `ids` | OPTIONAL | List of strings to get specific entities by ids. |

**Request**

```python
import starkinfra

requests = starkinfra.issuingembossingrequest.query(
    limit=10,
    status="created"
)

for request in requests:
    print(request)
```

**Response**

```python
IssuingEmbossingRequest(
    id=7834882116598271,
    card_id=5715709195239424,
    kit_id=6724771005489152,
    display_name_1=TONY STARK,
    display_name_2=None,
    display_name_3=None,
    shipping_city=Sao Paulo,
    shipping_country_code=BRA,
    shipping_district=Bela Vista,
    shipping_phone=+5511999999999,
    shipping_service=loggi,
    shipping_state_code=SP,
    shipping_street_line_1=Av. Paulista, 1000,
    shipping_street_line_2=Apto 101,
    shipping_tracking_number=BR1234567890,
    shipping_zip_code=01311-000,
    embosser_id=5656565656565656,
    fee=0,
    status=created,
    tags=['department: tech'],
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
```

### Get an Issuing Embossing Request

`GET /v2/issuing-embossing-request/:id`

Get a single issuing embossing request by its id.

**Parameters**

| Name | Required | Description |
| --- | --- | --- |
| `id` | REQUIRED | Id of the issuing embossing request entity. |

**Request**

```python
import starkinfra

request = starkinfra.issuingembossingrequest.get("7834882116598271")

print(request)
```

**Response**

```python
IssuingEmbossingRequest(
    id=7834882116598271,
    card_id=5715709195239424,
    kit_id=6724771005489152,
    display_name_1=TONY STARK,
    display_name_2=None,
    display_name_3=None,
    shipping_city=Sao Paulo,
    shipping_country_code=BRA,
    shipping_district=Bela Vista,
    shipping_phone=+5511999999999,
    shipping_service=loggi,
    shipping_state_code=SP,
    shipping_street_line_1=Av. Paulista, 1000,
    shipping_street_line_2=Apto 101,
    shipping_tracking_number=BR1234567890,
    shipping_zip_code=01311-000,
    embosser_id=5656565656565656,
    fee=0,
    status=created,
    tags=['department: tech'],
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
```

### List Issuing Embossing Request Logs

`GET /v2/issuing-embossing-request/log`

Get a paged list of issuing embossing request logs.

**Parameters**

| Name | Required | Description |
| --- | --- | --- |
| `limit` | OPTIONAL | Number of results per cursor. Max = 100. |
| `cursor` | OPTIONAL | String used to get the next batch of results. Our SDKs handle this for you. |
| `after` | OPTIONAL | Filter entities created after this date. |
| `before` | OPTIONAL | Filter entities created before this date. |
| `types` | OPTIONAL | Filter logs by log types. |
| `requestIds` | OPTIONAL | Array of embossing request ids to filter logs. |
| `ids` | OPTIONAL | List of strings to get specific entities by ids. |

**Request**

```python
import starkinfra

logs = starkinfra.issuingembossingrequest.log.query(
    limit=10,
    types=["sent"]
)

for log in logs:
    print(log)
```

**Response**

```python
Log(
    id=8945993227707382,
    type=sent,
    request=IssuingEmbossingRequest(id=7834882116598271, status=processing),
    created=2022-01-01 00:00:00
)
```

### Get an Issuing Embossing Request Log

`GET /v2/issuing-embossing-request/log/:id`

Get a single issuing embossing request log by its id.

**Parameters**

| Name | Required | Description |
| --- | --- | --- |
| `id` | REQUIRED | Id of the log entity. |

**Request**

```python
import starkinfra

log = starkinfra.issuingembossingrequest.log.get("8945993227707382")

print(log)
```

**Response**

```python
Log(
    id=8945993227707382,
    type=sent,
    request=IssuingEmbossingRequest(id=7834882116598271, status=processing),
    created=2022-01-01 00:00:00
)
```

## Available Languages

Code samples on this page are in Python. The same content is available with samples in:

- [Python](https://docs.starkinfra.com/api/v2/issuing-embossing-request-python.md)
- [Node.js](https://docs.starkinfra.com/api/v2/issuing-embossing-request-node.md)
- [PHP](https://docs.starkinfra.com/api/v2/issuing-embossing-request-php.md)
- [Java](https://docs.starkinfra.com/api/v2/issuing-embossing-request-java.md)
- [Ruby](https://docs.starkinfra.com/api/v2/issuing-embossing-request-ruby.md)
- [Elixir](https://docs.starkinfra.com/api/v2/issuing-embossing-request-elixir.md)
- [.NET](https://docs.starkinfra.com/api/v2/issuing-embossing-request-dotnet.md)
- [Go](https://docs.starkinfra.com/api/v2/issuing-embossing-request-go.md)
- [Clojure](https://docs.starkinfra.com/api/v2/issuing-embossing-request-clojure.md)
- [cURL](https://docs.starkinfra.com/api/v2/issuing-embossing-request-curl.md)
