# Authentication

# Introduction

To use our API, you will need to generate an API key through the Merchant Dashboard.

If you don't have a branch, Follow these steps to create one:

  1. Open Sidebar by clicking on the Menu icon in the top left corner of the screen.
  2. Open Settings page.
  3. Open Manage branches page.
  4. Click on "create new branch" button.

# Generate API Key

  1. Open Sidebar by clicking on the Menu icon in the top left corner of the screen.
  2. Open Settings page.
  3. Open API settings page.
  4. In the API Keys section, Click on "create new key" button.
  5. Select a branch.
  6. Add a webhook link if you want (Optional - See webhooks section).
  7. Click on "Generate" button.

Once you have the API key, You will need to include it in the headers of all API requests as the Authorization parameter, prefixed by the word Key .

# Examples

curl --location --request GET 'https://api.armadadelivery.com/v0/deliveries/:orderCode' \
--header 'Authorization: Key 4a3bc2e1-f6a2-4e5d-8c2f-9d0b5a4b3928'
fetch('https://api.armadadelivery.com/v0/deliveries/:orderCode', {
  method: 'GET',
  headers: {
    'Authorization': 'Key 4a3bc2e1-f6a2-4e5d-8c2f-9d0b5a4b3928'
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));
func main() {
	url := "https://api.armadadelivery.com/v0/deliveries/:orderCode"
	req, err := http.NewRequest("GET", url, nil)
	if err != nil {
		fmt.Println("Error creating request:", err)
		return
	}
	req.Header.Set("Authorization", "Key 4a3bc2e1-f6a2-4e5d-8c2f-9d0b5a4b3928")
	// ....
}