Basket Synchronisation
======================
This documents what data we synchronize with `Basket `_ and how.
Triggers
--------
Every time a field that we're meant to synchronize on an object changes, a full sync of the
object is triggered.
A consequence of this is, since the relation between an addon and an user is part of the add-on
object, when a new user is added as an author, or an existing author is removed from an add-on,
that triggers a full sync of the add-on, including user account information for all its authors.
Objects
-------
We're synchronizing 2 types of objects:
- User Accounts
- Add-ons
User Accounts
~~~~~~~~~~~~~
.. note::
Newsletter opt-in information is not stored by AMO, and therefore not synchronized with the
rest. It's sent to basket separately directly whenever it changes, through basket's
`Newsletter API `_ ``subscribe`` and
``unsubscribe`` endpoints.
.. http:post:: https://basket.mozilla.org/amo-sync/userprofile/
:`_.
:`.
:`.
:` of the add-on. Only the ``'id``, ``compatibility``, ``is_strict_compatibility_enabled`` and ``version`` fields are present.
:` of the add-on. Only the ``'id``, ``compatibility``, ``is_strict_compatibility_enabled`` and ``version`` fields are present.
:` the add-on belongs to for a given :ref:`add-on application `, referenced by its ``app_name``. (Combine with the add-on ``type`` to determine the name of the category).
: