# \_setDeliveryAddress

Sets the delivery address for a PurchaseOrder.

### Parameters

#### id

The ID of the PurchaseOrder.

#### delivery\_address

The delivery address to set.

### Example

```
FM_api('PurchaseOrder_setDeliveryAddress', ['id' => '1', 'delivery_address' => 'Belfast Road, Newry, Newry and Mourne, BT34 1QH]);
```

### Result

#### On Success

```
{'ok':1}
```

#### On Failure

If the User is not logged in:

```
{'error':'not logged in'}
```

If no ID is provided:

```
{'error':'no purchase order ID provided'}
```

If no delivery address is provided:

```
{'error':'no address provided'}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fieldmotion.com/fieldmotion-api-docs/purchaseorder/_setdeliveryaddress.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
