Step 3: Deploy Websites

The video below walks through the instructions for this step.

Next, you will deploy a set of configuration files to your new sub-account. This will spin up some data in the Knowledge Graph (specifically the same test data that you used during local development), link your GitHub repository from the parent account, and deploy a site, all from a single API request!

  1. In Postman, open up the Agreements API > Create Knowledge Graph, Repo, and Site request. This request utilizes the Resources Apply Request endpoint, which allows you to deploy a set of configuration files from a GitHub repo.

  2. If you open up the Body tab, you’ll see several variables that you’ll need to provide values for. Once again, open up your Reseller Environment Template and populate the following variables under the “current value” column:

    1. repo_url - The URL of the Pages GitHub repo that you created with the yext pages new command.
    2. branch - The branch of your Pages GitHub repo. Set this as the default branch from your GitHub repo (which should be master).
    3. repo_id - The ID of the repo object that will be created in your sub-account, associated with your repo_url. For now, set this as reseller-starter-repo.
    4. site_id - The ID of the site you will be deploying to your sub-account. For now, set this as reseller-starter-site.
    5. site_name - The name of the site you will be deploying to your sub-account. For now, set this as Reseller Starter Site.
    6. location_name - The name of the business you will be creating. For now, set this as Local Business.
    7. location_address_line1 - The first line of the business’s address. For now, set this as 61 9th Ave.
    8. location_address_region - The region of the business’s address. For now, set this as NY.
    9. location_address_postalcode - The postal code of the business’s address. For now, set this as 10011.
    10. location_country_code - The country abbreviation of the business’s address. For now, set this as US.
    11. location_entity_id - The entity ID of the business you will be creating. For now, set this as test-location.
    12. location_locale_code - The locale code of the test entity you will be creating. For now, set this as en.
    13. logo - An image URL for the business logo. For now, set this as https://logos-download.com/wp-content/uploads/2020/06/Yext_Logo.png.
  3. Once you have saved your template variables, navigate back to the request and click send. After a few seconds, Yext will return a response that contains a numeric id, which you will use to obtain the status of your request with a separate endpoint.

    1. Copy this id, and open up your Reseller Environment Template. Paste this ID into the “current value” column for resources_apply_request_id.
    2. Open up the Agreements API > Resources Apply Status request and click send. If the API response status is COMPLETE, your data and website was successfully deployed!
  4. Navigate to your first sub-account and inspect the Knowledge Graph and Pages. You should see the location business entity, as well as a new website.

  5. Congratulations, you have just deployed your first website!

(Optional) Refer to Using the Agreements API Endpoints guide for a full walkthrough of the Agreements API. The Agreements API can be used for myriad use cases, for example:

  1. Create a sub-account and location data ( Create New Location )
  2. Fetch all available services ( Available Services: List )
  3. Cancel an Account ( Cancel sub-account )
book
Note
Quotes and Rate Limits: Management API enforces a 5,000 request per hour rate limit. Please refer to the Management API documentation .

Congratulations. You have successfully created your first fleet of sites!