# \_getByNameAndCode

Returns the details of a Schedule of Rates based on name and code

### Parameters

#### name

The name and code for the schedule of rates in the following format, 'name (code)'.

### Example

```
FM_api('ScheduleOfRates_getByNameAndCode', ['name' => 'test1 (342)']);
```

### Result

#### On Success

```
{"id":"1","name":"test1","code":"342","stock_used":"null","cost":"100","last_edited":"2018-10-10 11:20:22","description":"","meta":"{\"nominal\":\"12\"},"asset_types":null}
```

#### On Failure

If the name is not included in the parameters:

```
{"error": "missing parameter: name"}
```


---

# 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/scheduleofrates/_getbynameandcode.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.
